You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2021/04/05 08:11:43 UTC

[maven] branch master updated: fix javadoc

This is an automated email from the ASF dual-hosted git repository.

hboutemy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven.git


The following commit(s) were added to refs/heads/master by this push:
     new c4df060  fix javadoc
c4df060 is described below

commit c4df060c2604fda20a9f4fccc0fbc71e4e7a38e7
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Mon Apr 5 10:11:39 2021 +0200

    fix javadoc
---
 .../project/DefaultMavenProjectBuilderTest.java    | 69 +++++++++++-----------
 .../apache/maven/project/PomConstructionTest.java  | 14 ++---
 pom.xml                                            |  2 +-
 3 files changed, 43 insertions(+), 42 deletions(-)

diff --git a/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java b/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
index 48c765b..5b4f10b 100644
--- a/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/DefaultMavenProjectBuilderTest.java
@@ -73,7 +73,8 @@ public class DefaultMavenProjectBuilderTest
 
     /**
      * Check that we can build ok from the middle pom of a (parent,child,grandchild) hierarchy
-     * @throws Exception
+     *
+     * @throws Exception in case of issue
      */
     @Test
     public void testBuildFromMiddlePom() throws Exception
@@ -207,7 +208,7 @@ public class DefaultMavenProjectBuilderTest
     /**
      * Tests whether local version range parent references are build correctly.
      *
-     * @throws Exception
+     * @throws Exception in case of issue
      */
     @Test
     public void testBuildValidParentVersionRangeLocally() throws Exception
@@ -227,7 +228,7 @@ public class DefaultMavenProjectBuilderTest
     /**
      * Tests whether local version range parent references are build correctly.
      *
-     * @throws Exception
+     * @throws Exception in case of issue
      */
     @Test
     public void testBuildParentVersionRangeLocallyWithoutChildVersion() throws Exception
@@ -245,7 +246,7 @@ public class DefaultMavenProjectBuilderTest
     /**
      * Tests whether local version range parent references are build correctly.
      *
-     * @throws Exception
+     * @throws Exception in case of issue
      */
     @Test
     public void testBuildParentVersionRangeLocallyWithChildVersionExpression() throws Exception
@@ -264,7 +265,7 @@ public class DefaultMavenProjectBuilderTest
     /**
      * Tests whether external version range parent references are build correctly.
      *
-     * @throws Exception
+     * @throws Exception in case of issue
      */
     @Test
     public void testBuildParentVersionRangeExternally() throws Exception
@@ -284,7 +285,7 @@ public class DefaultMavenProjectBuilderTest
     /**
      * Tests whether external version range parent references are build correctly.
      *
-     * @throws Exception
+     * @throws Exception in case of issue
      */
     @Test
     public void testBuildParentVersionRangeExternallyWithoutChildVersion() throws Exception
@@ -303,7 +304,7 @@ public class DefaultMavenProjectBuilderTest
     /**
      * Tests whether external version range parent references are build correctly.
      *
-     * @throws Exception
+     * @throws Exception in case of issue
      */
     @Test
     public void testBuildParentVersionRangeExternallyWithChildVersionExpression() throws Exception
@@ -319,34 +320,34 @@ public class DefaultMavenProjectBuilderTest
         assertThat( e.getMessage(), containsString( "Version must be a constant" ) );
     }
     
-        /**
-         * Ensure that when re-reading a pom, it should not use the cached Model
-         * 
-         * @throws Exception
-         */
-        @Test
-        public void rereadPom_mng7063() throws Exception
+    /**
+     * Ensure that when re-reading a pom, it should not use the cached Model
+     * 
+     * @throws Exception in case of issue
+     */
+    @Test
+    public void rereadPom_mng7063() throws Exception
+    {
+        final Path pom = projectRoot.resolve( "pom.xml" );
+        final ProjectBuildingRequest buildingRequest = newBuildingRequest();
+
+        try ( InputStream pomResource =
+            DefaultMavenProjectBuilderTest.class.getResourceAsStream( "/projects/reread/pom1.xml" ) )
         {
-            final Path pom = projectRoot.resolve( "pom.xml" );
-            final ProjectBuildingRequest buildingRequest = newBuildingRequest();
-    
-            try ( InputStream pomResource =
-                DefaultMavenProjectBuilderTest.class.getResourceAsStream( "/projects/reread/pom1.xml" ) )
-            {
-                Files.copy( pomResource, pom, StandardCopyOption.REPLACE_EXISTING );
-            }
-            
-            MavenProject project = projectBuilder.build( pom.toFile(), buildingRequest ).getProject();
-            assertThat( project.getName(), is( "aid" ) ); // inherited from artifactId
-            
-            try ( InputStream pomResource =
-                DefaultMavenProjectBuilderTest.class.getResourceAsStream( "/projects/reread/pom2.xml" ) )
-            {
-                Files.copy( pomResource, pom, StandardCopyOption.REPLACE_EXISTING );
-            }
-    
-            project = projectBuilder.build( pom.toFile(), buildingRequest ).getProject();
-            assertThat( project.getName(), is( "PROJECT NAME" ) );
+            Files.copy( pomResource, pom, StandardCopyOption.REPLACE_EXISTING );
+        }
+        
+        MavenProject project = projectBuilder.build( pom.toFile(), buildingRequest ).getProject();
+        assertThat( project.getName(), is( "aid" ) ); // inherited from artifactId
+        
+        try ( InputStream pomResource =
+            DefaultMavenProjectBuilderTest.class.getResourceAsStream( "/projects/reread/pom2.xml" ) )
+        {
+            Files.copy( pomResource, pom, StandardCopyOption.REPLACE_EXISTING );
         }
 
+        project = projectBuilder.build( pom.toFile(), buildingRequest ).getProject();
+        assertThat( project.getName(), is( "PROJECT NAME" ) );
+    }
+
 }
diff --git a/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java b/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
index e9492ae..012d06d 100644
--- a/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
+++ b/maven-core/src/test/java/org/apache/maven/project/PomConstructionTest.java
@@ -83,7 +83,7 @@ public class PomConstructionTest
     /**
      * Will throw exception if url is empty. MNG-4050
      *
-     * @throws Exception
+     * @throws Exception in case of issue
      */
     @Test
     public void testEmptyUrl()
@@ -95,7 +95,7 @@ public class PomConstructionTest
     /**
      * Tests that modules is not overridden by profile
      *
-     * @throws Exception
+     * @throws Exception in case of issue
      */
     /* MNG-786*/
     @Test
@@ -114,7 +114,7 @@ public class PomConstructionTest
     /**
      * Will throw exception if doesn't find parent(s) in build
      *
-     * @throws Exception
+     * @throws Exception in case of issue
      */
     @Test
     public void testParentInheritance()
@@ -171,7 +171,7 @@ public class PomConstructionTest
     {
         PomTestWrapper pom = buildPom( "dependency-scope/sub" );
 
-    }
+    }*/
 
     /*MNG- 4010*/
     @Test
@@ -193,7 +193,7 @@ public class PomConstructionTest
 
     }
 
-    /** MNG-4005: postponed to 3.1
+    /* MNG-4005: postponed to 3.1
     public void testValidationErrorUponNonUniqueDependencyKey()
         throws Exception
     {
@@ -253,6 +253,7 @@ public class PomConstructionTest
         }
     }
     */
+
     @Test
     public void testDuplicateDependenciesCauseLastDeclarationToBePickedInLenientMode()
         throws Exception
@@ -317,7 +318,6 @@ public class PomConstructionTest
                                                  "site" ) ), pom.getValue( "reporting/outputDirectory" ) );
     }
 
-
     @Test
     public void testPluginOrder()
         throws Exception
@@ -690,7 +690,7 @@ public class PomConstructionTest
         assertEquals( "https://parent.url/site/ap/child", pom.getValue( "distributionManagement/site/url" ) );
         assertEquals( "https://parent.url/download", pom.getValue( "distributionManagement/downloadUrl" ) );
     }
-    //*/
+
     @Test
     public void testNonInheritedElementsInSubtreesOverriddenByChild()
         throws Exception
diff --git a/pom.xml b/pom.xml
index dd060ba..eaed23c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,7 +78,7 @@ under the License.
     <maven.site.path>ref/4-LATEST</maven.site.path>
     <checkstyle.violation.ignore>None</checkstyle.violation.ignore>
     <checkstyle.excludes>**/package-info.java</checkstyle.excludes>
-    <project.build.outputTimestamp>2019-11-07T12:32:18Z</project.build.outputTimestamp>
+    <project.build.outputTimestamp>2021-04-05T08:12:18Z</project.build.outputTimestamp>
   </properties>
 
   <modules>