maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Porter (JIRA)" <>
Subject [jira] Closed: (MNG-3923) Executions do not pick up configurations per execution element (except for the first one)
Date Sat, 20 Dec 2008 11:34:19 GMT


Brett Porter closed MNG-3923.

      Assignee: Brett Porter
    Resolution: Not A Bug

the jar is created in the main lifecycle, and the second execution is recreating it. However,
the JAR is up to date, so nothing is done.

Instead, add:
<forceCreation>true</forceCreation> to the second version.

Or, you can add the manifest creation to the main plugin configuration, though you'll need
to unset that for the extra execution.

> Executions do not pick up configurations per execution element (except for the first
> -----------------------------------------------------------------------------------------
>                 Key: MNG-3923
>                 URL:
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Artifacts and Repositories, General, Plugins and Lifecycle, POM
>    Affects Versions: 2.0.9
>         Environment: Windows XP SP2, Java
>            Reporter: Costin Caraivan
>            Assignee: Brett Porter
>            Priority: Minor
> I'm running a
> mvn clean install -Dintegration (I have a profile which is activated by the property
named "integration").
> I wanted to set 2 different configuration sections in 2 different execution sections
for the jar plugin, because I need to make a jar and embed it in another jar (PS: I know it's
not exactly kosher, but due to various limitations it's the only solutions I could use). So
I make 2 jars at different lifecycle phases:
> <!-- Make the jar out of the compiled classes. Must be done BEFORE packaging, so it
can be included in the greater jar. -->
>               <plugins>
>                     <plugin>
>                         <groupId>org.apache.maven.plugins</groupId>
>                         <artifactId>maven-jar-plugin</artifactId>
>                         <executions>
>                             <execution>
>                                 <id>jar-classes</id>
>                                 <!-- The jaring must be done at the compile phase,
so we can have the jar ready for packaging in the greater jar. -->
>                                 <phase>compile</phase>
>                                 <configuration>
>                                     <outputDirectory>${}</outputDirectory>
>                                     <finalName>external</finalName>
>                                 </configuration>
>                                 <goals>
>                                     <goal>jar</goal>
>                                 </goals>
>                             </execution>
>                             <execution>
>                                 <id>jar-all</id>
>                                 <!-- This is the greater jar: classes jar + resources.
>                                 <phase>package</phase>
>                                 <!-- This configuration section is ignored (bug? my
error?) -->
>                                 <configuration>
>                                     <archive>
>                                         <manifestFile>${basedir}/META-INF/MANIFEST.MF</manifestFile>
>                                     </archive>
>                                 </configuration>
>                                 <goals>
>                                     <goal>jar</goal>
>                                     <goal>sign</goal>
>                                 </goals>
>                             </execution>
>                         </executions>
>                     </plugin>
> However, the second jar does not get the required manifest - ergo, the configuration
does not work. I worked around it by calling the plugin twice, but I don't think this is correct
(if the configuration can be placed there, i presume that you should be able to configure
each execution separately). The first jar is ok, so its configuration is picked up.
> Regards.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message