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
|
@ -281,85 +281,34 @@
|
|||
<artifactId>maven-clean-plugin</artifactId>
|
||||
<version>2.1.1</version>
|
||||
<!-- This configuration is added to cleanup from war:inplace -->
|
||||
<configuration>
|
||||
<configuration>
|
||||
<filesets>
|
||||
<fileset>
|
||||
<directory>${basedir}/src/main/webapp</directory>
|
||||
<directory>${basedir}</directory>
|
||||
<includes>
|
||||
<!-- TODO: META-INF shouldn't be required, seems to be an issue with the current war plugin -->
|
||||
<include>META-INF</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 -->
|
||||
<include>appserver-base</include>
|
||||
</includes>
|
||||
</fileset>
|
||||
</filesets>
|
||||
</configuration>
|
||||
</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>
|
||||
<!-- 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
|
||||
-->
|
||||
<!-- hack for jetty:run, archiva web config files are checked in /WEB-INF/ dir -->
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>cleanup-struts-jar-in-webapp</id>
|
||||
<phase>compile</phase>
|
||||
<id>copy-web-config-files</id>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<phase>compile</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}/src/main/webapp/WEB-INF/lib" includes="struts2*.jar" />
|
||||
</delete>
|
||||
<delete includeemptydirs="true">
|
||||
<fileset dir="${basedir}/src/main/webapp/WEB-INF/classes" includes="struts.xml,struts-security.xml" />
|
||||
</delete>
|
||||
<mkdir dir="${basedir}/target/archiva/WEB-INF/"/>
|
||||
<copy todir="${basedir}/target/archiva/WEB-INF/">
|
||||
<fileset dir="${basedir}/target" includes="classes/" excludes="**/struts.xml"/>
|
||||
</copy>
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
@ -378,18 +327,56 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</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>
|
||||
<groupId>org.mortbay.jetty</groupId>
|
||||
<artifactId>maven-jetty-plugin</artifactId>
|
||||
<version>6.1.14</version>
|
||||
<version>${jetty.version}</version>
|
||||
<configuration>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<contextPath>/</contextPath>
|
||||
<jettyEnvXml>src/jetty-env.xml</jettyEnvXml>
|
||||
<webAppConfig>
|
||||
<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>
|
||||
<scanIntervalSeconds>10</scanIntervalSeconds>
|
||||
<jettyEnvXml>src/jetty-env.xml</jettyEnvXml>
|
||||
<connectors>
|
||||
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
|
||||
<port>9091</port>
|
||||
|
|
Loading…
Reference in New Issue