David Hay created MNG-5511:
------------------------------

             Summary: Can't override a profile setting in a plugin's dependency
                 Key: MNG-5511
                 URL: https://jira.codehaus.org/browse/MNG-5511
             Project: Maven 2 & 3
          Issue Type: Bug
          Components: Dependencies
    Affects Versions: 3.0.4
         Environment: OS X 10.8.3
            Reporter: David Hay


We are trying to use the mojo cobertura plugin in our project.  However, it 
won't run my Mac Book Pro (OS X, 10.8.3) as Apple very kindly decided to move 
tools.jar and embed it into classes.jar in a completely different directory.

The plugin depends on cobertura, which defines the following property in its 
mac profile:

    <profile>
      <id>OSXProfile</id>
      <activation>
        <os>
          <family>mac</family>
        </os>
      </activation>
      <properties>
        <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
      </properties>
    </profile>

and the accompanying dependency:

    <dependency>
      <groupId>com.sun</groupId>
      <artifactId>tools</artifactId>
      <version>0</version>
      <scope>system</scope>
      <systemPath>${toolsjar}</systemPath>
    </dependency>

This is wrong for Mac OS 10.8.3 running Java 6 on two counts - the lib 
directory is at ${java.home}/lib and the tools.jar doesn't exist in the lib 
directory as apple decided to put those clases in 
${java.home}/../Classes/classes.jar.

I therefore need to be able to override the <toolsjar> setting, but nothing 
I've tried works.  

I have tried adding my own profile and setting <toolsjar> appropriately, but it 
seems to be ignored.  I also tried specifying it on the command line, and 
again, it complains it can't find ../lib/tools.jar.

This is a show-stopper for us.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to