[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Packages using ivy




Hello Gio,

There are some packages which have Ivy used in the upstream build, but
it's disabled in the Debian build and instead the required jars are
injected from /usr/share/java using the classpath variable.

I would suggest an alternative solution: Ivy can read Maven
repositories, and we are building a Maven repository located in
/usr/share/maven-repo. Many packages already package jars and Maven POM
files into this repository, and to add POM information to an existing
package not built with Maven, you can use the mh_install script provided
by maven-debian-helper.

So all you need to do it to locate all your dependencies, check that
they have been packaged with their associated Maven metadata, then
redirect Ivy to get its dependencies from /usr/share/maven-repo and to
use the Maven conventions when resolving paths.

Those ivy settings should work:

<ivysettings>
  <!--
	    This property is used later in the ivy.xml file to set
	    the project's revision. Unless overridden, it defaults
	    to the Maven SNAPSHOT convention, as that it works well
	    for publishing local test builds to ~/.m2/repository.
	  -->
	  <property name="revision" value="SNAPSHOT" override="false"/>
	
	  <!-- "debian-m2" is defined later in the file. -->
	  <settings defaultResolver="debian-m2"/>

	<resolvers>
	    <!--
	      for *retrieving* artifacts for local testing builds,
	      we'll use maven's own .m2/repository.
	    -->
	    <ibiblio
	      name="debian-m2"
	      m2compatible="true"
	      root="file:///usr/share/maven-repo"/
	      changingPattern=".*SNAPSHOT">	
	</resolvers>
</ivysettings>

(credits:
http://draconianoverlord.com/2010/07/18/publishing-to-maven-repos-with-ivy.html)

Ludovic

On 20/01/11 00:23, Giovanni Mascellani wrote:
> Hi.
> 
> I'm trying to package an application which heavily uses ivy (the
> application is osmosis, version 0.38). I kind of worked out how to do it
> without having ivy that automatically tries to connect to the Internet,
> save artifacts in strange caches all around the filesystem and similar
> things. Unfortunately, I found no documentation of previous experiences
> with packages using ivy.
> 
> Does anyone already uses ivy in some packages? Does anyone have
> suggestions or interesting links?
> 
> Thanks, Gio.


Reply to: