You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by William Ferguson <wi...@xandar.com.au> on 2014/01/19 13:18:29 UTC

Adding a classpath element within a Mojo

I have a Mojo which needs to add an element to the compile time classpath
for future Mojos.

I'm struggling to find any doco that points in the right direction.

Is it possible?
If so, how should I go about it?


William

Re: Adding a classpath element within a Mojo

Posted by William Ferguson <wi...@xandar.com.au>.
Hi Ron, appreciate the references, but I am not attempting to build an
Android project, I am working on the android-maven-plugin which builds
Android projects. The AAR consumption within android-maven-plugin is
currently incomplete.

Ie I need to know how to add a compile time dependency within the Mojo that
consumes AAR artifacts. Not looking for a way to use Gradle to build.

William


On Mon, Jan 20, 2014 at 9:56 AM, Ron Wheeler <rwheeler@artifact-software.com
> wrote:

> I don't do any Android development but since no one had responded, I
> thought that I wight try to get you started (or unblocked).
>
> Perhaps some of these references will help.
> http://www.vandalsoftware.com/post/52468430435/publishing-
> an-android-library-aar-to-a-maven
> http://stackoverflow.com/questions/15173923/external-
> android-library-projects-with-gradle
> http://blog.glassdiary.com/post/67134169807/how-to-share-
> android-archive-library-aar-across
>
> You might want to do some Googling to find exactly what you need.
>
> Ron
>
>
> On 19/01/2014 4:47 PM, William Ferguson wrote:
>
>> OK, let me clarify.
>>
>> Project has dependencies on artifacts of type AAR (Android archive - an
>> archive that contains several sub-artifacts including a classes jar).
>>
>> My Mojo unpacks the AAR artifacts and makes the sub-artifacts available to
>> other build components.
>>
>> One of those build components is the maven-compiler-plugin. We want to add
>> the classes contained in the AAR dependencies to the compile classpath so
>> that the maven-compiler-plugin can compile our classes against the classes
>> from the AARs.
>>
>> How do we do that?
>>
>> William
>>
>>
>>
>> On Mon, Jan 20, 2014 at 1:14 AM, Anders Hammar <an...@hammar.net> wrote:
>>
>>  Do you want to change the classpath of the project or of other mojos?
>>>
>>> Don't think either is possible. And if it was, I don't think it's wise.
>>> The
>>> dependencies of the project should be declared and not magically added.
>>>
>>> /Anders
>>>
>>>
>>>
>>> On Sun, Jan 19, 2014 at 1:18 PM, William Ferguson <
>>> william.ferguson@xandar.com.au> wrote:
>>>
>>>  I have a Mojo which needs to add an element to the compile time
>>>> classpath
>>>> for future Mojos.
>>>>
>>>> I'm struggling to find any doco that points in the right direction.
>>>>
>>>> Is it possible?
>>>> If so, how should I go about it?
>>>>
>>>>
>>>> William
>>>>
>>>>
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Adding a classpath element within a Mojo

Posted by Ron Wheeler <rw...@artifact-software.com>.
I don't do any Android development but since no one had responded, I 
thought that I wight try to get you started (or unblocked).

Perhaps some of these references will help.
http://www.vandalsoftware.com/post/52468430435/publishing-an-android-library-aar-to-a-maven
http://stackoverflow.com/questions/15173923/external-android-library-projects-with-gradle
http://blog.glassdiary.com/post/67134169807/how-to-share-android-archive-library-aar-across

You might want to do some Googling to find exactly what you need.

Ron

On 19/01/2014 4:47 PM, William Ferguson wrote:
> OK, let me clarify.
>
> Project has dependencies on artifacts of type AAR (Android archive - an
> archive that contains several sub-artifacts including a classes jar).
>
> My Mojo unpacks the AAR artifacts and makes the sub-artifacts available to
> other build components.
>
> One of those build components is the maven-compiler-plugin. We want to add
> the classes contained in the AAR dependencies to the compile classpath so
> that the maven-compiler-plugin can compile our classes against the classes
> from the AARs.
>
> How do we do that?
>
> William
>
>
>
> On Mon, Jan 20, 2014 at 1:14 AM, Anders Hammar <an...@hammar.net> wrote:
>
>> Do you want to change the classpath of the project or of other mojos?
>>
>> Don't think either is possible. And if it was, I don't think it's wise. The
>> dependencies of the project should be declared and not magically added.
>>
>> /Anders
>>
>>
>>
>> On Sun, Jan 19, 2014 at 1:18 PM, William Ferguson <
>> william.ferguson@xandar.com.au> wrote:
>>
>>> I have a Mojo which needs to add an element to the compile time classpath
>>> for future Mojos.
>>>
>>> I'm struggling to find any doco that points in the right direction.
>>>
>>> Is it possible?
>>> If so, how should I go about it?
>>>
>>>
>>> William
>>>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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


Re: Adding a classpath element within a Mojo

Posted by William Ferguson <wi...@xandar.com.au>.
OK, let me clarify.

Project has dependencies on artifacts of type AAR (Android archive - an
archive that contains several sub-artifacts including a classes jar).

My Mojo unpacks the AAR artifacts and makes the sub-artifacts available to
other build components.

One of those build components is the maven-compiler-plugin. We want to add
the classes contained in the AAR dependencies to the compile classpath so
that the maven-compiler-plugin can compile our classes against the classes
from the AARs.

How do we do that?

William



On Mon, Jan 20, 2014 at 1:14 AM, Anders Hammar <an...@hammar.net> wrote:

> Do you want to change the classpath of the project or of other mojos?
>
> Don't think either is possible. And if it was, I don't think it's wise. The
> dependencies of the project should be declared and not magically added.
>
> /Anders
>
>
>
> On Sun, Jan 19, 2014 at 1:18 PM, William Ferguson <
> william.ferguson@xandar.com.au> wrote:
>
> > I have a Mojo which needs to add an element to the compile time classpath
> > for future Mojos.
> >
> > I'm struggling to find any doco that points in the right direction.
> >
> > Is it possible?
> > If so, how should I go about it?
> >
> >
> > William
> >
>

Re: Adding a classpath element within a Mojo

Posted by Anders Hammar <an...@hammar.net>.
Do you want to change the classpath of the project or of other mojos?

Don't think either is possible. And if it was, I don't think it's wise. The
dependencies of the project should be declared and not magically added.

/Anders



On Sun, Jan 19, 2014 at 1:18 PM, William Ferguson <
william.ferguson@xandar.com.au> wrote:

> I have a Mojo which needs to add an element to the compile time classpath
> for future Mojos.
>
> I'm struggling to find any doco that points in the right direction.
>
> Is it possible?
> If so, how should I go about it?
>
>
> William
>