Skip to content

Commit 1fade76

Browse files
committed
Fixed #25 Using dependency plugin instead of antrun plugin for tomcat-users.xml sharing
1 parent eb950aa commit 1fade76

File tree

2 files changed

+30
-18
lines changed

2 files changed

+30
-18
lines changed

pom.xml

+14-15
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@
789789
<artifactId>maven-dependency-plugin</artifactId>
790790
<executions>
791791
<execution>
792-
<id>unpack</id>
792+
<id>unpack-tomcat</id>
793793
<phase>process-test-classes</phase>
794794
<goals>
795795
<goal>unpack</goal>
@@ -807,25 +807,24 @@
807807
</artifactItems>
808808
</configuration>
809809
</execution>
810-
</executions>
811-
</plugin>
812-
<plugin>
813-
<groupId>org.apache.maven.plugins</groupId>
814-
<artifactId>maven-antrun-plugin</artifactId>
815-
<version>1.1</version>
816-
<executions>
817810
<execution>
811+
<id>unpack-tomcat-users</id>
818812
<phase>process-test-classes</phase>
819813
<goals>
820-
<goal>run</goal>
814+
<goal>unpack</goal>
821815
</goals>
822816
<configuration>
823-
<tasks>
824-
<echo>Copying server.xml</echo>
825-
<copy failonerror="false"
826-
file="../../test-utils/src/main/resources/tomcat-users.xml"
827-
tofile="${project.build.directory}/apache-tomcat-${tomcat.version}/conf/tomcat-users.xml" />
828-
</tasks>
817+
<artifactItems>
818+
<artifactItem>
819+
<groupId>org.javaee8</groupId>
820+
<artifactId>test-utils</artifactId>
821+
<version>${project.version}</version>
822+
<type>jar</type>
823+
<overWrite>true</overWrite>
824+
<outputDirectory>${project.build.directory}/apache-tomcat-${tomcat.version}/conf</outputDirectory>
825+
<includes>tomcat-users.xml</includes>
826+
</artifactItem>
827+
</artifactItems>
829828
</configuration>
830829
</execution>
831830
</executions>

test-utils/pom.xml

+16-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<groupId>org.javaee8</groupId>
99
<version>1.0-SNAPSHOT</version>
1010
</parent>
11-
11+
1212
<artifactId>test-utils</artifactId>
1313
<name>Java EE 8 Samples: test-utils</name>
1414

@@ -27,5 +27,18 @@
2727
<artifactId>shrinkwrap-resolver-api-maven</artifactId>
2828
</dependency>
2929
</dependencies>
30-
31-
</project>
30+
31+
<build>
32+
<plugins>
33+
<plugin>
34+
<groupId>org.apache.maven.plugins</groupId>
35+
<artifactId>maven-dependency-plugin</artifactId>
36+
<configuration>
37+
<!-- no need to unpack tomcat here! -->
38+
<skip>true</skip>
39+
</configuration>
40+
</plugin>
41+
</plugins>
42+
</build>
43+
44+
</project>

0 commit comments

Comments
 (0)