Whoops.
I just realised even if we can create the .par extension,
maven-install-plugin will not take the generate .par file because the
<packaging>jar</packaging>, nor maven-ear-plugin can handle .par file

 java.lang.IllegalStateException: Could not handle artifact type[par]
        at 
org.apache.maven.plugin.ear.EarModuleFactory.newEarModule(EarModuleFactory.java:61)

I guessed, if approved, in order to tackle this problem properly
maven-install-plugin + maven-ear-plugin needs to be tweaked.

Regards,
Edward Yakop

Note: I just realised that you submit MNG-699 in jira. I apologise to
take initiative to create the JarMojo patch.

On 9/5/05, Edward Yakop <[EMAIL PROTECTED]> wrote:
> Have you look at <DependencyManagement> node?
> Look at
> http://jira.codehaus.org/browse/MNG-743 and download the
> sample-m2-project.jar from the attachement.
> 
> I.E.
>    <dependencyManagement>
>       <dependencies>
>          <dependency>
>              <groupId>net.bzdyl.demo</groupId>
>             <artifactId>demo-par</artifactId>
>             <version>1.0</version>
>          </dependency>
>    </dependencyManagement>
> 
> Note: by default maven-jar-plugins hardcoded the .jar file name
> extension. I don't think it's hard to patch the
> maven-components/maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar/JarMojo.java
> file to suport this feature.
> 
> Regards,
> Edward Yakop
> 
> Note:
> The attached file is a sample implementation of JarMojo.
> 
> To use:
> 0. Check out maven-source tree
>     svn co https://svn.apache.org/repos/asf/maven/components/trunk
> maven-components
>     or follow
>     http://maven.apache.org/maven2/developers/building.html
> 
> 1. Update JarMojo.java
> 
>     Replace the JarMojo.java inside
>    
> maven-components/maven-plugins/maven-jar-plugin/src/main/java/org/apache/maven/plugin/jar
>    and
>    cd maven-components/maven-plugins/maven-jar-plugin ; m2 install
> 
> 2. Replace pom.xml of demo-par dir.
> 
> <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>
>   <parent>
>     <groupId>net.bzdyl.demo</groupId>
>     <artifactId>demo</artifactId>
>     <version>1.0-SNAPSHOT</version>
>   </parent>
>   <groupId>net.bzdyl.demo</groupId>
>   <artifactId>demo-par</artifactId>
>   <version>1.0-SNAPSHOT</version>
>   <packaging>jar</packaging>
>   <build>
>     <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-jar-plugin</artifactId>
>         <configuration>
>           <finalNameExt>par</finalNameExt> <!-- Notice the ext is par -->
>         </configuration>
>       </plugin>
>     </plugins>
>   </build>
>   <dependencies>
>     <dependency>
>       <groupId>javax.persistence</groupId>
>       <artifactId>ejb</artifactId>
>       <version>3.0-public_review</version>
>       <scope>compile</scope>
>     </dependency>
>   </dependencies>
> </project>
> 
> On 9/5/05, Piotr Bzdyl <[EMAIL PROTECTED]> wrote:
> >
> > >>Additional info: Maven 2 revision I used is: 278636.
> > >>
> > >>And one additional question:
> > >>
> > >>Can I specify version in the parent pom and use inherited value in
> > >>subprojects or I have to specify version separately in every pom.xml?
> > >>
> > >>
> > >
> > >You do not have to specify the version in the pom, it will use the one
> > >stated in the <parent> element.
> > >
> > >
> > What about dependencies in the dependent projects, for example:
> > I specify in the parent pom.xml version 2.1. Then what I should write in
> > the demo-ejb pom.xml in the version attribute:
> > <dependency>
> >       <groupId>net.bzdyl.demo</groupId>
> >       <artifactId>demo-par</artifactId>
> >       <version>????????</version>
> >       <type>par</type>
> >       <scope>compile</scope>
> >     </dependency>
> >
> > I would like to use the same version as the demo-ejb version (without
> > specifing it literally).
> >
> > Best regards,
> > Piotrek
> >
> > ---------------------------------------------------------------------
> > 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