fix javadoc

This commit is contained in:
Hervé Boutemy 2021-04-05 10:11:39 +02:00
parent 2e51e10b6d
commit c4df060c26
3 changed files with 43 additions and 42 deletions

View File

@ -73,7 +73,8 @@ public class DefaultMavenProjectBuilderTest
/** /**
* Check that we can build ok from the middle pom of a (parent,child,grandchild) hierarchy * 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 @Test
public void testBuildFromMiddlePom() throws Exception public void testBuildFromMiddlePom() throws Exception
@ -207,7 +208,7 @@ public class DefaultMavenProjectBuilderTest
/** /**
* Tests whether local version range parent references are build correctly. * Tests whether local version range parent references are build correctly.
* *
* @throws Exception * @throws Exception in case of issue
*/ */
@Test @Test
public void testBuildValidParentVersionRangeLocally() throws Exception public void testBuildValidParentVersionRangeLocally() throws Exception
@ -227,7 +228,7 @@ public class DefaultMavenProjectBuilderTest
/** /**
* Tests whether local version range parent references are build correctly. * Tests whether local version range parent references are build correctly.
* *
* @throws Exception * @throws Exception in case of issue
*/ */
@Test @Test
public void testBuildParentVersionRangeLocallyWithoutChildVersion() throws Exception public void testBuildParentVersionRangeLocallyWithoutChildVersion() throws Exception
@ -245,7 +246,7 @@ public class DefaultMavenProjectBuilderTest
/** /**
* Tests whether local version range parent references are build correctly. * Tests whether local version range parent references are build correctly.
* *
* @throws Exception * @throws Exception in case of issue
*/ */
@Test @Test
public void testBuildParentVersionRangeLocallyWithChildVersionExpression() throws Exception public void testBuildParentVersionRangeLocallyWithChildVersionExpression() throws Exception
@ -264,7 +265,7 @@ public class DefaultMavenProjectBuilderTest
/** /**
* Tests whether external version range parent references are build correctly. * Tests whether external version range parent references are build correctly.
* *
* @throws Exception * @throws Exception in case of issue
*/ */
@Test @Test
public void testBuildParentVersionRangeExternally() throws Exception public void testBuildParentVersionRangeExternally() throws Exception
@ -284,7 +285,7 @@ public class DefaultMavenProjectBuilderTest
/** /**
* Tests whether external version range parent references are build correctly. * Tests whether external version range parent references are build correctly.
* *
* @throws Exception * @throws Exception in case of issue
*/ */
@Test @Test
public void testBuildParentVersionRangeExternallyWithoutChildVersion() throws Exception public void testBuildParentVersionRangeExternallyWithoutChildVersion() throws Exception
@ -303,7 +304,7 @@ public class DefaultMavenProjectBuilderTest
/** /**
* Tests whether external version range parent references are build correctly. * Tests whether external version range parent references are build correctly.
* *
* @throws Exception * @throws Exception in case of issue
*/ */
@Test @Test
public void testBuildParentVersionRangeExternallyWithChildVersionExpression() throws Exception public void testBuildParentVersionRangeExternallyWithChildVersionExpression() throws Exception
@ -319,34 +320,34 @@ public class DefaultMavenProjectBuilderTest
assertThat( e.getMessage(), containsString( "Version must be a constant" ) ); assertThat( e.getMessage(), containsString( "Version must be a constant" ) );
} }
/** /**
* Ensure that when re-reading a pom, it should not use the cached Model * Ensure that when re-reading a pom, it should not use the cached Model
* *
* @throws Exception * @throws Exception in case of issue
*/ */
@Test @Test
public void rereadPom_mng7063() throws Exception 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" ); Files.copy( pomResource, pom, StandardCopyOption.REPLACE_EXISTING );
final ProjectBuildingRequest buildingRequest = newBuildingRequest(); }
try ( InputStream pomResource = MavenProject project = projectBuilder.build( pom.toFile(), buildingRequest ).getProject();
DefaultMavenProjectBuilderTest.class.getResourceAsStream( "/projects/reread/pom1.xml" ) ) assertThat( project.getName(), is( "aid" ) ); // inherited from artifactId
{
Files.copy( pomResource, pom, StandardCopyOption.REPLACE_EXISTING ); try ( InputStream pomResource =
} DefaultMavenProjectBuilderTest.class.getResourceAsStream( "/projects/reread/pom2.xml" ) )
{
MavenProject project = projectBuilder.build( pom.toFile(), buildingRequest ).getProject(); Files.copy( pomResource, pom, StandardCopyOption.REPLACE_EXISTING );
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" ) );
} }
project = projectBuilder.build( pom.toFile(), buildingRequest ).getProject();
assertThat( project.getName(), is( "PROJECT NAME" ) );
}
} }

View File

@ -83,7 +83,7 @@ public class PomConstructionTest
/** /**
* Will throw exception if url is empty. MNG-4050 * Will throw exception if url is empty. MNG-4050
* *
* @throws Exception * @throws Exception in case of issue
*/ */
@Test @Test
public void testEmptyUrl() public void testEmptyUrl()
@ -95,7 +95,7 @@ public class PomConstructionTest
/** /**
* Tests that modules is not overridden by profile * Tests that modules is not overridden by profile
* *
* @throws Exception * @throws Exception in case of issue
*/ */
/* MNG-786*/ /* MNG-786*/
@Test @Test
@ -114,7 +114,7 @@ public class PomConstructionTest
/** /**
* Will throw exception if doesn't find parent(s) in build * Will throw exception if doesn't find parent(s) in build
* *
* @throws Exception * @throws Exception in case of issue
*/ */
@Test @Test
public void testParentInheritance() public void testParentInheritance()
@ -171,7 +171,7 @@ public class PomConstructionTest
{ {
PomTestWrapper pom = buildPom( "dependency-scope/sub" ); PomTestWrapper pom = buildPom( "dependency-scope/sub" );
} }*/
/*MNG- 4010*/ /*MNG- 4010*/
@Test @Test
@ -193,7 +193,7 @@ public class PomConstructionTest
} }
/** MNG-4005: postponed to 3.1 /* MNG-4005: postponed to 3.1
public void testValidationErrorUponNonUniqueDependencyKey() public void testValidationErrorUponNonUniqueDependencyKey()
throws Exception throws Exception
{ {
@ -253,6 +253,7 @@ public class PomConstructionTest
} }
} }
*/ */
@Test @Test
public void testDuplicateDependenciesCauseLastDeclarationToBePickedInLenientMode() public void testDuplicateDependenciesCauseLastDeclarationToBePickedInLenientMode()
throws Exception throws Exception
@ -317,7 +318,6 @@ public class PomConstructionTest
"site" ) ), pom.getValue( "reporting/outputDirectory" ) ); "site" ) ), pom.getValue( "reporting/outputDirectory" ) );
} }
@Test @Test
public void testPluginOrder() public void testPluginOrder()
throws Exception 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/site/ap/child", pom.getValue( "distributionManagement/site/url" ) );
assertEquals( "https://parent.url/download", pom.getValue( "distributionManagement/downloadUrl" ) ); assertEquals( "https://parent.url/download", pom.getValue( "distributionManagement/downloadUrl" ) );
} }
//*/
@Test @Test
public void testNonInheritedElementsInSubtreesOverriddenByChild() public void testNonInheritedElementsInSubtreesOverriddenByChild()
throws Exception throws Exception

View File

@ -78,7 +78,7 @@ under the License.
<maven.site.path>ref/4-LATEST</maven.site.path> <maven.site.path>ref/4-LATEST</maven.site.path>
<checkstyle.violation.ignore>None</checkstyle.violation.ignore> <checkstyle.violation.ignore>None</checkstyle.violation.ignore>
<checkstyle.excludes>**/package-info.java</checkstyle.excludes> <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> </properties>
<modules> <modules>