[ 
https://issues.apache.org/jira/browse/ISIS-360?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13597030#comment-13597030
 ] 

Dan Haywood commented on ISIS-360:
----------------------------------

Implemented.  To get build properties to be added to the WARs manifest, add the 
following to the pom.xml of the webapp project:
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.5</version>
                  <executions>
                    <execution>
                      <phase>validate</phase>
                      <goals>
                        <goal>maven-version</goal>
                      </goals>
                    </execution>
                  </executions>
            </plugin>

            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>false</addClasspath>
                        </manifest>                            
                        <manifestEntries>
                            <Build-Time>${maven.build.timestamp}</Build-Time>
                            <Build-Host>${agent.name}</Build-Host>
                            <Build-User>${user.name}</Build-User>
                            <Build-Maven>Maven ${maven.version}</Build-Maven>
                            <Build-Java>${java.version}</Build-Java>
                            <Build-OS>${os.name}</Build-OS>
                            <Build-Label>${project.version}</Build-Label>
                        </manifestEntries>
                    </archive>
                </configuration>

In addition, in the QuickStart Application class, add the following new binding:

                
bind(InputStream.class).annotatedWith(Names.named("metaInfManifest")).toProvider(Providers.of(getServletContext().getResourceAsStream("/META-INF/MANIFEST.MF")));

Finally, you will find that the above line highlights a (previously unknown) 
incompatibility between DN enhancer - which uses ASM 4.0.0 - and guice - which 
uses ASM 3.3.1.  The enhancer is only meant to be used in a dev build, and so 
should be excluded from the webapp's classpath.  This can be done by adding:

            <exclusions>
                <exclusion>
                    <!-- so don't pick up transitive dependency to asm 4.0.0, 
which is
                         incompatible with asm 3.3.1 as used by guice -->
                    <groupId>org.datanucleus</groupId>
                    <artifactId>datanucleus-enhancer</artifactId>
                </exclusion>
            </exclusions>
 
to the <dependency> entries for each of the XXX-dom, XXX-fixture and 
XXX-objstore-jdo dependencies in the webapp pom.xml.
                
> About page on wicket viewer should show version, build number and other 
> details.
> --------------------------------------------------------------------------------
>
>                 Key: ISIS-360
>                 URL: https://issues.apache.org/jira/browse/ISIS-360
>             Project: Isis
>          Issue Type: New Feature
>          Components: Core, Viewer: Wicket
>    Affects Versions: archetype-wrj-1.0.2, viewer-wicket-1.1.0, core-1.1.0
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>            Priority: Minor
>             Fix For: archetype-wrj-1.0.3, viewer-wicket-1.2.0, core-1.2.0
>
>
> Search for the META-INF/MANIFEST.MF of the war (if available) and look for 
> attribute keys to represent the version.  For example, use 
> "Implementation-Version" if present, else use "Build-Time" and so forth.  
> Print out all other attributes in detail.
> If the MANIFEST.MF is not available (as would be the case if running from an 
> IDE), then omit.
> In addition, dump  out the manifest attribute of all other JAR files on the 
> manifest, as detail.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to