elharo opened a new issue, #308:
URL: https://github.com/apache/maven-source-plugin/issues/308
In `SourceJarMojoTest.java:93-97` and `TestSourceJarMojoTest.java:80-84`:
```java
public void testNoSources(AbstractSourceJarMojo mojo) throws Exception {
mojo.execute();
final File expectedFile = 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.
--
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]