You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Pete <pe...@gmail.com> on 2005/11/10 23:58:49 UTC

M2 : mvn deploy to remote repository artifacts have timestamp

I have a common jar artifact that I have built and now want to deploy
to my company's remote repository, so I tried :-

mvn deploy

and saw that I needed to add :-

	<distributionManagement>
		<snapshotRepository>
			<id>remote_repository</id>
			<name>remote_repository Repository</name>
			<url>file:///server/remote/.m2/repository</url>
		</snapshotRepository>
	</distributionManagement>

to the parent pom.xml . ok

All works fine but then I look in the remote repository I see

\1.0-SNAPSHOT
     Common-1.0-20051110.221828-1.jar
     Common-1.0-20051110.221828-1.pom

with timestamps on the jar names etc.

I want to share this jar as either
1.0-SNAPSHOT  or
1.0

Am I taking the wrong approach ? What is deploy for ?
Should I be using mvn release ?
I thought I could get away with the more simplistic deploy (to remote repo) ?

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


Re: M2 : mvn deploy to remote repository artifacts have timestamp

Posted by John Casey <jd...@commonjava.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

BTW, before you perform an actual release, you can still share these
deployed snapshot artifacts. Maven uses a metadata file in the
repository to maintain a logical pointer for what 1.0-SNAPSHOT actually
refers to on that repository, and when it was last updated. This allows
your users to have:

<dependency>
~  <groupId>com.yourco.yourapp</groupId>
~  <artifactId>your-artifact</artifactId>
~  <version>1.0-SNAPSHOT</version>
</dependency>

and Maven will resolve it to one of those timestamped artifacts on the
remote repository, using that metadata file. When you release, it will
require that you (a) not depend on any SNAPSHOT versions, and (b) not
have -SNAPSHOT in the released version number...at least, if you use the
release plugin, it will.

HTH,

john

Pete wrote:
| cheers Trent, thats very useful.
|
| I need to start investigating how to do a release using CVS now...
|
| On 11/11/05, Trent Rosenbaum <tr...@gmail.com> wrote:
|
|>Hi there,
|>
|>The deploy stage of the maven build life cycle is focused on the
|>delivery of the artifact into a
|>repository for other users, so in one sense you are going in the right
|>direction.  The maven-release plugin is focused on the preparation and
|>the creation/delivery of a more offical release of a project artifact.
|> By using SNAPSHOT designator you are indecating that your project is
|>in a state of development.  The time stamps allow others to understand
|>which is the latest instance of your artifact.
|>
|>Below you have you mentioned that you would be happy with your
|>artifact being called common-1.0.jar.  You could modify your pom.xml
|>and remove the SNAPSHOT designator and then use deploy, I beleive this
|>would send the correctly named artifact to the remote repository.  I
|>would not do this in a company environment, instead I would use the
|>maven-release plugin when version 1.0 is ready to be released.  This
|>would allow me to update the SCM and then others in my company could
|>always recreate it and investigate any potential issues.  The plugin
|>would then modify the pom.xml to allow me to work on the next version,
|>(for example 2.0-SNAPSHOT).
|>
|>I hope I have not gone over board and this helps.
|>
|>Trent
|>
|>
|>On 10/11/05, Pete <pe...@gmail.com> wrote:
|>
|>>I have a common jar artifact that I have built and now want to deploy
|>>to my company's remote repository, so I tried :-
|>>
|>>mvn deploy
|>>
|>>and saw that I needed to add :-
|>>
|>>        <distributionManagement>
|>>                <snapshotRepository>
|>>                        <id>remote_repository</id>
|>>                        <name>remote_repository Repository</name>
|>>                        <url>file:///server/remote/.m2/repository</url>
|>>                </snapshotRepository>
|>>        </distributionManagement>
|>>
|>>to the parent pom.xml . ok
|>>
|>>All works fine but then I look in the remote repository I see
|>>
|>>\1.0-SNAPSHOT
|>>     Common-1.0-20051110.221828-1.jar
|>>     Common-1.0-20051110.221828-1.pom
|>>
|>>with timestamps on the jar names etc.
|>>
|>>I want to share this jar as either
|>>1.0-SNAPSHOT  or
|>>1.0
|>>
|>>Am I taking the wrong approach ? What is deploy for ?
|>>Should I be using mvn release ?
|>>I thought I could get away with the more simplistic deploy (to remote
repo) ?
|>>
|>>---------------------------------------------------------------------
|>>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
|
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDdMZhK3h2CZwO/4URAj+tAJwKvxC3BaDdLIOY8TVcuQJnJmg/UQCffnPr
BUVEV6Q8ANLhDVkeQbPMQJI=
=Waiu
-----END PGP SIGNATURE-----

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


Re: M2 : mvn deploy to remote repository artifacts have timestamp

Posted by Pete <pe...@gmail.com>.
cheers Trent, thats very useful.

I need to start investigating how to do a release using CVS now...

On 11/11/05, Trent Rosenbaum <tr...@gmail.com> wrote:
> Hi there,
>
> The deploy stage of the maven build life cycle is focused on the
> delivery of the artifact into a
> repository for other users, so in one sense you are going in the right
> direction.  The maven-release plugin is focused on the preparation and
> the creation/delivery of a more offical release of a project artifact.
>  By using SNAPSHOT designator you are indecating that your project is
> in a state of development.  The time stamps allow others to understand
> which is the latest instance of your artifact.
>
> Below you have you mentioned that you would be happy with your
> artifact being called common-1.0.jar.  You could modify your pom.xml
> and remove the SNAPSHOT designator and then use deploy, I beleive this
> would send the correctly named artifact to the remote repository.  I
> would not do this in a company environment, instead I would use the
> maven-release plugin when version 1.0 is ready to be released.  This
> would allow me to update the SCM and then others in my company could
> always recreate it and investigate any potential issues.  The plugin
> would then modify the pom.xml to allow me to work on the next version,
> (for example 2.0-SNAPSHOT).
>
> I hope I have not gone over board and this helps.
>
> Trent
>
>
> On 10/11/05, Pete <pe...@gmail.com> wrote:
> > I have a common jar artifact that I have built and now want to deploy
> > to my company's remote repository, so I tried :-
> >
> > mvn deploy
> >
> > and saw that I needed to add :-
> >
> >         <distributionManagement>
> >                 <snapshotRepository>
> >                         <id>remote_repository</id>
> >                         <name>remote_repository Repository</name>
> >                         <url>file:///server/remote/.m2/repository</url>
> >                 </snapshotRepository>
> >         </distributionManagement>
> >
> > to the parent pom.xml . ok
> >
> > All works fine but then I look in the remote repository I see
> >
> > \1.0-SNAPSHOT
> >      Common-1.0-20051110.221828-1.jar
> >      Common-1.0-20051110.221828-1.pom
> >
> > with timestamps on the jar names etc.
> >
> > I want to share this jar as either
> > 1.0-SNAPSHOT  or
> > 1.0
> >
> > Am I taking the wrong approach ? What is deploy for ?
> > Should I be using mvn release ?
> > I thought I could get away with the more simplistic deploy (to remote repo) ?
> >
> > ---------------------------------------------------------------------
> > 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: M2 : mvn deploy to remote repository artifacts have timestamp

Posted by Trent Rosenbaum <tr...@gmail.com>.
Hi there,

The deploy stage of the maven build life cycle is focused on the
delivery of the artifact into a
repository for other users, so in one sense you are going in the right
direction.  The maven-release plugin is focused on the preparation and
the creation/delivery of a more offical release of a project artifact.
 By using SNAPSHOT designator you are indecating that your project is
in a state of development.  The time stamps allow others to understand
which is the latest instance of your artifact.

Below you have you mentioned that you would be happy with your
artifact being called common-1.0.jar.  You could modify your pom.xml
and remove the SNAPSHOT designator and then use deploy, I beleive this
would send the correctly named artifact to the remote repository.  I
would not do this in a company environment, instead I would use the
maven-release plugin when version 1.0 is ready to be released.  This
would allow me to update the SCM and then others in my company could
always recreate it and investigate any potential issues.  The plugin
would then modify the pom.xml to allow me to work on the next version,
(for example 2.0-SNAPSHOT).

I hope I have not gone over board and this helps.

Trent


On 10/11/05, Pete <pe...@gmail.com> wrote:
> I have a common jar artifact that I have built and now want to deploy
> to my company's remote repository, so I tried :-
>
> mvn deploy
>
> and saw that I needed to add :-
>
>         <distributionManagement>
>                 <snapshotRepository>
>                         <id>remote_repository</id>
>                         <name>remote_repository Repository</name>
>                         <url>file:///server/remote/.m2/repository</url>
>                 </snapshotRepository>
>         </distributionManagement>
>
> to the parent pom.xml . ok
>
> All works fine but then I look in the remote repository I see
>
> \1.0-SNAPSHOT
>      Common-1.0-20051110.221828-1.jar
>      Common-1.0-20051110.221828-1.pom
>
> with timestamps on the jar names etc.
>
> I want to share this jar as either
> 1.0-SNAPSHOT  or
> 1.0
>
> Am I taking the wrong approach ? What is deploy for ?
> Should I be using mvn release ?
> I thought I could get away with the more simplistic deploy (to remote repo) ?
>
> ---------------------------------------------------------------------
> 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