You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by David Hay <da...@enstratius.com> on 2013/08/29 16:45:34 UTC

Overriding a plugin dependency's profile property?

Hi,

I am trying to use the mojo cobertura plugin in our project, and it won't
run on my Mac as the tools jar is in the wrong place.

The plugin depends on cobertura, which defines the following property in
the 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.

All that to ask, how do I get cobertura to look in classes.jar for that
dependency?

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.

Is this possible?

cheers,

David

Re: Overriding a plugin dependency's profile property?

Posted by David Hay <da...@enstratius.com>.
I just submitted http://jira.codehaus.org/browse/MNG-5511 for this...


On Tue, Sep 3, 2013 at 11:29 AM, David Hay <da...@enstratius.com> wrote:

> Can anyone confirm whether this is supported or not?
>
> Happy to file ticket if someone can confirm...
>
> thanks!
>
>
>
> On Mon, Sep 2, 2013 at 2:35 AM, Baptiste Mathus <ml...@batmat.net> wrote:
>
>> Hi,
>> On a related note, please ensure there's a corresponding ticket filed in
>> JIRA or cobertura-m-p. There's currently some activity around this plugin
>> and I suppose this could be fixed in the go.
>>
>> My 2 cents.
>> Le 29 août 2013 22:22, "David Hay" <da...@enstratius.com> a écrit :
>>
>> > hi Wayne,
>> >
>> > Yes, I can create a symlink pointing ../lib/tools.jar to
>> > ../Classes/classes.jar which works.
>> >
>> > However, it requires all of our devs to add such a symlink and is very
>> > inconvenient.
>> >
>> > Seems to me that maven should allow us to override it in the pom, but
>> I'm
>> > struggling to figure out if it does, and if so, how.
>> >
>> > cheers
>> >
>> > David
>> >
>> >
>> >
>> > On Thu, Aug 29, 2013 at 3:15 PM, Wayne Fay <wa...@gmail.com> wrote:
>> >
>> > > > 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.
>> > >
>> > > Did you perhaps try using "ln" to ensure the jar appears where
>> > > Cobertura is expecting it to be?
>> > >
>> > > Wayne
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > > For additional commands, e-mail: users-help@maven.apache.org
>> > >
>> > >
>> >
>>
>
>

Re: Overriding a plugin dependency's profile property?

Posted by David Hay <da...@enstratius.com>.
Can anyone confirm whether this is supported or not?

Happy to file ticket if someone can confirm...

thanks!


On Mon, Sep 2, 2013 at 2:35 AM, Baptiste Mathus <ml...@batmat.net> wrote:

> Hi,
> On a related note, please ensure there's a corresponding ticket filed in
> JIRA or cobertura-m-p. There's currently some activity around this plugin
> and I suppose this could be fixed in the go.
>
> My 2 cents.
> Le 29 août 2013 22:22, "David Hay" <da...@enstratius.com> a écrit :
>
> > hi Wayne,
> >
> > Yes, I can create a symlink pointing ../lib/tools.jar to
> > ../Classes/classes.jar which works.
> >
> > However, it requires all of our devs to add such a symlink and is very
> > inconvenient.
> >
> > Seems to me that maven should allow us to override it in the pom, but I'm
> > struggling to figure out if it does, and if so, how.
> >
> > cheers
> >
> > David
> >
> >
> >
> > On Thu, Aug 29, 2013 at 3:15 PM, Wayne Fay <wa...@gmail.com> wrote:
> >
> > > > 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.
> > >
> > > Did you perhaps try using "ln" to ensure the jar appears where
> > > Cobertura is expecting it to be?
> > >
> > > Wayne
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > > For additional commands, e-mail: users-help@maven.apache.org
> > >
> > >
> >
>

Re: Overriding a plugin dependency's profile property?

Posted by Baptiste Mathus <ml...@batmat.net>.
Hi,
On a related note, please ensure there's a corresponding ticket filed in
JIRA or cobertura-m-p. There's currently some activity around this plugin
and I suppose this could be fixed in the go.

My 2 cents.
Le 29 août 2013 22:22, "David Hay" <da...@enstratius.com> a écrit :

> hi Wayne,
>
> Yes, I can create a symlink pointing ../lib/tools.jar to
> ../Classes/classes.jar which works.
>
> However, it requires all of our devs to add such a symlink and is very
> inconvenient.
>
> Seems to me that maven should allow us to override it in the pom, but I'm
> struggling to figure out if it does, and if so, how.
>
> cheers
>
> David
>
>
>
> On Thu, Aug 29, 2013 at 3:15 PM, Wayne Fay <wa...@gmail.com> wrote:
>
> > > 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.
> >
> > Did you perhaps try using "ln" to ensure the jar appears where
> > Cobertura is expecting it to be?
> >
> > Wayne
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>

Re: Overriding a plugin dependency's profile property?

Posted by David Hay <da...@enstratius.com>.
hi Wayne,

Yes, I can create a symlink pointing ../lib/tools.jar to
../Classes/classes.jar which works.

However, it requires all of our devs to add such a symlink and is very
inconvenient.

Seems to me that maven should allow us to override it in the pom, but I'm
struggling to figure out if it does, and if so, how.

cheers

David



On Thu, Aug 29, 2013 at 3:15 PM, Wayne Fay <wa...@gmail.com> wrote:

> > 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.
>
> Did you perhaps try using "ln" to ensure the jar appears where
> Cobertura is expecting it to be?
>
> Wayne
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Overriding a plugin dependency's profile property?

Posted by Wayne Fay <wa...@gmail.com>.
> 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.

Did you perhaps try using "ln" to ensure the jar appears where
Cobertura is expecting it to be?

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org