Details
-
Wish
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
1.7.3
-
None
-
None
Description
I am currently using the Maven WAR overlays to generate WAR files with the content from 'axis2-webapp'.
For example:
<!-- 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>
In my WARs web.xml I have also defined the AxisAdminServlet:
<servlet> <servlet-name>AxisAdminServlet</servlet-name> <servlet-class>org.apache.axis2.webapp.AxisAdminServlet</servlet-class> <load-on-startup>100</load-on-startup> </servlet>
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':
<attachClasses>true</attachClasses>
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):
<!-- 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>
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 .