Domanda

I am using the Exec Maven Plugin to run a java program inside of my maven build. I have a problem when executing this java program using the exec plugin, because it executes with a classpath which contains the project's dependencies, including an xml parser implementation which is not wanted in the executed java program and leads to errors. Setting of the attribute "includeProjectDependencies" to false is not an option, because I need the other dependencies from the project (and don't want to set them explicitly to plugins execution configuration to avoid duplication). Is there a way to exclude it from the classpath when running the program through the exec plugin? I only know how I could exclude the dependency in the project (which is wrong because I need it in the resulting war-file) or how to exclude dependencies of the plugin, but cannot find a way how to exclude the project's dependency when executing the plulgin...

I hope there is a way to achieve what I want and would be very helpful if anybody could give me some advice.

Thnx, Marko

È stato utile?

Soluzione

There is issue created please follow it.

If you really need it for your development purpose build and use locally

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top