commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [ALL] Specification version
Date Fri, 18 Jun 2010 11:02:44 GMT
On 18/06/2010, Jörg Schaible <joerg.schaible@gmx.de> wrote:
> Guys,
>
>  since Sebb is going to modify the parent pom, I want also have your opinion
>  about the current values of the Specification-Version in the manifests.
>  Currently Maven generates uses the current version of the artifact for
>  "Specification-Version" and "Implementation-Version" i.e. "<Major>.<Minor>-
>  SNAPSHOT" in case of a snapshot or "<Major.Minor>" for the standard release.
>  However, in case of a bugfix release, this version is
>  "<Major>.<Minor>.<Patch>". The ideal situation would be IMHO that
we have
>  the "Specification-Version" always using "<Major>.<Minor>" while the
>  "Implementation-Version" should stay the exact version that Maven is using.
>
>  This can be achieved from the parent pom using the build-helper-maven plugin
>  and a proper configuration of the "archive" configuration element of e.g.
>  the jar plugin:
>
>  ============= %< =============
>  ...
>  <build>
>   <pluginManagement>
>     <plugin>
>       <groupId>org.codehaus.mojo</groupId>
>       <artifactId>build-helper-maven-plugin</artifactId>
>       <version>1.5</version>
>       <extensions>true</extensions>
>     </plugin>
>     <plugin>
>       <groupId>org.apache.maven.plugins</groupId>
>       <artifactId>maven-jar-plugin</artifactId>
>       <version>2.3.1</version>
>       <configuration>
>         <archive>
>           <manifest>
>             <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
>             <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
>           </manifest>
>           <manifestEntries>
>             <Specification-Version>${project.info.majorVersion}.
>  ${project.info.minorVersion}</Specification-Version>
>             // other useful additional entries e.g.:
>             <X-Compile-Source>${java.version.source}</X-Compile-Source>
>             <X-Compile-Target>${java.version.target}</X-Compile-Target>
>             <X-Builder>Maven ${maven.version}</X-Builder>
>             <X-BuildTime>${maven.build.timestamp}</X-BuildTime>
>           </manifestEntries>
>         </archive>
>       </configuration>
>     </plugin>
>     ...
>   </pluginManagement>
>   ...
>   <plugins>
>     <plugin>
>       <groupId>org.codehaus.mojo</groupId>
>       <artifactId>build-helper-maven-plugin</artifactId>
>       <executions>
>         <execution>
>           <id>versions</id>
>           <phase>generate-resources</phase>
>           <goals>
>             <goal>maven-version</goal>
>             <goal>parse-version</goal>
>           </goals>
>           <configuration>
>             <propertyPrefix>project.info</propertyPrefix>
>           </configuration>
>         </execution>
>       </executions>
>     </plugin>
>     ...
>   </plugins>
>  </build>
>  ============= %< =============
>
>  What do you think?

Makes sense to me.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message