From dca931ca4b0810c04f1472c1e480bccae2fe50ac Mon Sep 17 00:00:00 2001 From: Slawomir Jaranowski Date: Mon, 25 Jul 2022 22:29:44 +0200 Subject: [PATCH] [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 --- .../it/JXR-100_parameterlink/verify.groovy | 3 +- .../src/it/JXR-143_nofork/pom.xml | 18 -------- .../src/it/JXR-143_nofork/verify.groovy | 29 ++++++------- maven-jxr-plugin/src/it/aggregate/pom.xml | 4 +- .../src/it/aggregate/verify.groovy | 40 +++++++++--------- .../src/it/mixed-plugin-report/pom.xml | 6 +-- .../src/it/mixed-plugin-report/verify.groovy | 41 ++++++++++--------- .../src/it/new-site-config/pom.xml | 2 +- .../src/it/new-site-config/verify.groovy | 29 ++++++------- maven-jxr-plugin/src/it/settings.xml | 28 ++----------- .../src/it/simple-project/verify.groovy | 27 ++++++------ pom.xml | 19 ++++----- 12 files changed, 98 insertions(+), 148 deletions(-) diff --git a/maven-jxr-plugin/src/it/JXR-100_parameterlink/verify.groovy b/maven-jxr-plugin/src/it/JXR-100_parameterlink/verify.groovy index 064decc3..e9591331 100644 --- a/maven-jxr-plugin/src/it/JXR-100_parameterlink/verify.groovy +++ b/maven-jxr-plugin/src/it/JXR-100_parameterlink/verify.groovy @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -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('App') +assert 4 == new File( basedir, '/target/site/xref/com/mycompany/app/Foo.html' ).text.count( 'App' ) diff --git a/maven-jxr-plugin/src/it/JXR-143_nofork/pom.xml b/maven-jxr-plugin/src/it/JXR-143_nofork/pom.xml index d84d3142..ab70068c 100644 --- a/maven-jxr-plugin/src/it/JXR-143_nofork/pom.xml +++ b/maven-jxr-plugin/src/it/JXR-143_nofork/pom.xml @@ -41,24 +41,6 @@ under the License. - - org.apache.maven.plugins - maven-enforcer-plugin - 3.1.0 - - - - enforce - - validate - - - - - - - - org.apache.maven.plugins maven-jxr-plugin diff --git a/maven-jxr-plugin/src/it/JXR-143_nofork/verify.groovy b/maven-jxr-plugin/src/it/JXR-143_nofork/verify.groovy index bb0cc6ec..40981533 100644 --- a/maven-jxr-plugin/src/it/JXR-143_nofork/verify.groovy +++ b/maven-jxr-plugin/src/it/JXR-143_nofork/verify.groovy @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -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; \ No newline at end of file +content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text +assert content.contains( 'App2.html' ) diff --git a/maven-jxr-plugin/src/it/aggregate/pom.xml b/maven-jxr-plugin/src/it/aggregate/pom.xml index 48c2ec2e..b0f5294c 100644 --- a/maven-jxr-plugin/src/it/aggregate/pom.xml +++ b/maven-jxr-plugin/src/it/aggregate/pom.xml @@ -41,7 +41,7 @@ under the License. org.apache.maven.plugins maven-site-plugin - ${site-plugin-version} + @sitePluginVersion@ @@ -72,7 +72,7 @@ under the License. org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + @javadocPluginVersion@ aggregate diff --git a/maven-jxr-plugin/src/it/aggregate/verify.groovy b/maven-jxr-plugin/src/it/aggregate/verify.groovy index 41368304..a44d397d 100644 --- a/maven-jxr-plugin/src/it/aggregate/verify.groovy +++ b/maven-jxr-plugin/src/it/aggregate/verify.groovy @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -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; \ No newline at end of file +assert new File( basedir, 'target/site/apidocs/index.html' ).exists() diff --git a/maven-jxr-plugin/src/it/mixed-plugin-report/pom.xml b/maven-jxr-plugin/src/it/mixed-plugin-report/pom.xml index f5ac9541..7b43f98b 100644 --- a/maven-jxr-plugin/src/it/mixed-plugin-report/pom.xml +++ b/maven-jxr-plugin/src/it/mixed-plugin-report/pom.xml @@ -64,7 +64,7 @@ under the License. org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + @javadocPluginVersion@ aggregate @@ -79,7 +79,7 @@ under the License. org.apache.maven.plugins maven-site-plugin - ${site-plugin-version} + @sitePluginVersion@ @@ -103,7 +103,7 @@ under the License. org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + @javadocPluginVersion@ diff --git a/maven-jxr-plugin/src/it/mixed-plugin-report/verify.groovy b/maven-jxr-plugin/src/it/mixed-plugin-report/verify.groovy index f56bdcdc..ba9eeea4 100644 --- a/maven-jxr-plugin/src/it/mixed-plugin-report/verify.groovy +++ b/maven-jxr-plugin/src/it/mixed-plugin-report/verify.groovy @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -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( '' ) -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( '' ); -return true; \ No newline at end of file +assert new File( basedir, 'target/site/apidocs/index.html' ).exists() +assert new File( basedir, 'target/site/testapidocs/index.html' ).exists() diff --git a/maven-jxr-plugin/src/it/new-site-config/pom.xml b/maven-jxr-plugin/src/it/new-site-config/pom.xml index be73b1e7..20120c27 100644 --- a/maven-jxr-plugin/src/it/new-site-config/pom.xml +++ b/maven-jxr-plugin/src/it/new-site-config/pom.xml @@ -62,7 +62,7 @@ under the License. org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + @javadocPluginVersion@ diff --git a/maven-jxr-plugin/src/it/new-site-config/verify.groovy b/maven-jxr-plugin/src/it/new-site-config/verify.groovy index 9eaba4ec..c329d2bf 100644 --- a/maven-jxr-plugin/src/it/new-site-config/verify.groovy +++ b/maven-jxr-plugin/src/it/new-site-config/verify.groovy @@ -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( '' ); +content = new File( basedir, 'target/site/xref/org/apache/maven/jxr/it/App.html' ).text +assert content.contains( 'App2.html' ) +assert content.contains( '' ) -return true; \ No newline at end of file +assert new File( basedir, 'target/site/apidocs/index.html' ).exists() +assert new File( basedir, 'target/site/testapidocs/index.html' ).exists(); diff --git a/maven-jxr-plugin/src/it/settings.xml b/maven-jxr-plugin/src/it/settings.xml index 0e28627c..543ff457 100644 --- a/maven-jxr-plugin/src/it/settings.xml +++ b/maven-jxr-plugin/src/it/settings.xml @@ -23,9 +23,6 @@ under the License. it-repo - - true - local.central @@ -37,17 +34,6 @@ under the License. true - - apache.snapshots - Apache Snapshot Repository - http://repository.apache.org/content/groups/snapshots-group/ - - false - - - true - - @@ -60,18 +46,10 @@ under the License. true - - apache.snapshots - Apache Snapshot Repository - http://repository.apache.org/content/groups/snapshots/ - - false - - - true - - + + it-repo + diff --git a/maven-jxr-plugin/src/it/simple-project/verify.groovy b/maven-jxr-plugin/src/it/simple-project/verify.groovy index 0ef06fba..4ee41c89 100644 --- a/maven-jxr-plugin/src/it/simple-project/verify.groovy +++ b/maven-jxr-plugin/src/it/simple-project/verify.groovy @@ -1,4 +1,3 @@ - /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file @@ -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' ) @@ -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; diff --git a/pom.xml b/pom.xml index e095ea8f..5efc265b 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ under the License. org.apache.maven maven-parent - 35 + 37 @@ -65,6 +65,7 @@ under the License. 8 3.11.0 + 3.4.0 jxr-archives/jxr-LATEST None 2022-03-15T19:02:53Z @@ -138,22 +139,18 @@ under the License. + + - org.apache.maven.plugins - maven-compiler-plugin - 3.10.1 + maven-javadoc-plugin + ${javadocPluginVersion} org.apache.maven.plugins - maven-pmd-plugin - 3.16.0 - - - org.codehaus.mojo - taglist-maven-plugin - 3.0.0 + maven-site-plugin + ${sitePluginVersion}