On 7/4/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

As Ivy has a command line interface ... would it be useful, if the jars
are startable?


The problem is that Ivy for its command line usage has a dependency on
commons-cli. Thus it requires settings the classpath, which is not handled
properly by the JAR specification (relative paths, not a very good idea),
and one of the reasons behind JSR-277.

But I've already wondered if it wouldn't make sense to get rid of this
dependency on commons-cli. I use the command line interface to use Ivy as a
launcher, and having to get commons-cli (and its dependencies) in the
classpath for this makes it less straightforward to use.

WDYT?

Xavier

Jan



Index: build.xml
===================================================================
--- build.xml   (revision 553083)
+++ build.xml   (working copy)
@@ -255,6 +255,7 @@
                                <attribute name="Extension-name" value="
org.apache.ivy" />
                                <attribute name="Build-Version" value="${
build.version}" />
                                <attribute name="Bundle-Version" value="${
bundle.version}" />
+                               <attribute name="Main-Class" value="
org.apache.ivy.Main"/>
                        </manifest>
                        <fileset dir="${core.classes.build.dir}" />
                        <fileset dir="${ant.classes.build.dir}" />
@@ -270,6 +271,7 @@
                                <attribute name="Implementation-Version"
value="${build.version}" />
                                <attribute name="Implementation-Vendor"
value="Apache Software Foundation" />
                                <attribute name="Build-Version" value="${
build.version}" />
+                               <attribute name="Main-Class" value="
org.apache.ivy.Main"/>
                        </manifest>
                        <fileset dir="${core.classes.build.dir}" />
                        <fileset dir="${optional.classes.build.dir}" />






>-----Ursprüngliche Nachricht-----
>Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>Gesendet: Dienstag, 3. Juli 2007 18:07
>An: [EMAIL PROTECTED]
>Betreff: svn commit: r552892 - /incubator/ivy/core/trunk/build.xml
>
>Author: xavier
>Date: Tue Jul  3 09:06:31 2007
>New Revision: 552892
>
>URL: http://svn.apache.org/viewvc?view=rev&rev=552892
>Log:
>review jar manifest and generate small doc about jars (with
>contribution from Tjeerd Verhagen)
>
>Modified:
>    incubator/ivy/core/trunk/build.xml
>
>Modified: incubator/ivy/core/trunk/build.xml
>URL:
>http://svn.apache.org/viewvc/incubator/ivy/core/trunk/build.xml
>?view=diff&rev=552892&r1=552891&r2=552892
>===============================================================
>===============
>--- incubator/ivy/core/trunk/build.xml (original)
>+++ incubator/ivy/core/trunk/build.xml Tue Jul  3 09:06:31 2007
>@@ -246,34 +246,43 @@
>                               manifest="${basedir}/MANIFEST.MF">
>                       <metainf dir="${basedir}"
>includes="LICENSE,DISCLAIMER,NOTICE" />
>                       <manifest>
>+                              <attribute
>name="Specification-Title" value="Apache Ivy with Ant tasks" />
>+                              <attribute
>name="Specification-Version" value="${build.version}" />
>+                              <attribute
>name="Specification-Vendor" value="Apache Software Foundation" />
>+                              <attribute
>name="Implementation-Title" value="org.apache.ivy" />
>+                              <attribute
>name="Implementation-Version" value="${build.version}" />
>+                              <attribute
>name="Implementation-Vendor" value="Apache Software Foundation" />
>+                              <attribute
>name="Extension-name" value="org.apache.ivy" />
>                               <attribute name="Build-Version"
>value="${build.version}" />
>                               <attribute
>name="Bundle-Version" value="${bundle.version}" />
>-                              <section name="org/apache/ivy">
>-                                      <attribute
>name="Extension-name" value="org.apache.ivy" />
>-                                      <attribute
>name="Specification-Title" value="Apache Ivy" />
>-                                      <attribute
>name="Specification-Version" value="${build.version}" />
>-                                      <attribute
>name="Specification-Vendor" value="Apache Software Foundation" />
>-                                      <attribute
>name="Implementation-Title" value="org.apache.tools.ant" />
>-                                      <attribute
>name="Implementation-Version" value="${build.version}" />
>-                                      <attribute
>name="Implementation-Vendor" value="Apache Software Foundation" />
>-                              </section>
>                       </manifest>
>-                              <fileset
>dir="${core.classes.build.dir}" />
>-                              <fileset
>dir="${ant.classes.build.dir}" />
>-                              <fileset
>dir="${optional.classes.build.dir}" />
>+                      <fileset dir="${core.classes.build.dir}" />
>+                      <fileset dir="${ant.classes.build.dir}" />
>+                      <fileset dir="${optional.classes.build.dir}" />
>               </jar>
>               <jar
>destfile="${artifacts.build.dir}/${final.core.name}">
>                       <metainf dir="${basedir}"
>includes="LICENSE,DISCLAIMER,NOTICE" />
>                       <manifest>
>+                              <attribute
>name="Specification-Title" value="Apache Ivy Core (without Ant
>tasks)" />
>+                              <attribute
>name="Specification-Version" value="${build.version}" />
>+                              <attribute
>name="Specification-Vendor" value="Apache Software Foundation" />
>+                              <attribute
>name="Implementation-Title" value="org.apache.ivy" />
>+                              <attribute
>name="Implementation-Version" value="${build.version}" />
>+                              <attribute
>name="Implementation-Vendor" value="Apache Software Foundation" />
>                               <attribute name="Build-Version"
>value="${build.version}" />
>                       </manifest>
>                       <fileset dir="${core.classes.build.dir}" />
>                       <fileset dir="${optional.classes.build.dir}" />
>               </jar>
>+              <echo
>file="${artifacts.build.dir}/readme.txt">The Ivy jars
>explained${line.separator}
>+${line.separator}
>+${final.name}    The full Ivy jar, including all Ivy
>classes.${line.separator}
>+${final.core.name}    The Ivy core, eg everything but classes
>dependent on Ant.${line.separator}
>+              </echo>
>+
>               <!-- clean generated module properties file -->
>               <delete
>file="${core.classes.build.dir}/module.properties" />
>       </target>
>-
>
>       <!--
>=================================================================
>            PUBLISH LOCAL
>
>
>




--
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://incubator.apache.org/ivy/
http://www.xoocode.org/

Reply via email to