Hello,

I want to include the revisionNumber and the timestamp in a human-readable
form in the manifest-file. http://jira.codehaus.org/browse/MOJO-988 states
that this is possible with the buildnumber-maven-plugin using timestampFormat
instead of format. Does anyone know how to use it? The following doesn't
work:

                <plugins>
                        <plugin>
                                <groupId>org.codehaus.mojo</groupId>
                                <artifactId>
                                        buildnumber-maven-plugin
                                </artifactId>
                                <configuration>
                                        <timestampFormat>
                                                {0,date,yyyy-MM-dd}
                                        </timestampFormat>
                                </configuration>
                                <executions>
                                        <execution>
                                                <phase>validate</phase>
                                                <goals>
                                                        <goal>create</goal>
                                                </goals>
                                        </execution>
                                </executions>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-jar-plugin</artifactId>
                                <configuration>
                                        <archive>
                                                <manifest>
        
<addClasspath>true</addClasspath>
        
<addDefaultSpecificationEntries>
                                                                true
        
</addDefaultSpecificationEntries>
        
<addDefaultImplementationEntries>
                                                                true
        
</addDefaultImplementationEntries>
                                                </manifest>
                                                <manifestEntries>
        
<SCM-Revision>${buildNumber}</SCM-Revision>
        
<Build-Date>${timestamp}</Build-Date>
                                                </manifestEntries>
                                        </archive>
                                </configuration>
                        </plugin>
                </plugins>

I get these entries in the manifest-file:
Build-Date: 1231859661271
SCM-Revision: 231958

Regards,
Franziska


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

Reply via email to