mirror of https://github.com/apache/archiva.git
[MRM-636] war:inplace usage is not compatible with cobertura
o unpack redback war in target dir o configure jetty plugin to use multiple source dirs o cleaned up clean-plugin config git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@823065 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
94647f519e
commit
8a116d5a94
|
@ -284,82 +284,31 @@
|
||||||
<configuration>
|
<configuration>
|
||||||
<filesets>
|
<filesets>
|
||||||
<fileset>
|
<fileset>
|
||||||
<directory>${basedir}/src/main/webapp</directory>
|
<directory>${basedir}</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<!-- TODO: META-INF shouldn't be required, seems to be an issue with the current war plugin -->
|
<!-- TODO: META-INF shouldn't be required, seems to be an issue with the current war plugin -->
|
||||||
<include>META-INF</include>
|
<include>appserver-base</include>
|
||||||
<include>archiva-applet.jar</include>
|
|
||||||
<include>images/redback</include>
|
|
||||||
<!-- Images from other wars -->
|
|
||||||
<include>template/redback</include>
|
|
||||||
<!-- Templates from other wars -->
|
|
||||||
<include>WEB-INF/classes</include>
|
|
||||||
<!-- Classes and Resources from other wars -->
|
|
||||||
<include>WEB-INF/lib</include>
|
|
||||||
<!-- Dependencies from other wars -->
|
|
||||||
<include>WEB-INF/database</include>
|
|
||||||
<!-- Database location configured in application.xml -->
|
|
||||||
<include>WEB-INF/logs</include>
|
|
||||||
<!-- Log file location specified in application.xml -->
|
|
||||||
<include>redback</include>
|
|
||||||
<!-- plexus-security css and javascript -->
|
|
||||||
<include>css/redback</include>
|
|
||||||
<include>WEB-INF/jsp/redback</include>
|
|
||||||
<!-- plexus-security jsps -->
|
|
||||||
<include>WEB-INF/template/redback</include>
|
|
||||||
<!-- plexus-security xwork templates -->
|
|
||||||
<include>WEB-INF/logs</include>
|
|
||||||
<!-- Directory created by jetty:run -->
|
|
||||||
<include>WEB-INF/temp</include>
|
|
||||||
<!-- Directory created by jetty:run -->
|
|
||||||
</includes>
|
</includes>
|
||||||
</fileset>
|
</fileset>
|
||||||
</filesets>
|
</filesets>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<!-- hack for jetty:run, archiva web config files are checked in /WEB-INF/ dir -->
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
|
||||||
<version>2.0.1</version>
|
|
||||||
<configuration>
|
|
||||||
<!-- Some versions of maven-war-plugin (snapshots) have this incorrectly defaulted to true.
|
|
||||||
Specifically setting this to false to avoid accidental jar file creation. -->
|
|
||||||
<archiveClasses>false</archiveClasses>
|
|
||||||
<dependentWarExcludes>META-INF/**,WEB-INF/web.xml,WEB-INF/classes/xwork.xml,WEB-INF/lib/**</dependentWarExcludes>
|
|
||||||
<warSourceExcludes>WEB-INF/lib/xalan-*.jar,WEB-INF/lib/velocity-dep-*.jar,WEB-INF/lib/xml-apis-*.jar,WEB-INF/lib/wstx-asl-*.jar,WEB-INF/lib/stax-utils-*.jar,WEB-INF/lib/xercesImpl-*.jar</warSourceExcludes>
|
|
||||||
</configuration>
|
|
||||||
<!-- TODO: would be good to make the jetty plugin aware of these and remove the below -->
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<phase>compile</phase>
|
|
||||||
<goals>
|
|
||||||
<!-- Needed to get the plexus-security war overlay to do its thing before jetty:run -->
|
|
||||||
<goal>inplace</goal>
|
|
||||||
</goals>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
<!--
|
|
||||||
here's a hack to prevent multiple struts core and same struts.xml in classpath
|
|
||||||
which prevent struts start
|
|
||||||
-->
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-antrun-plugin</artifactId>
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>cleanup-struts-jar-in-webapp</id>
|
<id>copy-web-config-files</id>
|
||||||
<phase>compile</phase>
|
|
||||||
<goals>
|
<goals>
|
||||||
<goal>run</goal>
|
<goal>run</goal>
|
||||||
</goals>
|
</goals>
|
||||||
|
<phase>compile</phase>
|
||||||
<configuration>
|
<configuration>
|
||||||
<tasks>
|
<tasks>
|
||||||
<delete includeemptydirs="true">
|
<mkdir dir="${basedir}/target/archiva/WEB-INF/"/>
|
||||||
<fileset dir="${basedir}/src/main/webapp/WEB-INF/lib" includes="struts2*.jar" />
|
<copy todir="${basedir}/target/archiva/WEB-INF/">
|
||||||
</delete>
|
<fileset dir="${basedir}/target" includes="classes/" excludes="**/struts.xml"/>
|
||||||
<delete includeemptydirs="true">
|
</copy>
|
||||||
<fileset dir="${basedir}/src/main/webapp/WEB-INF/classes" includes="struts.xml,struts-security.xml" />
|
|
||||||
</delete>
|
|
||||||
</tasks>
|
</tasks>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
@ -378,18 +327,56 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<artifactId>maven-dependency-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>unpack-redback-war</id>
|
||||||
|
<goals>
|
||||||
|
<goal>unpack</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>compile</phase>
|
||||||
|
<configuration>
|
||||||
|
<artifactItems>
|
||||||
|
<artifactItem>
|
||||||
|
<groupId>org.codehaus.redback</groupId>
|
||||||
|
<artifactId>redback-struts2-content</artifactId>
|
||||||
|
<version>${redback.version}</version>
|
||||||
|
<type>war</type>
|
||||||
|
<overWrite>false</overWrite>
|
||||||
|
<outputDirectory>${project.build.directory}/redback</outputDirectory>
|
||||||
|
<excludes>**/struts-security.xml</excludes>
|
||||||
|
</artifactItem>
|
||||||
|
</artifactItems>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
|
<version>2.0.1</version>
|
||||||
|
<configuration>
|
||||||
|
<!-- Some versions of maven-war-plugin (snapshots) have this incorrectly defaulted to true.
|
||||||
|
Specifically setting this to false to avoid accidental jar file creation. -->
|
||||||
|
<archiveClasses>false</archiveClasses>
|
||||||
|
<dependentWarExcludes>META-INF/**,WEB-INF/web.xml,WEB-INF/classes/xwork.xml,WEB-INF/lib/**</dependentWarExcludes>
|
||||||
|
<warSourceExcludes>WEB-INF/lib/xalan-*.jar,WEB-INF/lib/velocity-dep-*.jar,WEB-INF/lib/xml-apis-*.jar,WEB-INF/lib/wstx-asl-*.jar,WEB-INF/lib/stax-utils-*.jar,WEB-INF/lib/xercesImpl-*.jar</warSourceExcludes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.mortbay.jetty</groupId>
|
<groupId>org.mortbay.jetty</groupId>
|
||||||
<artifactId>maven-jetty-plugin</artifactId>
|
<artifactId>maven-jetty-plugin</artifactId>
|
||||||
<version>6.1.14</version>
|
<version>${jetty.version}</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
|
||||||
<contextPath>/</contextPath>
|
|
||||||
<jettyEnvXml>src/jetty-env.xml</jettyEnvXml>
|
|
||||||
<webAppConfig>
|
<webAppConfig>
|
||||||
<contextPath>/</contextPath>
|
<contextPath>/</contextPath>
|
||||||
<jettyEnvXmlFile>src/jetty-env.xml</jettyEnvXmlFile>
|
<baseResource implementation="org.mortbay.resource.ResourceCollection">
|
||||||
|
<resourcesAsCSV>src/main/webapp,target/archiva,target/redback</resourcesAsCSV>
|
||||||
|
</baseResource>
|
||||||
</webAppConfig>
|
</webAppConfig>
|
||||||
|
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||||
|
<jettyEnvXml>src/jetty-env.xml</jettyEnvXml>
|
||||||
<connectors>
|
<connectors>
|
||||||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||||
<port>9091</port>
|
<port>9091</port>
|
||||||
|
|
Loading…
Reference in New Issue