On 7/13/10 6:31 AM, Kapila Kohli wrote:
> Hi,
> I am facing an issue in which have settings in pom.xml as
> generate war as default artifactid package, & also generate jar with some
> specific folder set. Once done copy this new jar to some other machine.
> 
> Issue is- once build is done, it calls plugin-build-helper instead of
> calling first mavne-jar-plugin.
> hence build fails since jar doesnt get generated.
> Can anyone suggest?

Maven is doing *exactly* what you are telling it to do. The jar plugin
is bound to a later phase (install) than the build helper plugin (package).

I suspect you want to bind the jar plugin to the package phase.

Justin


> 
> Hence pom.ml is like-
> 
>  <groupId>mmt</groupId>
>                 <artifactId>${artifactname.application}</artifactId>
>                 <packaging>${packaging.application}</packaging>
>                 <version>${version.bus-application}</version>
> 
>  <plugin>
>                                 <groupId>org.apache.maven.plugins</groupId>
>                                 <artifactId>maven-jar-plugin</artifactId>
>                                 <version>2.3</version>
>                                 <executions>
>                                         <execution>
>                                                 <phase>install</phase>
>                                                 <goals>
>                                                         <goal>jar</goal>
>                                                 </goals>
>                                                 <configuration>
>                                                         <includes>
> 
> <include>**/dir/**/*.*</include>
> 
> <include>**/dir/**/*.*</include>
>                                                         </includes>
>                                                 </configuration>
>                                         </execution>
>                                 </executions>
>                         </plugin>
>                         <plugin>
>                                 <groupId>org.codehaus.mojo</groupId>
> 
> <artifactId>build-helper-maven-plugin</artifactId>
>                                 <version>1.3</version>
>                                 <configuration>
>                                         <artifacts>
>                                                 <artifact>
>                                                         <file>
> 
> target/${artifactname.application}-${version.application}.jar
>                                                         </file>
>                                                         <type>jar</type>
>                                                 </artifact>
>                                         </artifacts>
>                                 </configuration>
>                                 <executions>
>                                         <execution>
>                                                 <id>attach-artifacts</id>
>                                                 <phase>package</phase>
>                                                 <goals>
> 
> <goal>attach-artifact</goal>
>                                                 </goals>
>                                         </execution>
>                                 </executions>
>                         </plugin>
>                 </plugins>
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to