[ 
http://jira.codehaus.org/browse/MEXEC-28?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=228779#action_228779
 ] 

jieryn commented on MEXEC-28:
-----------------------------

Why can't you simply:

if (jar != null) {
  if (jar.indexOf(":") > 0) {
    parseGAVThenRun(jar);
  } else {
    File jarAbsolute;
    File jarFile = new File(jar);
    if (jarFile.isAbsolute()) {
      jarAbsolute = jarFile;
    }
    else {
      jarAbsolute = new File(basedir, jar);
    }

    runManifestMain(jarAbsolute);
  }
}

This may seem like a lot of effort to automatically detect what the user is 
trying to do, but I think it makes this plugin path quite a bit nicer. :-)

> exec plugin should be able to run the main class from a jar if the class if 
> not specified and one exists
> --------------------------------------------------------------------------------------------------------
>
>                 Key: MEXEC-28
>                 URL: http://jira.codehaus.org/browse/MEXEC-28
>             Project: Maven 2.x Exec Plugin
>          Issue Type: New Feature
>          Components: java
>    Affects Versions: 1.0.2
>            Reporter: Brett Porter
>


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