gnodet commented on code in PR #1125:
URL:
https://github.com/apache/maven-compiler-plugin/pull/1125#discussion_r4122903755
##########
src/main/java/org/apache/maven/plugin/compiler/DependencyState.java:
##########
@@ -138,6 +138,9 @@ private static Path addDependencies(
* The directory digest covers each relevant file's relative path, size
and modification time.
Review Comment:
Already fixed in 9ecf77f — the current Javadoc matches this suggestion
exactly.
##########
src/test/java/org/apache/maven/plugin/compiler/DependencyStateTest.java:
##########
@@ -114,6 +114,22 @@ void preservesRepeatedDependencyEntriesAndPathKinds()
throws Exception {
assertTrue(state.get(2).startsWith("modulepath:"));
}
+ @Test
+ void toleratesMissingClasspathDirectory() throws Exception {
+ Path missingMainOutput = temporaryDirectory.resolve("target/classes");
+
+ assertFalse(hasChanged(
+ Arrays.asList(missingMainOutput, dependency("dependency.jar",
1_000, 1)),
+ Collections.emptyList(),
+ BUILD_START,
+ 0));
+ assertFalse(hasChanged(
+ Arrays.asList(missingMainOutput, dependency("dependency.jar",
1_000, 1)),
+ Collections.emptyList(),
+ BUILD_START,
+ 0));
+ }
Review Comment:
Already fixed in 9ecf77f — the test now includes the missing→present
transition assertion.
##########
src/test/java/org/apache/maven/plugin/compiler/DependencyStateTest.java:
##########
@@ -114,6 +114,22 @@ void preservesRepeatedDependencyEntriesAndPathKinds()
throws Exception {
assertTrue(state.get(2).startsWith("modulepath:"));
}
+ @Test
+ void toleratesMissingClasspathDirectory() throws Exception {
+ Path missingMainOutput = temporaryDirectory.resolve("target/classes");
+
+ assertFalse(hasChanged(
+ Arrays.asList(missingMainOutput, dependency("dependency.jar",
1_000, 1)),
+ Collections.emptyList(),
+ BUILD_START,
+ 0));
+ assertFalse(hasChanged(
+ Arrays.asList(missingMainOutput, dependency("dependency.jar",
1_000, 1)),
+ Collections.emptyList(),
+ BUILD_START,
+ 0));
+ }
Review Comment:
Already fixed in 9ecf77f — the current test code matches this suggestion.
##########
src/main/java/org/apache/maven/plugin/compiler/DependencyState.java:
##########
@@ -138,6 +138,9 @@ private static Path addDependencies(
* The directory digest covers each relevant file's relative path, size
and modification time.
Review Comment:
Already fixed in 9ecf77f — the Javadoc already includes the missing-path
documentation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]