You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-commits@incubator.apache.org by "Xavier Hanin (JIRA)" <ji...@apache.org> on 2007/07/04 09:33:04 UTC

[jira] Created: (IVY-557) Remove dependency on commons-cli

Remove dependency on commons-cli
--------------------------------

                 Key: IVY-557
                 URL: https://issues.apache.org/jira/browse/IVY-557
             Project: Ivy
          Issue Type: Improvement
          Components: Core
            Reporter: Xavier Hanin
            Priority: Minor


ATM to launch Ivy on the command line there is a mandatory dependency on commons-cli. This makes it much less easy to use Ivy command line (a simple java -jar would be enough without this dependency). Therefore removing this dependency by parsing args manually would help using the Ivy CLI more easily and more frequently.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (IVY-557) Remove dependency on commons-cli

Posted by "Tjeerd Verhagen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IVY-557?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tjeerd Verhagen updated IVY-557:
--------------------------------

    Attachment: patch_build.xml_add_main_and_path_20070708.txt

There is another way to solve the dependecies problem of a 'main' jar depending on other jars. Through the MANIFEST.MF, in which the (main) key 'Class-Path' can be specified. The value of this key should hold the path's to the other needed jars. For Ivy this means, it can reference to the 'commons-cli.jar' (and maybe other / extra jars in the future).

In addition to this I also added the key 'Main-Class', which makes it possible to just 'run the jar', as:
java -jar ivy-core.jar
No additioinal path to the class 'org.apache.ivy.Main' is needed any longer.


To read more about these keys, see paragraph 'Main Attributes':
http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html
http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#Main%20Attributes


> Remove dependency on commons-cli
> --------------------------------
>
>                 Key: IVY-557
>                 URL: https://issues.apache.org/jira/browse/IVY-557
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Xavier Hanin
>            Priority: Minor
>         Attachments: patch_build.xml_add_main_and_path_20070708.txt
>
>
> ATM to launch Ivy on the command line there is a mandatory dependency on commons-cli. This makes it much less easy to use Ivy command line (a simple java -jar would be enough without this dependency). Therefore removing this dependency by parsing args manually would help using the Ivy CLI more easily and more frequently.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-557) Remove dependency on commons-cli

Posted by "Xavier Hanin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511045 ] 

Xavier Hanin commented on IVY-557:
----------------------------------

I agree than duplicating code instead of reusing is a very bad practice, that's why we have created Ivy: to make code reuse easier. The problem with Ivy is that since it's a dependency manager itself, it's difficult to manage its dependencies. That's why we always ensure the core is usable without any dependency, even though we're not fan of pure SAX parsing for xml for instance, we keep our code dependent on core jdk. For commons-cli we are not talking about the core, but the standalone usage, that's why we accepted a third party dependency. But it makes usage more difficult: even with your patch, the dependencies need to be in one directory relative to the main jar. People do not always use an ivy zip distribution, but sometimes only the ivy jar alone downloaded from an http server. So the solution of providing classpath and main class MANIFEST entries is better than nothing, but not as good as removing the dependency. BTW, we do not provide the main class entry only because it can't work without the dependency.
So I'd recommend opening another issue for attaching your patch, because I don't think closing this one with your patch is a good idea. Does it make sense?

> Remove dependency on commons-cli
> --------------------------------
>
>                 Key: IVY-557
>                 URL: https://issues.apache.org/jira/browse/IVY-557
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Xavier Hanin
>            Priority: Minor
>         Attachments: patch_build.xml_add_main_and_path_20070708.txt
>
>
> ATM to launch Ivy on the command line there is a mandatory dependency on commons-cli. This makes it much less easy to use Ivy command line (a simple java -jar would be enough without this dependency). Therefore removing this dependency by parsing args manually would help using the Ivy CLI more easily and more frequently.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-557) Remove dependency on commons-cli

Posted by "Tjeerd Verhagen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12511220 ] 

Tjeerd Verhagen commented on IVY-557:
-------------------------------------

The discussed patch above have been moved to IVY-567.
Another additional package dependency check (if the commons-cli.jar can be loaded), is checked in under IVY-566.

> Remove dependency on commons-cli
> --------------------------------
>
>                 Key: IVY-557
>                 URL: https://issues.apache.org/jira/browse/IVY-557
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Xavier Hanin
>            Priority: Minor
>         Attachments: patch_build.xml_add_main_and_path_20070708.txt
>
>
> ATM to launch Ivy on the command line there is a mandatory dependency on commons-cli. This makes it much less easy to use Ivy command line (a simple java -jar would be enough without this dependency). Therefore removing this dependency by parsing args manually would help using the Ivy CLI more easily and more frequently.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (IVY-557) Remove dependency on commons-cli

Posted by "Tjeerd Verhagen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/IVY-557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510975 ] 

Tjeerd Verhagen commented on IVY-557:
-------------------------------------

In my patch 'patch_build.xml_add_main_and_path_20070708.txt' the key 'Class-Path' does (only) work if the created artifact is in it's build/articaft directory! I didn't check how it's normally distributed. Probalbly there should be a small change of the referenced path here.

> Remove dependency on commons-cli
> --------------------------------
>
>                 Key: IVY-557
>                 URL: https://issues.apache.org/jira/browse/IVY-557
>             Project: Ivy
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Xavier Hanin
>            Priority: Minor
>         Attachments: patch_build.xml_add_main_and_path_20070708.txt
>
>
> ATM to launch Ivy on the command line there is a mandatory dependency on commons-cli. This makes it much less easy to use Ivy command line (a simple java -jar would be enough without this dependency). Therefore removing this dependency by parsing args manually would help using the Ivy CLI more easily and more frequently.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.