You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by TJ <ub...@tjworld.net> on 2008/08/19 23:44:31 UTC

Ivy and Ubuntu/Debian Java package build failures

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.


Re: Ivy and Ubuntu/Debian Java package build failures

Posted by TJ <ub...@tjworld.net>.
On Wed, 2008-08-20 at 13:38 +0200, Gilles Scokart wrote:
> You can define the ant property "ivy.cache.dir", or you can also
> redefine "ivy.home" (which point by default to $HOME/.ivy)

Thanks, that was just what it needed. I've added a patch that simply
inserts the value into red5's build.properties file:

ivy.home=debian/.ivy

There might be some minor finessing to make it perfect but that has
removed the road-block.

Many thanks,

TJ.


Re: Ivy and Ubuntu/Debian Java package build failures

Posted by Gilles Scokart <gs...@gmail.com>.
You can define the ant property "ivy.cache.dir", or you can also
redefine "ivy.home" (which point by default to $HOME/.ivy)


2008/8/19 TJ <ub...@tjworld.net>:
> 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.
>
>



-- 
Gilles Scokart