Hi, I'm new to Ivy. I've some problems unpacking the dependencies with Ivy. We have here c++ projects with some external pre-compiled libraries. I want to publish them to the artifactory server and manage these dependencies with Ivy. As they are pre-compiled libraries with header files, I pack them as zip folders and after retrieving Ivy should extract them. But Ivy doesn't extract them.
First of all here is my ivysettings.xml: <?xml version="1.0" encoding="UTF-8"?> <ivy-settings> <settings defaultResolver="my-artifactory " /> <!--Authentication required for publishing (deployment). 'Artifactory Realm' is the realm used by Artifactory so don't change it.--> <credentials host="my.artifactory.domain" realm="Artifactory Realm" username="" passwd="" /> <resolvers> <ibiblio name="my-artifactory" m2compatible="true" root="http:// my.artifactory.domain /artifactory/libs-release-local" /> </resolvers> </ivy-settings> Here is the mymodule/ivy.xml for module publishing: <ivy-module version="2.0"> <info organisation="com.mycompany.mymodule" module="mymodule"/> <publications> <artifact name="mymodule-win64" type="zip" ext="zip" packaging="zip" /> </publications> </ivy-module> Here is the myproject/ivy.xml for the project where the dependencies are defined: <ivy-module version="2.0"> <info organisation="com.mycompany.mymodule" module="mymodule"/> <dependencies> <dependency org="com.vasco.aal2" name="aal2sdk" rev="3.15.0"> <artifact name="mymodule-win64" type="zip" ext="zip" /> </dependency> </dependencies> </ivy-module> First of all we don't use ant in our environment. Therefore the only possibility for us is the standalone. Now my workflow is as follows: First step, I publish the modules as follows: * java -jar ivy.jar -settings "ivysettings.xml" -ivy "mymodule/ivy.xml" -publish "my-artifactory" -publishpattern "[artifact].[ext]" -revision "1.2.3" -overwrite There is no problem here. Actually the above step should be done once whenever a new version of the external library is there. Now the second step is retrieve: * java -jar ivy.jar -settings "ivysettings.xml" -ivy "myproject/ivy.xml" -retrieve "myproject/lib/[artifact].[ext]" -sync -m2compatible Then in lib folder I got only the mymodule-win64.zip, and it is not unpacked, although during publishing I said packaging="zip". Then I tried to put packaging="zip" in the dependency/artifact definition but Ivy didn't accept it, because of the xsd schema failure. Then I opened the org/apache/ivy/plugins/parser/xml/ivy.xsd in ivy.jar and then I extend the attribute definition of dependency/artifact as follows: <xs:attribute name="packaging" type="xs:string"/> Here is the textual diff of ivy.xsd. # This patch file was generated by NetBeans IDE # It uses platform neutral UTF-8 encoding and \n newlines. --- <html>ivy.xsd (<b>May 23, 2014 7:56:50 PM</b>)</html> +++ <html><b>Current File</b></html> @@ -188,6 +188,7 @@ <xs:attribute name="ext" type="xs:string"/> <xs:attribute name="conf" type="xs:string"/> <xs:attribute name="url" type="xs:string"/> + <xs:attribute name="packaging" type="xs:string"/> <xs:anyAttribute namespace="##other" processContents="lax" /> </xs:complexType> </xs:element> After that I could put packaging attribute in myproject/ivy.xml in the dependency/artifact, and now after retrieve Ivy unpacks my zip dependencies. Now I have 2 questions: 1) Did I use the Ivy false in the first case to unpack the dependencies? If yes, how to do it? 2) Did I discover a bug in ivy.xsd with a possible fix? If yes, is it acceptable? Kind regards, Tamer Erdogan Software Development Engineer VASCO Data Security Austria GmbH 1230 Wien, Perfektastr. 45 tamer.erdo...@vasco.com<mailto:tamer.erdo...@vasco.com> P Please consider the environment before printing this email ________________________________ CONFIDENTIALITY NOTICE: The information contained in this transmittal, including any attachment, is privileged and confidential information and is intended only for the person or entity to which it is addressed. If you are neither the intended recipient nor the employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any disclosure, copying or distribution or the taking of any action in reliance on the contents of this transmittal is strictly prohibited. If you have received this transmittal in error, please contact the sender immediately and delete this transmittal from any computer or other data bank. Opinions, conclusions and other information in this message that do not relate to the official business of the company shall be understood as neither given nor endorsed by it. Thank you. ________________________________