[
http://jira.codehaus.org/browse/MEXEC-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Milos Kleint closed MEXEC-68.
-----------------------------
Resolution: Fixed
Fix Version/s: 1.1.2
Applied
http://fisheye.codehaus.org/changelog/mojo/?cs=10343
I've did some minor changes to the provided patch. I've removed the
NestedRuntimeException class as it's only used at places with rather low
probability of reaching.
Thanks for the patch.
> classpath too long problem
> --------------------------
>
> Key: MEXEC-68
> URL: http://jira.codehaus.org/browse/MEXEC-68
> Project: Maven 2.x Exec Plugin
> Issue Type: Bug
> Components: exec
> Affects Versions: 1.1.1
> Environment: windows xp, java 1.6
> Reporter: Mathias Arens
> Assignee: Milos Kleint
> Fix For: 1.1.2
>
> Attachments: exec-maven-plugin-long-classpath.patch
>
>
> If you try to run a project main class with a long list of dependencies the
> classpath grows larger than windows can handle on its command line. The maven
> exec plugin simply fails when the classpath is getting to large.
> The surefire plugin solves this issue by putting the classpath and the main
> class into a Manifest.mf file and wrapping it into a jar. I copied the
> createJar() routine from the ForkConfiguration class from the surefire-booter
> module to the ExecMojo plus two additional classes.
> I introduced a new attribute to the ExecMojo called longClasspath that can be
> set from the command line with -Dexec.longClasspath=true. If this flag is set
> to true a temporary jar file is created and executed. The command line
> arguments '-classpath %classpath mainClass' are replaced by '-jar
> maven-exec.jar' whilst the jar contains the main class and the classpath.
> I added a patch with my current implementation of the ExecMojo class based on
> revision 9948. The patch works perfectly fine even with maven modules that
> have long classpaths and where main classes cannot be executed with the
> current exec-plugin. But in the implementation I made several assumptions on
> the ordering of the command line arguments. I don't know all the assumptions
> are valid. At least the patch is a good starting point for a fix of this
> issue.
> Maybe the default value of the longClasspath attribute should be set to true
> in further releases because this is the default in the surefire plugin as
> well. And maybe somebody has a better attribute name for the longClasspath
> attribute.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email