You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by cbrown <ch...@sensis.com> on 2007/10/04 16:36:11 UTC

problem with profile changing artifact Id and install ignoring it

I create a simple project with;

  mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app

Then I edited the pom, and added the following profile;

   <profiles>
        <profile>
          <activation>
            <os>
              <name>sunos</name>
              <arch>sparc</arch>
            </os>
          </activation>
          <properties>
              <artifactId>my-app-withasuffix</artifactId>
          </properties>
        </profile>
   </profiles>

Then I did a 'mvn install'.  I see something unexpected when the
install:install happens. The jar built in my project workspace is
correctly named, but the install:install changes it to an incorrect
name.  

  [INFO] [jar:jar]
  [INFO] Building
jar: /export/home/cbrown/junk/my-app/target/my-app-withasuffix-1.0-SNAPSHOT.jar
  [INFO] [install:install]
  [INFO]
Installing /export/home/cbrown/junk/my-app/target/my-app-withasuffix-1.0-SNAPSHOT.jar to /export/home/cbrown/.m2/repository/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-SNAPSHOT.jar

Is this a maven bug, or am I missing a nuance of maven?



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


Re: problem with profile changing artifact Id and install ignoring it

Posted by Wayne Fay <wa...@gmail.com>.
You should try <classifier> instead for this kind of functionality.
Not sure if it will change the installed name, but give it a try.

Wayne

On 10/4/07, cbrown <ch...@sensis.com> wrote:
>
> I create a simple project with;
>
>   mvn archetype:create -DgroupId=com.mycompany.app -DartifactId=my-app
>
> Then I edited the pom, and added the following profile;
>
>    <profiles>
>         <profile>
>           <activation>
>             <os>
>               <name>sunos</name>
>               <arch>sparc</arch>
>             </os>
>           </activation>
>           <properties>
>               <artifactId>my-app-withasuffix</artifactId>
>           </properties>
>         </profile>
>    </profiles>
>
> Then I did a 'mvn install'.  I see something unexpected when the
> install:install happens. The jar built in my project workspace is
> correctly named, but the install:install changes it to an incorrect
> name.
>
>   [INFO] [jar:jar]
>   [INFO] Building
> jar: /export/home/cbrown/junk/my-app/target/my-app-withasuffix-1.0-SNAPSHOT.jar
>   [INFO] [install:install]
>   [INFO]
> Installing /export/home/cbrown/junk/my-app/target/my-app-withasuffix-1.0-SNAPSHOT.jar to /export/home/cbrown/.m2/repository/com/mycompany/app/my-app/1.0-SNAPSHOT/my-app-1.0-SNAPSHOT.jar
>
> Is this a maven bug, or am I missing a nuance of maven?
>
>
>
> ---------------------------------------------------------------------
> 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