[ 
http://jira.codehaus.org/browse/MEXEC-66?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Trevor Lohrbeer updated MEXEC-66:
---------------------------------

    Attachment: patch-allowing-classpath-additions.patch

Attached is a patch for the 1.2 codebase which fixes the problem in the same 
way as the other poster described, by replacing the token "%classpath" with the 
calculated classpath, but not requiring the token be an exact-match with the 
argument. 

We were running into the same issue. Our application uses classpaths to 
identify external resources like plugins and form templates, which are not 
packaged into JARs. Normally we include the path to the application root in the 
classpath, which allows us to then request sub-directories as resources.

To use NetBeans, we needed a way to add directories onto the classpath without 
having to manually add all our JAR files. This patch fixes the problem.

Since it seems other users are also running into this problem, it would be 
greatly appreciated if this, or something similar, could be integrated into the 
main codebase so we don't have to maintain a separate branch as you continue to 
develop the exec plugin. Thanks.


> ability to add custom classpath together with %classpath placeholder
> --------------------------------------------------------------------
>
>                 Key: MEXEC-66
>                 URL: http://jira.codehaus.org/browse/MEXEC-66
>             Project: Maven 2.x Exec Plugin
>          Issue Type: Improvement
>          Components: exec
>    Affects Versions: 1.2
>            Reporter: Petr Skokan
>         Attachments: patch-allowing-classpath-additions.patch
>
>
>  I am currently using NetBeans, which are using mvn:exec for execution of
>  the maven projects. I am not sure if you know NetBeans , however they
> allow to use custom run/debug configurations in which you can customize
>  for example mvn:exec run parameters. 
>  mvn:exec is using  "%classpath" placeholder to resolve the pom dependencies. 
> However as it
>  is using equals method to check the command line params for placeholder,
>  it does not allow currently to put additional jars or folders to the
>  classpath resolved from pom. That is a bit disadvantage especially in
>  NetBeans, which are strict as they are using this mvn:exec plugin.
>  So we have modified the resolution of the %classpath
>  placeholder in mvn:exec so, that now we can specify for example
>  ' -classpath %classpath:${debug_classpath}'.
>  I think this would be very useful even for normal mvn:exec usage. I am not 
> sure though if there is
>  some reason behind the fact that mvn:exec is limited strictly to use one of 
> those options separately.
> So currently you can use either  %classpath without possibility to add 
> additional classpath or custom classpath, but without 
> possibility to combine both on command line.
> So I would vote for giving this freedom of defining custom classpath together 
> with usage of %claspath placeholder in future release.
> Best regards,
> Petr Skokan.
> MGM technology partners
> www.mgm-tp.com

-- 
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


Reply via email to