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

Max Calderoni updated MEXEC-65:
-------------------------------

    Attachment:     (was: ExecMojo.java)

> reference a dependency specified in pom from the arguments list
> ---------------------------------------------------------------
>
>                 Key: MEXEC-65
>                 URL: http://jira.codehaus.org/browse/MEXEC-65
>             Project: Maven 2.x Exec Plugin
>          Issue Type: New Feature
>          Components: exec
>    Affects Versions: 1.1.1
>            Reporter: Max Calderoni
>         Attachments: MEXEC-65.patch
>
>
> Was suggested to file a feature request and then possibly contribute instead 
> of creating a new plugin.
> The original request is described here: 
> http://n2.nabble.com/resolve-jar-path-by-specifying-dependency-with-a-property-td2494162.html#a2494162
> Feature basically  is about referencing a dependency specified in the same 
> pom where the maven exec plugin is used.
> So, a dependency like:
>         <dependency>
>             <groupId>net.whatever.domain</groupId>
>             <artifactId>mydep</artifactId>
>             <version>1.4</version>
>             <scope>test</scope>
>         </dependency>
> could be referenced in an exec plugin's argument list in the same pom by 
> something like:
>                         
> <argument>-Xbootclasspath/a:{project.dependencies.dependency.mydep.jar}</argument>
>                         
> <argument>-javaagent:{project.dependencies.dependency.mydep.jar}</argument>
> It would be a handy addition, because this way you would not need to hardcode 
> paths in the pom.
> Not sure what the ideal notation could be:i am using curly brackets in my 
> example.
> In my simplistic first crack at it (attached), i am basically editing 
> ExecMojo.execute() method. In ExecMojo i am adding a method (String 
> findJarDep(String identifier)) that parses the identifier and then uses 
> Artifact to return the path to the jar adding it to the commandArguments list.
> Obviously i would like to hear from someone if this addition would make 
> sense, suggestions etc, before i start making it better with correct 
> exception handling, tests, etc (did that i few minutes as a first draft to 
> get the idea).

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