mojohaus / aspectj-maven-plugin

https://www.mojohaus.org/aspectj-maven-plugin/
MIT License
114 stars 72 forks source link

Add configuration option to filter project dependencies in AJC classpath #194

Open asokolov-a1 opened 10 months ago

asokolov-a1 commented 10 months ago

Aspectj-maven-plugin 1.15.0 includes all of the project's dependencies (except pom-type) to the -classpath parameter for AJC (see here). In our project we use some dependencies that have yaml packaging type and they are added to the classpath, resulting in a compilation errors like this:

Failed to init Classpath for jar file /home/user/.m2/repository/<artifact_path>.yaml
java.util.zip.ZipException: zip END header not found
at
....
at org.codehaus.mojo.aspectj.AbstractAjcCompiler.execute(AbstractAjcCompiler.java:568)

It would be great if there was an option to filter out dependency types other than pom to prevent them from including in classpath (or, more general, a classpath customization/filtering feature).

kriegaex commented 10 months ago

I think, your chances to get attention will grow significantly if you provide an MCVE. It is not an everyday thing that a plugin defines its own packaging type, usually accompanied by a custom workflow mapping. Nobody wants to guess what that might look like and invent one by themselves. OTOH, without anything testable, nobody in their right minds would just commit it blindly, hoping to solve your problem. So please, share a link to a full, minimal reproducer. Thank you.