How to resolve Maven exec plugin: classpath too long error?

This is a Maven exec plugin bug, it is documented in MEXEC-68 the reporter created a patch so I hope it will be resolved soon.

This is a Maven exec plugin bug, it is documented in MEXEC-68, the reporter created a patch so I hope it will be resolved soon. One workaround would be to add the classpath to the manifest file using this config for the maven-jar-plugin, add the dependencies to a folder and add just that folder to the CLASSPATH envvar. For example: ... org.apache.maven.

Plugins maven-jar-plugin ... true ... ... This will add to the manifest something like: Class-Path: plexus-utils-1.1. Jar commons-lang-2.1. Jar If that JARs are in a CLASSPATH folder, you can run your JAR using maven exec plugin hidding the classpath with something like: mvn exec:exec ... -Dexec. ClasspathScope="test" I used -Dexec. ClasspathScope="test" to make the plugin ignore the dependencies and add just the ones in scope test.

In Java 6 (which I hope you use) you can use wildcards in classpath entries. For the exact syntax check this page Setting the classpath and search to the right section by searching for "Understanding the class path and package names". Or you try shortening the paths by placing all required jars in a single folder with a short path.E.g.

C:\jars.

– jitter Jul 2 '09 at 6:54 Using Java 5, and it is out of my hands to upgrade it (A upgrade is requested to the customer though) – Tor-Morten Jul 2 '09 at 8:02.

This problem is fixed in Netbeans 6.10M1. Please take a look at Bug 188864. If you have an older version, you can still fix this yourself (you just have to edit an xml file inside org-netbeans-modules-maven.

Jar). Then, don't forget to check Maven Best Practices (wiki.netbeans.org/MavenBestPractices#Bin...) where it is explained how to bind maven goals to IDE actions. Regards, Mach.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions