Jeff Thomas created AXIS2-5784:
----------------------------------
Summary: Maven: Module 'axis2-webapp' generate "-classes.jar"
during execution of maven-war-plugin
Key: AXIS2-5784
URL: https://issues.apache.org/jira/browse/AXIS2-5784
Project: Axis2
Issue Type: Wish
Affects Versions: 1.7.3
Reporter: Jeff Thomas
Priority: Trivial
Fix For: 1.7.4, 1.8.0
I am currently using the Maven WAR overlays to generate WAR files with the
content from 'axis2-webapp'.
For example:
{code:xml}
<!-- Axis2 WebApp overlay WAR. -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-webapp</artifactId>
<version>${axis2.version}</version>
<type>war</type>
<scope>provided</scope>
</dependency>
...
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
...
<overlays>
<overlay>
<!-- overlay WAR 'axis2-webapp' - standard Axis2 JSPs/Servlet clasess
and other stuff. -->
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-webapp</artifactId>
<includes>
<include>axis2-web/**</include>
<include>WEB-INF/classes/org/apache/axis2/**</include>
<include>WEB-INF/include/**</include>
<include>WEB-INF/tags/**</include>
<include>WEB-INF/views/**</include>
</includes>
</overlay>
</overlays>
...
</configuration>
</plugin>
{code}
In my WARs *web.xml* I have also defined the AxisAdminServlet:
{code:xml}
<servlet>
<servlet-name>AxisAdminServlet</servlet-name>
<servlet-class>org.apache.axis2.webapp.AxisAdminServlet</servlet-class>
<load-on-startup>100</load-on-startup>
</servlet>
{code}
In the development environment, the AxisAdminServlet class is shown as not
found (because it is only added during the build phase).
In my patched version of 'axis2-webapp' I have added the following line to the
maven-war-plugin to generate a 'axis2-webapp-1.7.3-classes.jar':
{code:xml}
<attachClasses>true</attachClasses>
{code}
Thus I can add the following dependency to my POM and resolve the missing
classes (provided so that it is not added to the WAR):
{code:xml}
<!-- Axis2 WebApp overlay WAR. -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-webapp</artifactId>
<version>${axis2.version}</version>
<type>jar</type>
<classifier>classes</classifier>
<scope>provided</scope>
</dependency>
{code}
My *wish* would be that the "-classes.jar" be part of the standard build so
that I don't need to patch the 'axis2-webapp' POM in the future :).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]