ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TJ <ubu...@tjworld.net>
Subject Ivy and Ubuntu/Debian Java package build failures
Date Tue, 19 Aug 2008 21:44:31 GMT
I work on the Ubuntu project, and am trying to package the latest Java
red5 server from SVN. Red5 uses ant and ivy.

I'm hitting a problem which appears to be a conflict with the way Ivy
works, and the Debian/Ubuntu build scripts.

The issue appears to be the use of fakeroot by the standard build
system. A typical package build is done using:

$ fakeroot debian/rules binary

This method is the way all Ubuntu packages are built on the buildd
servers before the binary packages are made available in the
repositories.

Unfortunately this appears to conflict with the location of the Ivy
cache since the build will fail immediately after resolving dependencies
and before displaying the summary, with:

[ivy:resolve] 	found spring#spring-context-support;2.5.5 in googlecode
[ivy:resolve] 	found red5#jruby;1.0.3 in googlecode
[ivy:resolve] 	found red5#bcprov;jdk16-139 in googlecode

BUILD FAILED
/home/tj/Desktop/scrub/red5/red5-0.7.0/build.xml:238: The following error occurred while executing
this line:
/home/tj/Desktop/scrub/red5/red5-0.7.0/build.xml:254: The following error occurred while executing
this line:
/home/tj/Desktop/scrub/red5/red5-0.7.0/build.xml:197: impossible to resolve dependencies:
	java.io.FileNotFoundException: /root/.ivy2/cache/resolved-red5-server-working@hephaestion.xml
(No such file or directory)

Total time: 28 seconds

A build using just:

$ ant

will show:

[ivy:resolve] 	found spring#spring-context-support;2.5.5 in googlecode
[ivy:resolve] 	found red5#jruby;1.0.3 in googlecode
[ivy:resolve] 	found red5#bcprov;jdk16-139 in googlecode
[ivy:resolve] :: resolution report :: resolve 2195ms :: artifacts dl 77ms
	---------------------------------------------------------------------
	|                  |            modules            ||   artifacts   |
	|       conf       | number| search|dwnlded|evicted|| number|dwnlded|
	---------------------------------------------------------------------
	|       java6      |   61  |   0   |   0   |   0   ||   61  |   0   |
	---------------------------------------------------------------------
[ivy:retrieve] :: retrieving :: red5#server
[ivy:retrieve] 	confs: [java6]
[ivy:retrieve] 	0 artifacts copied, 61 already retrieved (0kB/98ms)

I noticed in the red5 build.xml in the 'clean' target it refers to:

	<target name="ivyclear" description="Clears out the Ivy cache">
        	<delete dir="${user.home}/.ivy/cache"/>
        	<delete dir="${user.home}/.ivy2/cache"/>

which was the only clue as to why this was happening. This is the only
place ${user.home} is defined in the red5 scripts, so I assume that Ivy
*assumes* this location by default when building.

Obviously, when using fakeroot (as the first error report shows) Ivy
believes the user to be root, when in fact that is being faked, and
hence the build fails.

Is there a way to force Ivy to use another (relative) location from the
build-root for its cache?

Many thanks.

TJ.


Mime
View raw message