You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Michael Mühlebach <mm...@gmail.com> on 2008/04/07 15:14:53 UTC

Use assembly and deploy togeather

Hello

I want to create an assembly and deploy it but I have some troubles with it.

I tried it with the command:

mvn assembly:single deploy

I got almost what I expected except: All artifacts from my project,
including the one I executed maven for, are snapshot versions! (have
the classifier -SNAPSHOT instead of a build date and number).
What have I done wrong or did I misunderstand the assembly/deploy build cycle?!

best wishes
michael

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


Re: Use assembly and deploy togeather

Posted by Luke Daley <ld...@ldaley.com>.
On 08/04/2008, at 5:15 PM, Michael Mühlebach wrote:

> I tried it with this command but my problem is the created zip file
> does not contain the deployed jar file. It still has a -SNAPSHOT
> postfix which is quite ugly.
>
> On Tue, Apr 8, 2008 at 1:44 AM, Luke Daley <ld...@ldaley.com> wrote:
>>  On 07/04/2008, at 11:14 PM, Michael Mühlebach wrote:
>>> I want to create an assembly and deploy it but I have some  
>>> troubles with
>> it.
>>>
>>> I tried it with the command:
>>>
>>> mvn assembly:single deploy
>>>
>>> I got almost what I expected except: All artifacts from my project,
>>> including the one I executed maven for, are snapshot versions! (have
>>> the classifier -SNAPSHOT instead of a build date and number).
>>> What have I done wrong or did I misunderstand the assembly/deploy  
>>> build
>>> cycle?!
>>
>>
>>  I am not sure exactly what you are trying to do, but if you are  
>> trying to
>> create another build artifact (such as a distribution zip or  
>> something) and
>> have it deployed along side your built jars (or whatever) then you  
>> might
>> want to look at the assembly:attached goal.
>>
>>  http://maven.apache.org/plugins/maven-assembly-plugin/attached- 
>> mojo.html

The name of the built assembly is defined by…

http://maven.apache.org/plugins/maven-assembly-plugin/single- 
mojo.html#finalName

That documentation says that the default value for that is $ 
{project.build.finalName} which if you look at the maven model…

http://maven.apache.org/ref/2.0.8/maven-model/ 
maven.html#class_build    (look for finalName)

Is ${artifactId}-${version}. You are building something with a  
version of SNAPSHOT which has special significance with maven projects.

You mention build date and number, there is no reason you couldn't do  
that by specifying the finalName parameter in the configuration of  
your assembly:single execution. Maven doesn't support build numbers  
out of the box (AFAIK), but there is a plugin <http:// 
commons.ucalgary.ca/projects/maven-buildnumber-plugin/ 
introduction.html>.

LD.








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


Re: Use assembly and deploy togeather

Posted by Michael Mühlebach <mm...@gmail.com>.
I tried it with this command but my problem is the created zip file
does not contain the deployed jar file. It still has a -SNAPSHOT
postfix which is quite ugly.


On Tue, Apr 8, 2008 at 1:44 AM, Luke Daley <ld...@ldaley.com> wrote:
>
>
>  On 07/04/2008, at 11:14 PM, Michael Mühlebach wrote:
>
>
> > I want to create an assembly and deploy it but I have some troubles with
> it.
> >
> > I tried it with the command:
> >
> > mvn assembly:single deploy
> >
> > I got almost what I expected except: All artifacts from my project,
> > including the one I executed maven for, are snapshot versions! (have
> > the classifier -SNAPSHOT instead of a build date and number).
> > What have I done wrong or did I misunderstand the assembly/deploy build
> cycle?!
> >
>
>  I am not sure exactly what you are trying to do, but if you are trying to
> create another build artifact (such as a distribution zip or something) and
> have it deployed along side your built jars (or whatever) then you might
> want to look at the assembly:attached goal.
>
>  http://maven.apache.org/plugins/maven-assembly-plugin/attached-mojo.html
>
>  LD.
>  ---------------------------------------------------------------------
>  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: Use assembly and deploy togeather

Posted by Luke Daley <ld...@ldaley.com>.
On 07/04/2008, at 11:14 PM, Michael Mühlebach wrote:

> I want to create an assembly and deploy it but I have some troubles  
> with it.
>
> I tried it with the command:
>
> mvn assembly:single deploy
>
> I got almost what I expected except: All artifacts from my project,
> including the one I executed maven for, are snapshot versions! (have
> the classifier -SNAPSHOT instead of a build date and number).
> What have I done wrong or did I misunderstand the assembly/deploy  
> build cycle?!

I am not sure exactly what you are trying to do, but if you are  
trying to create another build artifact (such as a distribution zip  
or something) and have it deployed along side your built jars (or  
whatever) then you might want to look at the assembly:attached goal.

http://maven.apache.org/plugins/maven-assembly-plugin/attached-mojo.html

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


How should one handle 3rd party libraries in Maven2..

Posted by Arne Styve <as...@offsim.no>.
Hi,

A question I'm sure have been on the mailing-lists before (but I could not
find it) regarding how to handle 3rd party JARs:

I am using some 3rd party JARs which does not exsist in the global Maven2
repository ( http://repo1.maven.org/maven2/). I've found some references on
the web to using "mvn install:install-file" or "mvn deploy:deploy-file" to
add these jars to my repository. The "mvn install:install-file" works OK to
install in my local repository, but when I try installing to our
company-wide repository using "mvn deploy:deploy-file" and an FTP-URL, I get
an error about missing Wagon for FTP.

Ideally, I would have liked to set up a Maven2 project holding the JAR in
question (almost as a source), setting up all I need (groupID, artifactID,
version etc.) in the project pom, and then do "mvn deploy" on the project,
resulting in the correct JAR beeing deployed to our thirdparty repository.
Whenever the thirdparty library changes (new version released etc.), I could
download the new Jar, updated the version in my pom, and do a mvn deploy.
This would mean a maven2 project with no source (java source). Would this
work, and if so, how should I set up such a project ?

..or am I totally on the wrong path here ?

Regards
Arne


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