Platform: debian 12.10 "bookworm", amd64, java 21.0.4, maven 3.8.7, 
exec-maven-plugin 3.5.0

If I add the jar file containing the mainClass as a compile scope
dependency on the project:
 
https://gist.github.com/steinarb/d177a1c1146fedf374608390fbbe4841#file-pom-xml-L119

Then this exec-maven-plugin runs (and does its thing, which is convert
an XSD schema to a Relax-NG XML Notation schema):
 
https://gist.github.com/steinarb/d177a1c1146fedf374608390fbbe4841#file-pom-xml-L168

But having a compile scope dependency on the project adds
msg-rngconverter as a transitive dependency on the project, and that has
many undesirable effects for me (specifically it becomes a runtime
dependency for the OSGi bundle the pom file is a part of).

So I tried reducing the scope to test, which the exec-maven-plugn
documentation says should be sufficient:
 https://www.mojohaus.org/exec-maven-plugin/java-mojo.html

But using test scope for the dependenct gives me this error:
 
https://gist.github.com/steinarb/d0abfd4c8497ae5c6b5ef4c70001fa7e#file-gistfile1-txt-L25

So I tried following this documentation
 
https://www.mojohaus.org/exec-maven-plugin/examples/example-exec-using-plugin-dependencies.html
and removed the project dependency and changed the config to this:
 
https://gist.github.com/steinarb/7521ccc87c2e843aa7ee80f23df24911#file-pom-xml-L163

But that gets the same build error as test scope dependency:
 
https://gist.github.com/steinarb/956af653af12919e256593ab4688ba98#file-gistfile1-txt-L21

Ideas? Tips? Something wrong in my config?

Thanks!


- Steinar


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to