Skip to content

Commit

Permalink
[JXR-172] Upgrade Parent to 37, project cleanup
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
slawekjaranowski committed Jul 27, 2022
1 parent 52ef112 commit 26362ee
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 148 deletions.
3 changes: 1 addition & 2 deletions maven-jxr-plugin/src/it/JXR-100_parameterlink/verify.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -19,4 +18,4 @@
*/
assert new File( basedir, 'target/site/xref/com/mycompany/app/Foo.html' ).exists()

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>')
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>' )
18 changes: 0 additions & 18 deletions maven-jxr-plugin/src/it/JXR-143_nofork/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,24 +41,6 @@ under the License.

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<goals>
<goal>enforce</goal>
</goals>
<phase>validate</phase>
<configuration>
<rules>
<AlwaysPass />
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
Expand Down
29 changes: 12 additions & 17 deletions maven-jxr-plugin/src/it/JXR-143_nofork/verify.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -17,24 +16,20 @@
* specific language governing permissions and limitations
* under the License.
*/
assert new File( basedir, 'target/site' ).exists();

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

assert content.contains( 'xref/index.html' );
assert content.contains( 'xref-test/index.html' );
assert new File( basedir, 'target/site' ).exists()

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

assert new File( basedir, 'target/site/xref-test' ).exists();
assert new File( basedir, 'target/site/xref-test/index.html' ).exists();
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists();
assert content.contains( 'xref/index.html' )
assert content.contains( 'xref-test/index.html' )

content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text;
assert content.contains( 'App2.html' );
assert new File( basedir, 'target/site/xref' ).exists()
assert new File( basedir, 'target/site/xref/index.html' ).exists()
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists()

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

return true;
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text
assert content.contains( 'App2.html' )
4 changes: 2 additions & 2 deletions maven-jxr-plugin/src/it/aggregate/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${site-plugin-version}</version>
<version>@sitePluginVersion@</version>
</plugin>
</plugins>
</build>
Expand Down Expand Up @@ -72,7 +72,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<version>@javadocPluginVersion@</version>
<reportSets>
<reportSet>
<id>aggregate</id>
Expand Down
40 changes: 20 additions & 20 deletions maven-jxr-plugin/src/it/aggregate/verify.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -17,28 +16,29 @@
* specific language governing permissions and limitations
* under the License.
*/
assert new File( basedir, 'target/site' ).exists();
assert new File( basedir, 'target/site' ).exists()

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

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

assert content.contains( 'xref/index.html' );
assert content.contains( 'xref-test/index.html' );
assert new File( basedir, 'target/site/xref' ).exists()
assert new File( basedir, 'target/site/xref/index.html' ).exists()
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists()
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).exists()

assert new File( basedir, 'target/site/xref' ).exists();
assert new File( basedir, 'target/site/xref/index.html' ).exists();
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists();
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).exists();
assert new File( basedir, 'target/site/xref-test' ).exists()
assert new File( basedir, 'target/site/xref-test/index.html' ).exists()
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists()
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it2/AppTest.html' ).exists()

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

content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text;
assert content.contains( 'App2.html' );
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).text
assert content.contains( 'App2.html' )
content = new File( basedir, 'target/site/xref/index.html' ).text
assert content.contains( 'this is a JXR report set' )

content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).text;
assert content.contains( 'App2.html' );
content = new File( basedir, 'target/site/xref/index.html' ).text;
assert content.contains( 'this is a JXR report set' );
return true;
assert new File( basedir, 'target/site/apidocs/index.html' ).exists()
6 changes: 3 additions & 3 deletions maven-jxr-plugin/src/it/mixed-plugin-report/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<version>@javadocPluginVersion@</version>
<executions>
<execution>
<id>aggregate</id>
Expand All @@ -79,7 +79,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${site-plugin-version}</version>
<version>@sitePluginVersion@</version>
</plugin>
</plugins>
</build>
Expand All @@ -103,7 +103,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<version>@javadocPluginVersion@</version>
</plugin>
</plugins>
</reporting>
Expand Down
41 changes: 21 additions & 20 deletions maven-jxr-plugin/src/it/mixed-plugin-report/verify.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -17,28 +16,30 @@
* specific language governing permissions and limitations
* under the License.
*/
assert new File( basedir, 'target/site' ).exists();
assert new File( basedir, 'target/site' ).exists()

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

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

assert content.contains( 'xref/index.html' );
assert content.contains( 'xref-test/index.html' );
assert new File( basedir, 'target/site/xref' ).exists()
assert new File( basedir, 'target/site/xref/index.html' ).exists()
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists()
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).exists()

assert new File( basedir, 'target/site/xref' ).exists();
assert new File( basedir, 'target/site/xref/index.html' ).exists();
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists();
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).exists();
assert new File( basedir, 'target/site/xref-test' ).exists()
assert new File( basedir, 'target/site/xref-test/index.html' ).exists()
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it/AppTest.html' ).exists()
assert new File( basedir, 'target/site/xref-test/org/apache/maven/jxr/it2/AppTest.html' ).exists()

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

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

content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it2/App.html' ).text;
assert content.contains( 'App2.html' );
content = new File( basedir, 'target/site/xref/index.html' ).text;
assert content.contains( '<!-- this is a JXR report set (jdk4) -->' );
return true;
assert new File( basedir, 'target/site/apidocs/index.html' ).exists()
assert new File( basedir, 'target/site/testapidocs/index.html' ).exists()
2 changes: 1 addition & 1 deletion maven-jxr-plugin/src/it/new-site-config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ under the License.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<version>@javadocPluginVersion@</version>
</plugin>
</plugins>
</reporting>
Expand Down
29 changes: 15 additions & 14 deletions maven-jxr-plugin/src/it/new-site-config/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,24 @@
* specific language governing permissions and limitations
* under the License.
*/
assert new File( basedir, 'target/site' ).exists();
assert new File( basedir, 'target/site' ).exists()

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

assert content.contains( 'xref/index.html' );
assert content.contains( 'xref-test/index.html' );
assert content.contains( 'xref/index.html' )
assert content.contains( 'xref-test/index.html' )

assert new File( basedir, 'target/site/xref' ).exists();
assert new File( basedir, 'target/site/xref/index.html' ).exists();
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists();
assert new File( basedir, 'target/site/xref' ).exists()
assert new File( basedir, 'target/site/xref/index.html' ).exists()
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists()

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

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

return true;
assert new File( basedir, 'target/site/apidocs/index.html' ).exists()
assert new File( basedir, 'target/site/testapidocs/index.html' ).exists();
28 changes: 3 additions & 25 deletions maven-jxr-plugin/src/it/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ under the License.
<profiles>
<profile>
<id>it-repo</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>local.central</id>
Expand All @@ -37,17 +34,6 @@ under the License.
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>http://repository.apache.org/content/groups/snapshots-group/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
Expand All @@ -60,18 +46,10 @@ under the License.
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>http://repository.apache.org/content/groups/snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>it-repo</activeProfile>
</activeProfiles>
</settings>
27 changes: 12 additions & 15 deletions maven-jxr-plugin/src/it/simple-project/verify.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -17,23 +16,23 @@
* specific language governing permissions and limitations
* under the License.
*/
assert new File( basedir, 'target/site' ).exists();
assert new File( basedir, 'target/site' ).exists()

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

assert content.contains( 'xref/index.html' );
assert content.contains( 'xref-test/index.html' );
assert content.contains( 'xref/index.html' )
assert content.contains( 'xref-test/index.html' )

assert new File( basedir, 'target/site/xref' ).exists();
assert new File( basedir, 'target/site/xref/index.html' ).exists();
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists();
assert new File( basedir, 'target/site/xref' ).exists()
assert new File( basedir, 'target/site/xref/index.html' ).exists()
assert new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).exists()

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

content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text;
assert content.contains( 'App2.html' );
content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text
assert content.contains( 'App2.html' )

xrefPackageSummary = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/package-summary.html' ).text
assert xrefPackageSummary.contains( 'App.html' )
Expand All @@ -44,5 +43,3 @@ testXrefPackageSummary = new File( basedir, 'target/site/xref-test/org/apache/ma
assert !testXrefPackageSummary.contains( 'App.html' )
assert !testXrefPackageSummary.contains( 'App2.html' )
assert testXrefPackageSummary.contains( 'AppTest.html' )

return true;
Loading

0 comments on commit 26362ee

Please sign in to comment.