Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JXR-172] Upgrade Parent to 37, project cleanup #62

Merged
merged 1 commit into from
Jul 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this settings file at all? I ran the tests without and they success. There is no settings file in MPIR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, in other plugins I haven't seen it. Did you check the time difference actually?

Copy link
Member Author

@slawekjaranowski slawekjaranowski Jul 27, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing is time consumed be test and second is how many items are download from remote repository.

without settings.xml

[INFO] --- maven-invoker-plugin:3.3.0:run (integration-test) @ maven-jxr-plugin ---
[INFO] Building: simple-project/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           simple-project/pom.xml ........................... SUCCESS (23.1 s)
[INFO] Building: JXR-100_parameterlink/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           JXR-100_parameterlink/pom.xml .................... SUCCESS (3.5 s)
[INFO] Building: aggregate/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           aggregate/pom.xml ................................ SUCCESS (10.3 s)
[INFO] Building: mixed-plugin-report/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           mixed-plugin-report/pom.xml ...................... SUCCESS (13.0 s)
[INFO] Building: JXR-135_innerclasses/pom.xml
[INFO]           JXR-135_innerclasses/pom.xml ..................... SUCCESS (1.8 s)
[INFO] Building: JXR-143_nofork/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           JXR-143_nofork/pom.xml ........................... SUCCESS (5.5 s)
[INFO] Building: new-site-config/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           new-site-config/pom.xml .......................... SUCCESS (5.3 s)
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 7, Failed: 0, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Maven JXR Parent 3.2.1-SNAPSHOT:
[INFO] 
[INFO] Maven JXR Parent ................................... SUCCESS [  2.545 s]
[INFO] Maven JXR .......................................... SUCCESS [  3.217 s]
[INFO] Maven JXR Plugin ................................... SUCCESS [01:10 min]
[INFO] ------------------------------------------------------------------------

with settings.xml

[INFO] --- maven-invoker-plugin:3.3.0:run (integration-test) @ maven-jxr-plugin ---
[INFO] Building: simple-project/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           simple-project/pom.xml ........................... SUCCESS (5.9 s)
[INFO] Building: JXR-100_parameterlink/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           JXR-100_parameterlink/pom.xml .................... SUCCESS (1.8 s)
[INFO] Building: aggregate/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           aggregate/pom.xml ................................ SUCCESS (6.1 s)
[INFO] Building: mixed-plugin-report/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           mixed-plugin-report/pom.xml ...................... SUCCESS (12.2 s)
[INFO] Building: JXR-135_innerclasses/pom.xml
[INFO]           JXR-135_innerclasses/pom.xml ..................... SUCCESS (1.6 s)
[INFO] Building: JXR-143_nofork/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           JXR-143_nofork/pom.xml ........................... SUCCESS (3.5 s)
[INFO] Building: new-site-config/pom.xml
[INFO] run post-build script verify.groovy
[INFO]           new-site-config/pom.xml .......................... SUCCESS (4.2 s)
[INFO] -------------------------------------------------
[INFO] Build Summary:
[INFO]   Passed: 7, Failed: 0, Errors: 0, Skipped: 0
[INFO] -------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Maven JXR Parent 3.2.1-SNAPSHOT:
[INFO] 
[INFO] Maven JXR Parent ................................... SUCCESS [  2.145 s]
[INFO] Maven JXR .......................................... SUCCESS [  2.473 s]
[INFO] Maven JXR Plugin ................................... SUCCESS [ 42.544 s]
[INFO] ------------------------------------------------------------------------

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add do MIRP 😄

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh man, I was blind for years. Can we apply this here as well?

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