You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jmaxwell <je...@gmail.com> on 2009/01/06 22:16:44 UTC

Retrieving Project Artifact from the Repository During Assembly

When creating *.zip assemblies for our various environments we would like to
retrieve the project artifact directly the repository, we do not want to
have to rebuild our project artifacts each time.

Is it possible to modify our assembly descriptors to retrieve a project
artifact out of the repository?
-- 
View this message in context: http://www.nabble.com/Retrieving-Project-Artifact-from-the-Repository-During-Assembly-tp21319261p21319261.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


RE: Retrieving Project Artifact from the Repository During Assembly

Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
The assembly plugin should be able to do that, but also take a look a
the maven-dependency-plugin:copy / copy-dependencies goals. You could
also use this to pull it from the repo to a local folder and then
include that in the assembly. Sometimes this is easier to manage than
trying to coax the assembly to do everything.

-----Original Message-----
From: jmaxwell [mailto:jeff.maxwell@gmail.com] 
Sent: Wednesday, January 07, 2009 12:51 AM
To: users@maven.apache.org
Subject: Re: Retrieving Project Artifact from the Repository During
Assembly


The issue is not the dependecies of the project but the artifact
generated by
the project.

Our hudson server generated the jar file for the project and deployed it
into our snapshot repo.  Now we want to create a couple of zips that
contain
the jar, its dependecies, and an environment specific property file and
we
would like to do this without having to create additonal poms.



brettporter wrote:
> 
> Both - there is a dependencies element in the assembly descriptor that

> can use the dependencies listed in the POM (with filters applied) to  
> add them to the assembly. This should certainly be used for them  
> rather than referring to directories outside of the project.
> 
> Cheers,
> Brett
> 
> On 07/01/2009, at 3:57 PM, jmaxwell wrote:
> 
>>
>> Are you referring to the dependencies element of the POM?
>>
>>
>> brettporter wrote:
>>>
>>> If you are including it in the assembly using the dependencies
>>> element, it uses whatever was retrieved by Maven. Maven will
retrieve
>>> it from the repository if it hasn't already been built. I'm not
quite
>>> sure what additional functionality you are looking for?
>>>
>>> Cheers,
>>> Brett
>>>
>>> On 07/01/2009, at 8:16 AM, jmaxwell wrote:
>>>
>>>>
>>>> When creating *.zip assemblies for our various environments we
would
>>>> like to
>>>> retrieve the project artifact directly the repository, we do not
>>>> want to
>>>> have to rebuild our project artifacts each time.
>>>>
>>>> Is it possible to modify our assembly descriptors to retrieve a
>>>> project
>>>> artifact out of the repository?
>>>> -- 
>>>> View this message in context:
>>>>
http://www.nabble.com/Retrieving-Project-Artifact-from-the-Repository-Du
ring-Assembly-tp21319261p21319261.html
>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>
>>> --
>>> Brett Porter
>>> brett@apache.org
>>> http://blogs.exist.com/bporter/
>>>
>>>
>>>
---------------------------------------------------------------------
>>> 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/Retrieving-Project-Artifact-from-the-Repository-Du
ring-Assembly-tp21319261p21324941.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
> 
> --
> Brett Porter
> brett@apache.org
> http://blogs.exist.com/bporter/
> 
> 
> ---------------------------------------------------------------------
> 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/Retrieving-Project-Artifact-from-the-Repository-Du
ring-Assembly-tp21319261p21325368.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: Retrieving Project Artifact from the Repository During Assembly

Posted by jmaxwell <je...@gmail.com>.
The issue is not the dependecies of the project but the artifact generated by
the project.

Our hudson server generated the jar file for the project and deployed it
into our snapshot repo.  Now we want to create a couple of zips that contain
the jar, its dependecies, and an environment specific property file and we
would like to do this without having to create additonal poms.



brettporter wrote:
> 
> Both - there is a dependencies element in the assembly descriptor that  
> can use the dependencies listed in the POM (with filters applied) to  
> add them to the assembly. This should certainly be used for them  
> rather than referring to directories outside of the project.
> 
> Cheers,
> Brett
> 
> On 07/01/2009, at 3:57 PM, jmaxwell wrote:
> 
>>
>> Are you referring to the dependencies element of the POM?
>>
>>
>> brettporter wrote:
>>>
>>> If you are including it in the assembly using the dependencies
>>> element, it uses whatever was retrieved by Maven. Maven will retrieve
>>> it from the repository if it hasn't already been built. I'm not quite
>>> sure what additional functionality you are looking for?
>>>
>>> Cheers,
>>> Brett
>>>
>>> On 07/01/2009, at 8:16 AM, jmaxwell wrote:
>>>
>>>>
>>>> When creating *.zip assemblies for our various environments we would
>>>> like to
>>>> retrieve the project artifact directly the repository, we do not
>>>> want to
>>>> have to rebuild our project artifacts each time.
>>>>
>>>> Is it possible to modify our assembly descriptors to retrieve a
>>>> project
>>>> artifact out of the repository?
>>>> -- 
>>>> View this message in context:
>>>> http://www.nabble.com/Retrieving-Project-Artifact-from-the-Repository-During-Assembly-tp21319261p21319261.html
>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>
>>> --
>>> Brett Porter
>>> brett@apache.org
>>> http://blogs.exist.com/bporter/
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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/Retrieving-Project-Artifact-from-the-Repository-During-Assembly-tp21319261p21324941.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
> 
> --
> Brett Porter
> brett@apache.org
> http://blogs.exist.com/bporter/
> 
> 
> ---------------------------------------------------------------------
> 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/Retrieving-Project-Artifact-from-the-Repository-During-Assembly-tp21319261p21325368.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Retrieving Project Artifact from the Repository During Assembly

Posted by Brett Porter <br...@apache.org>.
Both - there is a dependencies element in the assembly descriptor that  
can use the dependencies listed in the POM (with filters applied) to  
add them to the assembly. This should certainly be used for them  
rather than referring to directories outside of the project.

Cheers,
Brett

On 07/01/2009, at 3:57 PM, jmaxwell wrote:

>
> Are you referring to the dependencies element of the POM?
>
>
> brettporter wrote:
>>
>> If you are including it in the assembly using the dependencies
>> element, it uses whatever was retrieved by Maven. Maven will retrieve
>> it from the repository if it hasn't already been built. I'm not quite
>> sure what additional functionality you are looking for?
>>
>> Cheers,
>> Brett
>>
>> On 07/01/2009, at 8:16 AM, jmaxwell wrote:
>>
>>>
>>> When creating *.zip assemblies for our various environments we would
>>> like to
>>> retrieve the project artifact directly the repository, we do not
>>> want to
>>> have to rebuild our project artifacts each time.
>>>
>>> Is it possible to modify our assembly descriptors to retrieve a
>>> project
>>> artifact out of the repository?
>>> -- 
>>> View this message in context:
>>> http://www.nabble.com/Retrieving-Project-Artifact-from-the-Repository-During-Assembly-tp21319261p21319261.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>
>> --
>> Brett Porter
>> brett@apache.org
>> http://blogs.exist.com/bporter/
>>
>>
>> ---------------------------------------------------------------------
>> 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/Retrieving-Project-Artifact-from-the-Repository-During-Assembly-tp21319261p21324941.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/


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


Re: Retrieving Project Artifact from the Repository During Assembly

Posted by jmaxwell <je...@gmail.com>.
Are you referring to the dependencies element of the POM? 


brettporter wrote:
> 
> If you are including it in the assembly using the dependencies  
> element, it uses whatever was retrieved by Maven. Maven will retrieve  
> it from the repository if it hasn't already been built. I'm not quite  
> sure what additional functionality you are looking for?
> 
> Cheers,
> Brett
> 
> On 07/01/2009, at 8:16 AM, jmaxwell wrote:
> 
>>
>> When creating *.zip assemblies for our various environments we would  
>> like to
>> retrieve the project artifact directly the repository, we do not  
>> want to
>> have to rebuild our project artifacts each time.
>>
>> Is it possible to modify our assembly descriptors to retrieve a  
>> project
>> artifact out of the repository?
>> -- 
>> View this message in context:
>> http://www.nabble.com/Retrieving-Project-Artifact-from-the-Repository-During-Assembly-tp21319261p21319261.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
> 
> --
> Brett Porter
> brett@apache.org
> http://blogs.exist.com/bporter/
> 
> 
> ---------------------------------------------------------------------
> 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/Retrieving-Project-Artifact-from-the-Repository-During-Assembly-tp21319261p21324941.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: Retrieving Project Artifact from the Repository During Assembly

Posted by Brett Porter <br...@apache.org>.
If you are including it in the assembly using the dependencies  
element, it uses whatever was retrieved by Maven. Maven will retrieve  
it from the repository if it hasn't already been built. I'm not quite  
sure what additional functionality you are looking for?

Cheers,
Brett

On 07/01/2009, at 8:16 AM, jmaxwell wrote:

>
> When creating *.zip assemblies for our various environments we would  
> like to
> retrieve the project artifact directly the repository, we do not  
> want to
> have to rebuild our project artifacts each time.
>
> Is it possible to modify our assembly descriptors to retrieve a  
> project
> artifact out of the repository?
> -- 
> View this message in context: http://www.nabble.com/Retrieving-Project-Artifact-from-the-Repository-During-Assembly-tp21319261p21319261.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/


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