You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
testNoSources checks directory existence instead of jar file absence #308
In SourceJarMojoTest.java:93-97 and TestSourceJarMojoTest.java:80-84:
publicvoidtestNoSources(AbstractSourceJarMojomojo) throwsException {
mojo.execute();
finalFileexpectedFile = getTestTargetDir("project-005");
assertFalse(
expectedFile.exists(),
"Source archive should not have been created[" + expectedFile.getAbsolutePath() + "]");
}
getTestTargetDir("project-005") returns /basedir/target/test-classes/unit/project-005/target — a directory, not the jar file itself. If the test environment pre-creates this directory (e.g., from a previous test run or build scaffolding), the assertion would fail even though no source archive was created.
A more robust check would verify the specific jar file does not exist.
Activity
Assert the source archive itself is absent in testNoSources (apache#318)