You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Maven Yu <ma...@gmail.com> on 2010/12/16 21:42:28 UTC

Maven-install artifact version

Hi all,
I know maven install command is to upload your artifact to local repository.
However, I have a question on the version of the artifact.
By default, the version is defined in
<project><version></version></project>.
Is it possible to override this in profiles?

What I tried

<profile>
   <id>release</id>
   <build>
          <finalName>${project.artifactId}-1.0<finalName>
    </build>
  </profile>

but this will only create a "myproject-1.0.jar" in my target directory. Once
it is istalled, it becomes "myproject-1.0-1.0-SNAPSHOT.jar".

Does anyone know how can I specify the version number for installed jar in
profile?


Thanks
David

Re: Maven-install artifact version

Posted by Anders Hammar <an...@hammar.net>.
You can't.

/Anders (mobile)
Den 16 dec 2010 21.42 skrev "Maven Yu" <ma...@gmail.com>:
> Hi all,
> I know maven install command is to upload your artifact to local
repository.
> However, I have a question on the version of the artifact.
> By default, the version is defined in
> <project><version></version></project>.
> Is it possible to override this in profiles?
>
> What I tried
>
> <profile>
> <id>release</id>
> <build>
> <finalName>${project.artifactId}-1.0<finalName>
> </build>
> </profile>
>
> but this will only create a "myproject-1.0.jar" in my target directory.
Once
> it is istalled, it becomes "myproject-1.0-1.0-SNAPSHOT.jar".
>
> Does anyone know how can I specify the version number for installed jar in
> profile?
>
>
> Thanks
> David