you can customize you maven-ear-plugin to provide custom file name for
the jar file to be packaged.

<plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <configuration>
           [...]
           <modules>
             <javaModule>
               <groupId>A</groupId>
               <artifactId>A</artifactId>
               <bundleFileName>A.jar</bundleFileName>
             </javaModule>
          </modules>
        </configuration>
      </plugin>


http://maven.apache.org/plugins/maven-ear-plugin/howto.html

On 4/21/06, RobJac <[EMAIL PROTECTED]> wrote:
>
> I have a project A which i have successfully compiled and packaged. Now when
> i try to run mvn install, it tries to create a jar into my local repository.
> But its appending the version also to the jar file which i really want to
> avoid. For example in the pom.xml of project A file i have given
> <project>
>       <groupId>A</groupId>
>       <artifactId>A</artifactId>
>       <packaging>jar</packaging>
>       <version>1.0</version>
> </project>
>
> So its creating a jar file as A-1.0.jar.  I can avoid the version number
> when
> i execute mvn package by providing
> <build>
>  <finalName>${project.artifactId}</finalName>
> </build>
> in my pom xml for the project A. But when i execute mvn install for the
> project it again places the project-version.jar in my
> localrepository under the following folder path
> <localRepository>/{groupId}/{version}/project-version.jar.
> Due to this I am facing an issue when i am trying to create an EAR by
> including this project. Since all this A project jar is fetched from
> the local repository, thiss jar will be A-{version}.jar. Please let me know
> how i can avoid getting the version number. My EAR pom xml looks like this
>
> <project xmlns="http://maven.apache.org/POM/4.0.0";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd";>
>       <modelVersion>4.0.0</modelVersion>
>       <groupId>DB_EA</groupId>
>       <artifactId>DB_EA</artifactId>
>       <packaging>ear</packaging>
>       <version>1.0</version>
>       <dependencies>
>           <dependency>
>             <groupId>A</groupId>
>             <artifactId>A</artifactId>
>             <version>1.0</version>
>             <type>jar</type>
>           </dependency>
>       </dependencies>
>       <build>
>           <directory>${basedir}</directory>
>           <finalName>${project.artifactId}</finalName>
>           <plugins>
>             <plugin>
>               <groupId>org.apache.maven.plugins</groupId>
>               <artifactId>maven-ear-plugin</artifactId>
>               <configuration>
>               <earSourceDirectory>${basedir}/src</earSourceDirectory>
>                 <archive>
>                   <manifest>
>                     <addClasspath>true</addClasspath>
>                   </manifest>
>                 </archive>
>                 <generateApplicationXml>false</generateApplicationXml>
>               </configuration>
>             </plugin>
>           </plugins>
>       </build>
> </project>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/version-number-to-avoid-when-creating-an-EAR-t1485462.html#a4023054
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to