Merge pull request #1331 from tdonohue/DS-2437

DS-2437:  Ensure all webapps unpack "additions" into their WEB-INF/classes
This commit is contained in:
Tim Donohue
2016-03-23 14:57:30 -05:00
7 changed files with 298 additions and 37 deletions

View File

@@ -41,6 +41,31 @@
<build>
<plugins>
<!-- Unpack the "additions" module into our target directory,
so that any custom classes in that module can be included
into this WAR's WEB-INF/classes (see maven-war-plugin below). -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>org.dspace.modules</includeGroupIds>
<includeArtifactIds>additions</includeArtifactIds>
<!--NOTE: by default this will also unpack transitive dependencies. To disable, uncomment this next line:
<excludeTransitive>true</excludeTransitive>
-->
<outputDirectory>${project.build.directory}/additions</outputDirectory>
<excludes>META-INF/**</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
@@ -48,6 +73,16 @@
<archiveClasses>false</archiveClasses>
<!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<!-- Copy any 'additions' (see m-dependency-p above) into WEB-INF/classes.
This ensures they are loaded prior to dependencies in WEB-INF/lib
(per Servlet 3.0 spec, section 10.5), and allows them to override
default classes in this WAR -->
<webResources>
<resource>
<directory>${project.build.directory}/additions</directory>
<targetPath>WEB-INF/classes</targetPath>
</resource>
</webResources>
<overlays>
<overlay />
<overlay>
@@ -93,4 +128,4 @@
</dependency>
</dependencies>
</project>
</project>

View File

@@ -23,6 +23,31 @@
<build>
<plugins>
<!-- Unpack the "additions" module into our target directory,
so that any custom classes in that module can be included
into this WAR's WEB-INF/classes (see maven-war-plugin below). -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>org.dspace.modules</includeGroupIds>
<includeArtifactIds>additions</includeArtifactIds>
<!--NOTE: by default this will also unpack transitive dependencies. To disable, uncomment this next line:
<excludeTransitive>true</excludeTransitive>
-->
<outputDirectory>${project.build.directory}/additions</outputDirectory>
<excludes>META-INF/**</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
@@ -30,6 +55,16 @@
<archiveClasses>false</archiveClasses>
<!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<!-- Copy any 'additions' (see m-dependency-p above) into WEB-INF/classes.
This ensures they are loaded prior to dependencies in WEB-INF/lib
(per Servlet 3.0 spec, section 10.5), and allows them to override
default classes in this WAR -->
<webResources>
<resource>
<directory>${project.build.directory}/additions</directory>
<targetPath>WEB-INF/classes</targetPath>
</resource>
</webResources>
</configuration>
<executions>
<execution>

View File

@@ -22,6 +22,31 @@
<build>
<plugins>
<!-- Unpack the "additions" module into our target directory,
so that any custom classes in that module can be included
into this WAR's WEB-INF/classes (see maven-war-plugin below). -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>org.dspace.modules</includeGroupIds>
<includeArtifactIds>additions</includeArtifactIds>
<!--NOTE: by default this will also unpack transitive dependencies. To disable, uncomment this next line:
<excludeTransitive>true</excludeTransitive>
-->
<outputDirectory>${project.build.directory}/additions</outputDirectory>
<excludes>META-INF/**</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
@@ -29,6 +54,16 @@
<archiveClasses>false</archiveClasses>
<!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<!-- Copy any 'additions' (see m-dependency-p above) into WEB-INF/classes.
This ensures they are loaded prior to dependencies in WEB-INF/lib
(per Servlet 3.0 spec, section 10.5), and allows them to override
default classes in this WAR -->
<webResources>
<resource>
<directory>${project.build.directory}/additions</directory>
<targetPath>WEB-INF/classes</targetPath>
</resource>
</webResources>
</configuration>
<executions>
<execution>

View File

@@ -23,6 +23,31 @@
<build>
<plugins>
<!-- Unpack the "additions" module into our target directory,
so that any custom classes in that module can be included
into this WAR's WEB-INF/classes (see maven-war-plugin below). -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>org.dspace.modules</includeGroupIds>
<includeArtifactIds>additions</includeArtifactIds>
<!--NOTE: by default this will also unpack transitive dependencies. To disable, uncomment this next line:
<excludeTransitive>true</excludeTransitive>
-->
<outputDirectory>${project.build.directory}/additions</outputDirectory>
<excludes>META-INF/**</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
@@ -30,6 +55,16 @@
<archiveClasses>false</archiveClasses>
<!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<!-- Copy any 'additions' (see m-dependency-p above) into WEB-INF/classes.
This ensures they are loaded prior to dependencies in WEB-INF/lib
(per Servlet 3.0 spec, section 10.5), and allows them to override
default classes in this WAR -->
<webResources>
<resource>
<directory>${project.build.directory}/additions</directory>
<targetPath>WEB-INF/classes</targetPath>
</resource>
</webResources>
<overlays>
<!--
the priority of overlays is determined here

View File

@@ -25,25 +25,59 @@
<root.basedir>${basedir}/../../..</root.basedir>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archiveClasses>false</archiveClasses>
<!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
</configuration>
<executions>
<execution>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<build>
<plugins>
<!-- Unpack the "additions" module into our target directory,
so that any custom classes in that module can be included
into this WAR's WEB-INF/classes (see maven-war-plugin below). -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>org.dspace.modules</includeGroupIds>
<includeArtifactIds>additions</includeArtifactIds>
<!--NOTE: by default this will also unpack transitive dependencies. To disable, uncomment this next line:
<excludeTransitive>true</excludeTransitive>
-->
<outputDirectory>${project.build.directory}/additions</outputDirectory>
<excludes>META-INF/**</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archiveClasses>false</archiveClasses>
<!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<!-- Copy any 'additions' (see m-dependency-p above) into WEB-INF/classes.
This ensures they are loaded prior to dependencies in WEB-INF/lib
(per Servlet 3.0 spec, section 10.5), and allows them to override
default classes in this WAR -->
<webResources>
<resource>
<directory>${project.build.directory}/additions</directory>
<targetPath>WEB-INF/classes</targetPath>
</resource>
</webResources>
</configuration>
<executions>
<execution>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>

View File

@@ -27,23 +27,57 @@
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archiveClasses>false</archiveClasses>
<!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
</configuration>
<executions>
<execution>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<!-- Unpack the "additions" module into our target directory,
so that any custom classes in that module can be included
into this WAR's WEB-INF/classes (see maven-war-plugin below). -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>org.dspace.modules</includeGroupIds>
<includeArtifactIds>additions</includeArtifactIds>
<!--NOTE: by default this will also unpack transitive dependencies. To disable, uncomment this next line:
<excludeTransitive>true</excludeTransitive>
-->
<outputDirectory>${project.build.directory}/additions</outputDirectory>
<excludes>META-INF/**</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archiveClasses>false</archiveClasses>
<!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<!-- Copy any 'additions' (see m-dependency-p above) into WEB-INF/classes.
This ensures they are loaded prior to dependencies in WEB-INF/lib
(per Servlet 3.0 spec, section 10.5), and allows them to override
default classes in this WAR -->
<webResources>
<resource>
<directory>${project.build.directory}/additions</directory>
<targetPath>WEB-INF/classes</targetPath>
</resource>
</webResources>
</configuration>
<executions>
<execution>
<phase>prepare-package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>

View File

@@ -21,6 +21,37 @@
<root.basedir>${basedir}/../../..</root.basedir>
</properties>
<build>
<plugins>
<!-- Unpack the "additions" module into our target directory,
so that any custom classes in that module can be included
into this WAR's WEB-INF/classes (see maven-war-plugin below). -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>org.dspace.modules</includeGroupIds>
<includeArtifactIds>additions</includeArtifactIds>
<!--NOTE: by default this will also unpack transitive dependencies. To disable, uncomment this next line:
<excludeTransitive>true</excludeTransitive>
-->
<outputDirectory>${project.build.directory}/additions</outputDirectory>
<excludes>META-INF/**</excludes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>oracle-support</id>
@@ -53,6 +84,16 @@
<archiveClasses>false</archiveClasses>
<!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<!-- Copy any 'additions' (see m-dependency-p above) into WEB-INF/classes.
This ensures they are loaded prior to dependencies in WEB-INF/lib
(per Servlet 3.0 spec, section 10.5), and allows them to override
default classes in this WAR -->
<webResources>
<resource>
<directory>${project.build.directory}/additions</directory>
<targetPath>WEB-INF/classes</targetPath>
</resource>
</webResources>
<overlays>
<!--
the priority of overlays is determined here
@@ -107,6 +148,18 @@
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archiveClasses>false</archiveClasses>
<!-- Filter the web.xml (needed for IDE compatibility/debugging) -->
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<!-- Copy any 'additions' (see m-dependency-p above) into WEB-INF/classes.
This ensures they are loaded prior to dependencies in WEB-INF/lib
(per Servlet 3.0 spec, section 10.5), and allows them to override
default classes in this WAR -->
<webResources>
<resource>
<directory>${project.build.directory}/additions</directory>
<targetPath>WEB-INF/classes</targetPath>
</resource>
</webResources>
<overlays>
<!--
the priority of overlays is determined here