You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "J. Matthew Pryor" <jm...@mobiquity.net> on 2006/08/02 16:02:54 UTC

accessing artifacts in local repository from pom expressions or antrun scripts

I am migrating a maven 1 project to a maven 2 project.
I have one module that creates its artifact by merging together 2 
artifacts created by dependent modules
At the moment, I am trying to do it all with the antrun plugin, rather 
than writing Mojos.

In the maven 1 version I did somethign like this:

${maven.repo.local}/${pom.artifactDirectory}/the-file-i-want.exe

Is there any way I can get installed artifacts from the local repository 
via antrun or pom.xml expressions?

Thanks,
Matthew

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


Re: accessing artifacts in local repository from pom expressions or antrun scripts

Posted by Simon Kitching <sk...@apache.org>.
Maybe use the maven-dependency-plugin, which according to the docs can
copy the set of dependencies to an arbitrary directory, and strip off
version numbers?

On Thu, 2006-08-03 at 00:25 +1000, J. Matthew Pryor wrote:
> I am using the native-maven-plugin to compile C source for the ATmelplatform
> This produces two binary/object files as artifacts from sibling modules. I need to be able to pass the path names of these 2 files to a
> Java program we have written that merges the 2 object files together
> 
> Thanks for any further assistance
> Matthew
> 
> 
> 
> 
> Denis Cabasson wrote:
> > Merging 2 artifacts....
> >
> > Looks like a task for maven-assembly-plugin:
> > http://maven.apache.org/plugins/maven-assembly-plugin/unpack-mojo.html
> >
> > It can unpack jar/zip dependencies to an assembly directory and package them
> > as you need.
> >
> > I'm afraid I can't help any futher without more informations about the
> > artifacts you want to merge, and what you want to produce.
> >
> > Denis.
> >
> >
> > J. Matthew Pryor wrote:
> >   
> >> I am migrating a maven 1 project to a maven 2 project.
> >> I have one module that creates its artifact by merging together 2 
> >> artifacts created by dependent modules
> >> At the moment, I am trying to do it all with the antrun plugin, rather 
> >> than writing Mojos.
> >>
> >> In the maven 1 version I did somethign like this:
> >>
> >> ${maven.repo.local}/${pom.artifactDirectory}/the-file-i-want.exe
> >>
> >> Is there any way I can get installed artifacts from the local repository 
> >> via antrun or pom.xml expressions?
> >>
> >> Thanks,
> >> Matthew
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >>     
> >
> >   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 


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


Re: accessing artifacts in local repository from pom expressions or antrun scripts

Posted by "J. Matthew Pryor" <jm...@mobiquity.net>.
Ok Thanks John.

Any hints on where to look for a reasonably simple example of dependency
resolution Java/Mojo code that will help me on my way?

Cheers,
Matthew

John Casey wrote:
> I'd suggest writing a custom maven plugin to handle this. You can lookup
> files in the local repository from inside a custom plugin pretty
> easily, and
> in any case you're still going to need some way to fire off your merge
> app.
>
> -j
>
> On 8/2/06, J. Matthew Pryor <jm...@mobiquity.net> wrote:
>>
>> I am using the native-maven-plugin to compile C source for the
>> ATmelplatform
>> This produces two binary/object files as artifacts from sibling
>> modules. I
>> need to be able to pass the path names of these 2 files to a
>> Java program we have written that merges the 2 object files together
>>
>> Thanks for any further assistance
>> Matthew
>>
>>
>>
>>
>> Denis Cabasson wrote:
>> > Merging 2 artifacts....
>> >
>> > Looks like a task for maven-assembly-plugin:
>> > http://maven.apache.org/plugins/maven-assembly-plugin/unpack-mojo.html
>> >
>> > It can unpack jar/zip dependencies to an assembly directory and
>> package
>> them
>> > as you need.
>> >
>> > I'm afraid I can't help any futher without more informations about the
>> > artifacts you want to merge, and what you want to produce.
>> >
>> > Denis.
>> >
>> >
>> > J. Matthew Pryor wrote:
>> >
>> >> I am migrating a maven 1 project to a maven 2 project.
>> >> I have one module that creates its artifact by merging together 2
>> >> artifacts created by dependent modules
>> >> At the moment, I am trying to do it all with the antrun plugin,
>> rather
>> >> than writing Mojos.
>> >>
>> >> In the maven 1 version I did somethign like this:
>> >>
>> >> ${maven.repo.local}/${pom.artifactDirectory}/the-file-i-want.exe
>> >>
>> >> Is there any way I can get installed artifacts from the local
>> repository
>> >> via antrun or pom.xml expressions?
>> >>
>> >> Thanks,
>> >> Matthew
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> For additional commands, e-mail: users-help@maven.apache.org
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>

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


Re: accessing artifacts in local repository from pom expressions or antrun scripts

Posted by John Casey <ca...@gmail.com>.
I'd suggest writing a custom maven plugin to handle this. You can lookup
files in the local repository from inside a custom plugin pretty easily, and
in any case you're still going to need some way to fire off your merge app.

-j

On 8/2/06, J. Matthew Pryor <jm...@mobiquity.net> wrote:
>
> I am using the native-maven-plugin to compile C source for the
> ATmelplatform
> This produces two binary/object files as artifacts from sibling modules. I
> need to be able to pass the path names of these 2 files to a
> Java program we have written that merges the 2 object files together
>
> Thanks for any further assistance
> Matthew
>
>
>
>
> Denis Cabasson wrote:
> > Merging 2 artifacts....
> >
> > Looks like a task for maven-assembly-plugin:
> > http://maven.apache.org/plugins/maven-assembly-plugin/unpack-mojo.html
> >
> > It can unpack jar/zip dependencies to an assembly directory and package
> them
> > as you need.
> >
> > I'm afraid I can't help any futher without more informations about the
> > artifacts you want to merge, and what you want to produce.
> >
> > Denis.
> >
> >
> > J. Matthew Pryor wrote:
> >
> >> I am migrating a maven 1 project to a maven 2 project.
> >> I have one module that creates its artifact by merging together 2
> >> artifacts created by dependent modules
> >> At the moment, I am trying to do it all with the antrun plugin, rather
> >> than writing Mojos.
> >>
> >> In the maven 1 version I did somethign like this:
> >>
> >> ${maven.repo.local}/${pom.artifactDirectory}/the-file-i-want.exe
> >>
> >> Is there any way I can get installed artifacts from the local
> repository
> >> via antrun or pom.xml expressions?
> >>
> >> Thanks,
> >> Matthew
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: accessing artifacts in local repository from pom expressions or antrun scripts

Posted by "J. Matthew Pryor" <jm...@mobiquity.net>.
I am using the native-maven-plugin to compile C source for the ATmelplatform
This produces two binary/object files as artifacts from sibling modules. I need to be able to pass the path names of these 2 files to a
Java program we have written that merges the 2 object files together

Thanks for any further assistance
Matthew




Denis Cabasson wrote:
> Merging 2 artifacts....
>
> Looks like a task for maven-assembly-plugin:
> http://maven.apache.org/plugins/maven-assembly-plugin/unpack-mojo.html
>
> It can unpack jar/zip dependencies to an assembly directory and package them
> as you need.
>
> I'm afraid I can't help any futher without more informations about the
> artifacts you want to merge, and what you want to produce.
>
> Denis.
>
>
> J. Matthew Pryor wrote:
>   
>> I am migrating a maven 1 project to a maven 2 project.
>> I have one module that creates its artifact by merging together 2 
>> artifacts created by dependent modules
>> At the moment, I am trying to do it all with the antrun plugin, rather 
>> than writing Mojos.
>>
>> In the maven 1 version I did somethign like this:
>>
>> ${maven.repo.local}/${pom.artifactDirectory}/the-file-i-want.exe
>>
>> Is there any way I can get installed artifacts from the local repository 
>> via antrun or pom.xml expressions?
>>
>> Thanks,
>> Matthew
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>>     
>
>   

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


Re: accessing artifacts in local repository from pom expressions or antrun scripts

Posted by Denis Cabasson <de...@insee.fr>.
Merging 2 artifacts....

Looks like a task for maven-assembly-plugin:
http://maven.apache.org/plugins/maven-assembly-plugin/unpack-mojo.html

It can unpack jar/zip dependencies to an assembly directory and package them
as you need.

I'm afraid I can't help any futher without more informations about the
artifacts you want to merge, and what you want to produce.

Denis.


J. Matthew Pryor wrote:
> 
> I am migrating a maven 1 project to a maven 2 project.
> I have one module that creates its artifact by merging together 2 
> artifacts created by dependent modules
> At the moment, I am trying to do it all with the antrun plugin, rather 
> than writing Mojos.
> 
> In the maven 1 version I did somethign like this:
> 
> ${maven.repo.local}/${pom.artifactDirectory}/the-file-i-want.exe
> 
> Is there any way I can get installed artifacts from the local repository 
> via antrun or pom.xml expressions?
> 
> Thanks,
> Matthew
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/accessing-artifacts-in-local-repository-from-pom-expressions-or-antrun-scripts-tf2040042.html#a5614474
Sent from the Maven - Users forum at Nabble.com.


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