Skip to content

Commit 26362ee

Browse files
[JXR-172] Upgrade Parent to 37, project cleanup
- upgrade parent to 37 - remove configuration which override parent pom items - use the same version of plugins in project and IT tests - improvement assertions in IT tests
1 parent 52ef112 commit 26362ee

File tree

12 files changed

+98
-148
lines changed

12 files changed

+98
-148
lines changed

maven-jxr-plugin/src/it/JXR-100_parameterlink/verify.groovy

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/*
32
* Licensed to the Apache Software Foundation (ASF) under one
43
* or more contributor license agreements. See the NOTICE file
@@ -19,4 +18,4 @@
1918
*/
2019
assert new File( basedir, 'target/site/xref/com/mycompany/app/Foo.html' ).exists()
2120

22-
assert 4 == new File( basedir, '/target/site/xref/com/mycompany/app/Foo.html' ).text.count('<a name="App" href="../../../com/mycompany/app/App.html#App">App</a>')
21+
assert 4 == new File( basedir, '/target/site/xref/com/mycompany/app/Foo.html' ).text.count( '<a name="App" href="../../../com/mycompany/app/App.html#App">App</a>' )

maven-jxr-plugin/src/it/JXR-143_nofork/pom.xml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -41,24 +41,6 @@ under the License.
4141

4242
<build>
4343
<plugins>
44-
<plugin>
45-
<groupId>org.apache.maven.plugins</groupId>
46-
<artifactId>maven-enforcer-plugin</artifactId>
47-
<version>3.1.0</version>
48-
<executions>
49-
<execution>
50-
<goals>
51-
<goal>enforce</goal>
52-
</goals>
53-
<phase>validate</phase>
54-
<configuration>
55-
<rules>
56-
<AlwaysPass />
57-
</rules>
58-
</configuration>
59-
</execution>
60-
</executions>
61-
</plugin>
6244
<plugin>
6345
<groupId>org.apache.maven.plugins</groupId>
6446
<artifactId>maven-jxr-plugin</artifactId>
Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/*
32
* Licensed to the Apache Software Foundation (ASF) under one
43
* or more contributor license agreements. See the NOTICE file
@@ -17,24 +16,20 @@
1716
* specific language governing permissions and limitations
1817
* under the License.
1918
*/
20-
assert new File( basedir, 'target/site' ).exists();
21-
22-
content = new File( basedir, 'target/site/project-reports.html' ).text;
23-
24-
assert content.contains( 'xref/index.html' );
25-
assert content.contains( 'xref-test/index.html' );
19+
assert new File( basedir, 'target/site' ).exists()
2620

27-
assert new File( basedir, 'target/site/xref' ).exists();
28-
assert new File( basedir, 'target/site/xref/index.html' ).exists();
29-
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists();
21+
content = new File( basedir, 'target/site/project-reports.html' ).text
3022

31-
assert new File( basedir, 'target/site/xref-test' ).exists();
32-
assert new File( basedir, 'target/site/xref-test/index.html' ).exists();
33-
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists();
23+
assert content.contains( 'xref/index.html' )
24+
assert content.contains( 'xref-test/index.html' )
3425

35-
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text;
36-
assert content.contains( 'App2.html' );
26+
assert new File( basedir, 'target/site/xref' ).exists()
27+
assert new File( basedir, 'target/site/xref/index.html' ).exists()
28+
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists()
3729

38-
assert 1 == new File( basedir, 'build.log' ).text.count('Always pass!');
30+
assert new File( basedir, 'target/site/xref-test' ).exists()
31+
assert new File( basedir, 'target/site/xref-test/index.html' ).exists()
32+
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists()
3933

40-
return true;
34+
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text
35+
assert content.contains( 'App2.html' )

maven-jxr-plugin/src/it/aggregate/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ under the License.
4141
<plugin>
4242
<groupId>org.apache.maven.plugins</groupId>
4343
<artifactId>maven-site-plugin</artifactId>
44-
<version>${site-plugin-version}</version>
44+
<version>@sitePluginVersion@</version>
4545
</plugin>
4646
</plugins>
4747
</build>
@@ -72,7 +72,7 @@ under the License.
7272
<plugin>
7373
<groupId>org.apache.maven.plugins</groupId>
7474
<artifactId>maven-javadoc-plugin</artifactId>
75-
<version>3.3.1</version>
75+
<version>@javadocPluginVersion@</version>
7676
<reportSets>
7777
<reportSet>
7878
<id>aggregate</id>
Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/*
32
* Licensed to the Apache Software Foundation (ASF) under one
43
* or more contributor license agreements. See the NOTICE file
@@ -17,28 +16,29 @@
1716
* specific language governing permissions and limitations
1817
* under the License.
1918
*/
20-
assert new File( basedir, 'target/site' ).exists();
19+
assert new File( basedir, 'target/site' ).exists()
20+
21+
content = new File( basedir, 'target/site/project-reports.html' ).text
2122

22-
content = new File( basedir, 'target/site/project-reports.html' ).text;
23+
assert content.contains( 'xref/index.html' )
24+
assert content.contains( 'xref-test/index.html' )
2325

24-
assert content.contains( 'xref/index.html' );
25-
assert content.contains( 'xref-test/index.html' );
26+
assert new File( basedir, 'target/site/xref' ).exists()
27+
assert new File( basedir, 'target/site/xref/index.html' ).exists()
28+
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists()
29+
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).exists()
2630

27-
assert new File( basedir, 'target/site/xref' ).exists();
28-
assert new File( basedir, 'target/site/xref/index.html' ).exists();
29-
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists();
30-
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).exists();
31+
assert new File( basedir, 'target/site/xref-test' ).exists()
32+
assert new File( basedir, 'target/site/xref-test/index.html' ).exists()
33+
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists()
34+
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it2/AppTest.html' ).exists()
3135

32-
assert new File( basedir, 'target/site/xref-test' ).exists();
33-
assert new File( basedir, 'target/site/xref-test/index.html' ).exists();
34-
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists();
35-
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it2/AppTest.html' ).exists();
36+
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text
37+
assert content.contains( 'App2.html' )
3638

37-
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text;
38-
assert content.contains( 'App2.html' );
39+
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).text
40+
assert content.contains( 'App2.html' )
41+
content = new File( basedir, 'target/site/xref/index.html' ).text
42+
assert content.contains( 'this is a JXR report set' )
3943

40-
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).text;
41-
assert content.contains( 'App2.html' );
42-
content = new File( basedir, 'target/site/xref/index.html' ).text;
43-
assert content.contains( 'this is a JXR report set' );
44-
return true;
44+
assert new File( basedir, 'target/site/apidocs/index.html' ).exists()

maven-jxr-plugin/src/it/mixed-plugin-report/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ under the License.
6464
<plugin>
6565
<groupId>org.apache.maven.plugins</groupId>
6666
<artifactId>maven-javadoc-plugin</artifactId>
67-
<version>3.3.1</version>
67+
<version>@javadocPluginVersion@</version>
6868
<executions>
6969
<execution>
7070
<id>aggregate</id>
@@ -79,7 +79,7 @@ under the License.
7979
<plugin>
8080
<groupId>org.apache.maven.plugins</groupId>
8181
<artifactId>maven-site-plugin</artifactId>
82-
<version>${site-plugin-version}</version>
82+
<version>@sitePluginVersion@</version>
8383
</plugin>
8484
</plugins>
8585
</build>
@@ -103,7 +103,7 @@ under the License.
103103
<plugin>
104104
<groupId>org.apache.maven.plugins</groupId>
105105
<artifactId>maven-javadoc-plugin</artifactId>
106-
<version>3.3.1</version>
106+
<version>@javadocPluginVersion@</version>
107107
</plugin>
108108
</plugins>
109109
</reporting>
Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
/*
32
* Licensed to the Apache Software Foundation (ASF) under one
43
* or more contributor license agreements. See the NOTICE file
@@ -17,28 +16,30 @@
1716
* specific language governing permissions and limitations
1817
* under the License.
1918
*/
20-
assert new File( basedir, 'target/site' ).exists();
19+
assert new File( basedir, 'target/site' ).exists()
20+
21+
content = new File( basedir, 'target/site/project-reports.html' ).text
2122

22-
content = new File( basedir, 'target/site/project-reports.html' ).text;
23+
assert content.contains( 'xref/index.html' )
24+
assert content.contains( 'xref-test/index.html' )
2325

24-
assert content.contains( 'xref/index.html' );
25-
assert content.contains( 'xref-test/index.html' );
26+
assert new File( basedir, 'target/site/xref' ).exists()
27+
assert new File( basedir, 'target/site/xref/index.html' ).exists()
28+
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists()
29+
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).exists()
2630

27-
assert new File( basedir, 'target/site/xref' ).exists();
28-
assert new File( basedir, 'target/site/xref/index.html' ).exists();
29-
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists();
30-
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).exists();
31+
assert new File( basedir, 'target/site/xref-test' ).exists()
32+
assert new File( basedir, 'target/site/xref-test/index.html' ).exists()
33+
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists()
34+
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it2/AppTest.html' ).exists()
3135

32-
assert new File( basedir, 'target/site/xref-test' ).exists();
33-
assert new File( basedir, 'target/site/xref-test/index.html' ).exists();
34-
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists();
35-
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it2/AppTest.html' ).exists();
36+
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text
37+
assert content.contains( 'App2.html' )
3638

37-
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text;
38-
assert content.contains( 'App2.html' );
39+
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).text
40+
assert content.contains( 'App2.html' )
41+
content = new File( basedir, 'target/site/xref/index.html' ).text
42+
assert content.contains( '<!-- this is a JXR report set (jdk4) -->' )
3943

40-
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).text;
41-
assert content.contains( 'App2.html' );
42-
content = new File( basedir, 'target/site/xref/index.html' ).text;
43-
assert content.contains( '<!-- this is a JXR report set (jdk4) -->' );
44-
return true;
44+
assert new File( basedir, 'target/site/apidocs/index.html' ).exists()
45+
assert new File( basedir, 'target/site/testapidocs/index.html' ).exists()

maven-jxr-plugin/src/it/new-site-config/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ under the License.
6262
<plugin>
6363
<groupId>org.apache.maven.plugins</groupId>
6464
<artifactId>maven-javadoc-plugin</artifactId>
65-
<version>3.3.1</version>
65+
<version>@javadocPluginVersion@</version>
6666
</plugin>
6767
</plugins>
6868
</reporting>

maven-jxr-plugin/src/it/new-site-config/verify.groovy

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,24 @@
1616
* specific language governing permissions and limitations
1717
* under the License.
1818
*/
19-
assert new File( basedir, 'target/site' ).exists();
19+
assert new File( basedir, 'target/site' ).exists()
2020

21-
content = new File( basedir, 'target/site/project-reports.html' ).text;
21+
content = new File( basedir, 'target/site/project-reports.html' ).text
2222

23-
assert content.contains( 'xref/index.html' );
24-
assert content.contains( 'xref-test/index.html' );
23+
assert content.contains( 'xref/index.html' )
24+
assert content.contains( 'xref-test/index.html' )
2525

26-
assert new File( basedir, 'target/site/xref' ).exists();
27-
assert new File( basedir, 'target/site/xref/index.html' ).exists();
28-
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists();
26+
assert new File( basedir, 'target/site/xref' ).exists()
27+
assert new File( basedir, 'target/site/xref/index.html' ).exists()
28+
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists()
2929

30-
assert new File( basedir, 'target/site/xref-test' ).exists();
31-
assert new File( basedir, 'target/site/xref-test/index.html' ).exists();
32-
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists();
30+
assert new File( basedir, 'target/site/xref-test' ).exists()
31+
assert new File( basedir, 'target/site/xref-test/index.html' ).exists()
32+
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists()
3333

34-
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text;
35-
assert content.contains( 'App2.html' );
36-
assert content.contains( '<div id="overview"><a href="../../../../../../apidocs/org/apache/maven/jxr/it/App.html">View Javadoc</a></div>' );
34+
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text
35+
assert content.contains( 'App2.html' )
36+
assert content.contains( '<div id="overview"><a href="../../../../../../apidocs/org/apache/maven/jxr/it/App.html">View Javadoc</a></div>' )
3737

38-
return true;
38+
assert new File( basedir, 'target/site/apidocs/index.html' ).exists()
39+
assert new File( basedir, 'target/site/testapidocs/index.html' ).exists();

maven-jxr-plugin/src/it/settings.xml

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ under the License.
2323
<profiles>
2424
<profile>
2525
<id>it-repo</id>
26-
<activation>
27-
<activeByDefault>true</activeByDefault>
28-
</activation>
2926
<repositories>
3027
<repository>
3128
<id>local.central</id>
@@ -37,17 +34,6 @@ under the License.
3734
<enabled>true</enabled>
3835
</snapshots>
3936
</repository>
40-
<repository>
41-
<id>apache.snapshots</id>
42-
<name>Apache Snapshot Repository</name>
43-
<url>http://repository.apache.org/content/groups/snapshots-group/</url>
44-
<releases>
45-
<enabled>false</enabled>
46-
</releases>
47-
<snapshots>
48-
<enabled>true</enabled>
49-
</snapshots>
50-
</repository>
5137
</repositories>
5238
<pluginRepositories>
5339
<pluginRepository>
@@ -60,18 +46,10 @@ under the License.
6046
<enabled>true</enabled>
6147
</snapshots>
6248
</pluginRepository>
63-
<pluginRepository>
64-
<id>apache.snapshots</id>
65-
<name>Apache Snapshot Repository</name>
66-
<url>http://repository.apache.org/content/groups/snapshots/</url>
67-
<releases>
68-
<enabled>false</enabled>
69-
</releases>
70-
<snapshots>
71-
<enabled>true</enabled>
72-
</snapshots>
73-
</pluginRepository>
7449
</pluginRepositories>
7550
</profile>
7651
</profiles>
52+
<activeProfiles>
53+
<activeProfile>it-repo</activeProfile>
54+
</activeProfiles>
7755
</settings>

0 commit comments

Comments
 (0)