Take a look at the BuildNumber[1] plugin

The date will be the timestamp of the actual file - do you need to get this or 
can you use the file time?

/James

[1] http://mojo.codehaus.org/buildnumber-maven-plugin/

-----Original Message-----
From: Ron Wheeler [mailto:[email protected]]
Sent: 20 August 2010 13:07
To: [email protected]
Subject: Re: Getting a useful Manifest

  PluginManagement works well.
It took a lot of trial and error to get a working split between the
information in the parent's plug-in management and the module's plug-in
description.

There are 2 things that I would like to add.
The first is the date that the manifest was made.
The second is the SCM (subversion in my case) version number.

Any ideas about how to get those into the Manifest?

This is the current setup that works
I put the following in the Parent POM
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>

<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>
                                         jar-with-dependencies
</descriptorRef>
</descriptorRefs>

</configuration>
</execution>
</executions>
</plugin>

</plugins>
</pluginManagement>

and the following in the module
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
</plugin>
</plugins>
</build>

This produced a nice MANIFEST.MF with the following:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: rwheeler
Build-Jdk: 1.6.0_17
Specification-Title: Spring
Specification-Version: 1.9.1
Specification-Vendor: Artifact Software
Implementation-Title: Spring
Implementation-Version: 1.9.1
Implementation-Vendor-Id: com.artifact_software.lms
Implementation-Vendor: Artifact Software





On 19/08/2010 4:08 PM, Ron Wheeler wrote:
>  The instructions worked beautifully.
>
> Now I have a lot of POMS to modify unless I can add something to my
> parent pom that will modify the plug-ins in my module poms.
> In my modules I have this:
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.2-beta-2</version>
> <executions>
> <execution>
> <id>create-Jasper-jar</id>
> <phase>package</phase>
> <goals>
> <goal>single</goal>
> </goals>
> <configuration>
> <descriptorRefs>
> <descriptorRef>
>                       jar-with-dependencies
> </descriptorRef>
> </descriptorRefs>
> </configuration>
> </execution>
> </executions>
> </plugin>
> I would like it to include :
> <archive>
> <manifest>
> <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
> <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
> </manifest>
> </archive>
> to effectively become this:
> <artifactId>maven-assembly-plugin</artifactId>
> <version>2.2-beta-2</version>
> <executions>
> <execution>
> <phase>package</phase>
> <goals>
> <goal>single</goal>
> </goals>
> <configuration>
> <archive>
> <manifest>
> <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
> <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
> </manifest>
> </archive>
> <descriptorRefs>
> <descriptorRef>
>                       jar-with-dependencies
> </descriptorRef>
> </descriptorRefs>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> Any way to get the parent pom to supply a bit of the plug-in
> configuration?
>
>
> On 19/08/2010 11:43 AM, Anders Hammar wrote:
>> But you'll file a ticket to get this fixed, right?
>>
>> /Anders (mobile)
>>
>> Den 2010 8 19 17:36 skrev "Ron Wheeler"<[email protected]>:
>>> http://maven.apache.org/shared/maven-archiver/examples/manifest.html
>>> Has a better description of how the mapping is done.
>>>
>>> Not sure why
>>> http://maven.apache.org/guides/mini/guide-manifest.html
>>> does not provide a link.
>>>
>
>
> ---------------------------------------------------------------------
> 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]



**************************************************************************************
This message is confidential and intended only for the addressee. If you have 
received this message in error, please immediately notify the 
[email protected] and delete it from your system as well as any copies. The 
content of e-mails as well as traffic data may be monitored by NDS for 
employment and security purposes. To protect the environment please do not 
print this e-mail unless necessary.

NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, 
United Kingdom. A company registered in England and Wales. Registered no. 
3080780. VAT no. GB 603 8808 40-00
**************************************************************************************

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

Reply via email to