Skip to content

Commit f46013f

Browse files
Add optional dependency for install ITs
1 parent de1dbbf commit f46013f

File tree

7 files changed

+97
-2
lines changed

7 files changed

+97
-2
lines changed

src/it/staging-dependencies/pom.xml

+6
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ under the License.
6868
<version>1.7.36</version>
6969
<scope>test</scope>
7070
</dependency>
71+
<dependency>
72+
<groupId>org.slf4j</groupId>
73+
<artifactId>slf4j-api</artifactId>
74+
<version>1.7.36</version>
75+
<optional>true</optional>
76+
</dependency>
7177
</dependencies>
7278

7379
<repositories>

src/it/staging-dependencies/verify.bsh

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ try
5757
"org/apache/maven/its/dep/2.0/dep-2.0.jar",
5858
"org/apache/maven/its/dep/maven-metadata-local.xml",
5959
"test/staging-dependencies/1.0-SNAPSHOT/staging-dependencies-1.0-SNAPSHOT.jar",
60-
"test/staging-dependencies/1.0-SNAPSHOT/staging-dependencies-1.0-SNAPSHOT.pom"
60+
"test/staging-dependencies/1.0-SNAPSHOT/staging-dependencies-1.0-SNAPSHOT.pom",
61+
"org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.pom",
62+
"org/slf4j/slf4j-api/1.7.36/slf4j-api-1.7.36.jar",
63+
"org/slf4j/slf4j-parent/1.7.36/slf4j-parent-1.7.36.pom"
6164
};
6265
for ( String file : files )
6366
{

src/it/staging-reactor/mod1/pom.xml

+7-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ under the License.
2929
<relativePath>../mod1-parent</relativePath>
3030
</parent>
3131

32-
<artifactId>mod1</artifactId>
32+
<artifactId>mod1</artifactId>
3333
<version>1.0-SNAPSHOT</version>
3434
<packaging>jar</packaging>
3535

@@ -47,6 +47,12 @@ under the License.
4747
<artifactId>mod2</artifactId>
4848
<version>1.0-SNAPSHOT</version>
4949
</dependency>
50+
<dependency>
51+
<groupId>test</groupId>
52+
<artifactId>mod3</artifactId>
53+
<version>1.0-SNAPSHOT</version>
54+
<optional>true</optional>
55+
</dependency>
5056
</dependencies>
5157

5258
<build>

src/it/staging-reactor/mod3/pom.xml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
-->
21+
22+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
23+
<modelVersion>4.0.0</modelVersion>
24+
25+
<parent>
26+
<groupId>test</groupId>
27+
<artifactId>mod2-parent</artifactId>
28+
<version>1.0-SNAPSHOT</version>
29+
</parent>
30+
31+
<artifactId>mod3</artifactId>
32+
<version>1.0-SNAPSHOT</version>
33+
<packaging>jar</packaging>
34+
35+
<description>
36+
Test to check for proper staging during a multi module build, i.e. artifacts from the reactor need to be considered.
37+
</description>
38+
39+
<properties>
40+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
41+
</properties>
42+
43+
<build>
44+
<plugins>
45+
<plugin>
46+
<artifactId>maven-source-plugin</artifactId>
47+
<version>@sourcePluginVersion@</version>
48+
<executions>
49+
<execution>
50+
<id>attach-resources</id>
51+
<goals>
52+
<goal>jar</goal>
53+
</goals>
54+
</execution>
55+
</executions>
56+
</plugin>
57+
</plugins>
58+
</build>
59+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+

src/it/staging-reactor/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ under the License.
3434
<modules>
3535
<module>mod1</module>
3636
<module>mod2</module>
37+
<module>mod3</module>
3738
</modules>
3839

3940
<properties>

src/it/staging-reactor/verify.bsh

+3
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ try
4444
"test/mod2/1.0-SNAPSHOT/maven-metadata-local.xml",
4545
"test/mod2/1.0-SNAPSHOT/mod2-1.0-SNAPSHOT.pom",
4646
"test/mod2/1.0-SNAPSHOT/mod2-1.0-SNAPSHOT.jar",
47+
"test/mod3/1.0-SNAPSHOT/maven-metadata-local.xml",
48+
"test/mod3/1.0-SNAPSHOT/mod3-1.0-SNAPSHOT.pom",
49+
"test/mod3/1.0-SNAPSHOT/mod3-1.0-SNAPSHOT.jar",
4750
"test/mod2-parent/maven-metadata-local.xml",
4851
"test/mod2-parent/1.0-SNAPSHOT/maven-metadata-local.xml",
4952
"test/mod2-parent/1.0-SNAPSHOT/mod2-parent-1.0-SNAPSHOT.pom",

0 commit comments

Comments
 (0)