[ http://jira.codehaus.org/browse/MDEP-26?page=comments#action_80723 ] 
            
Timo Wolf commented on MDEP-26:
-------------------------------

Hi All,

In addition, it would make sense to write the dependencies into a file with a 
defined pattern.

I am using the assembly plugin to create a Mac OS X java application. OS X 
applications are using an xml file to describe the application, containing the 
main class and the jar files that are in the classpath.

Currently I have to change the xml file by hand if I add a new jar file or if I 
am using a new version.

Below is a sample of the xml file used by OS X.

<key>Java</key>
<dict>
        <key>Arguments</key>
     <string>rat.properties</string>
        <key>ClassPath</key>
        <array>
         <string>ant-optional.jar</string>
         <string>avalon-framework.jar</string>
         <string>batik-1.5-fop.jar</string>
         <string>binding.jar</string>
         <string>colt.jar</string>
         <string>commons-beanutils.jar</string>
         <string>commons-collections.jar</string>
     </array>
</dict>


> New goal to write classpath string with all dependencies from local repo
> ------------------------------------------------------------------------
>
>                 Key: MDEP-26
>                 URL: http://jira.codehaus.org/browse/MDEP-26
>             Project: Maven 2.x Dependency Plugin
>          Issue Type: New Feature
>    Affects Versions: 1.0
>            Reporter: Anagnostopoulos Kostis
>         Assigned To: Brian Fox
>            Priority: Minor
>         Attachments: MDEP-26_BuildClasspathMojo.java
>
>
> Hi to all,
> 'm wondering whether it would be usefull to make a new mojo that when 
> executed it will output a text file containing the required classpath string 
> to run a project directly from the local repository.
> For instance, the file would contain a classpath string like that :
> {noformat}  
>     /home/foo/.m2/repository/org/java/utils/util/util-1.0.jar:/home/foo/.m2/ 
> ....
> {noformat}  
> The result file could then be used like that:
> {noformat}  
>     java -cp `cat resultFile` MyClass
> {noformat}  
> The new goal should maybe a sub-class of AbstractFromDependenciesMojo.
> In that case, the "useSubDirectoryPerType" and "useSubDirectoryPerArtifact" 
> params should move to (copy/unpack)-dependencies mojo classes.  Anyway, these 
> params are only used by sub-classes, so, their definition should be propably 
> inside of those.
> Next are the parameters of the mojo i propose:
> ----
> goal name: dependency:printClasspath
> params:
> || Param Name || Type || Description
> | outputFile        | File     | The file to write the classpath string into. 
> |
> | overwrite          | boolean|  If true, re-write file even when nothing has 
> changed. |
> | includeTypes  | String | Comma Separated list of Types to include. |
> | excludeTypes | String | Comma Separated list of Types to exclude |
> | includeProjectArtifact| boolean | see [this 
> issue|http://jira.codehaus.org/browse/MDEP-25]. |

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

        

Reply via email to