ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mandie Smith <man...@houseofgnomes.net>
Subject Publishing multiple artifacts to a FileSystem repository and retrieving just one.
Date Thu, 09 Dec 2010 16:29:40 GMT
I have a project that is publishing multiple artifacts to a local
FileSystem repository.  Several of these artifacts are tar.gz and I'm
unable to retrieve them later.  It seems that the resolve either
expects there to be an ivy.xml in each directory for each artifact, or
it defaults to only looking for a .jar file.  Any ideas on what I'm
missing that would allow a resolve of a tar.gz from the local
FileSystem?

I appreciate any help.

Thanks,
Mandie

Here's a sample ivy.xml:

<?xml version="1.0"?>
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"
  xmlns:m="http://ant.apache.org/ivy/maven">

	<info organisation="myorg" module="YourModule" revision="4.9.0.23" />

	<configurations defaultconfmapping="%->default">
		<conf name="default" />
		<conf name="compile" />
		<conf name="bundled" transitive="false" />
		<conf name="runtime" transitive="false" />
		<conf name="internal" transitive="false" />
		<conf name="parent" transitive="false" />
		<conf name="provided" />
		<conf name="test" />
		<conf name="util" />
	</configurations>

	<publications>
		<artifact type="pom" />
		<artifact name="art1" type="pom" />
		<artifact name="art1" type="jar" />
		<artifact name="art2" type="tar.gz" />
		<artifact name="art2" type="pom" />
	</publications>

	<dependencies>
	</dependencies>
</ivy-module>


Here is the output of the publish:

:: loading settings :: file =
/home/ivytest/TestProject/target/build/headers/ivypublisher.xml
:: delivering :: myorg#YourModule;4.9.0.23 :: 4.9.0.23 :: release ::
Thu Dec 09 11:19:45 EST 2010
	delivering ivy file to /home/ivytest/TestProject/target/lib/ivy.xml
:: publishing :: myorg#YourModule
	published YourModule to
/home/ivytest/.ivy2/local/myorg/YourModule/4.9.0.23/YourModule-4.9.0.23.pom
	published art1 to
/home/ivytest/.ivy2/local/myorg/art1/4.9.0.23/art1-4.9.0.23.pom
	published art1 to
/home/ivytest/.ivy2/local/myorg/art1/4.9.0.23/art1-4.9.0.23.jar
	published art2 to
/home/ivytest/.ivy2/local/myorg/art2/4.9.0.23/art2-4.9.0.23.tar.gz
	published art2 to
/home/ivytest/.ivy2/local/myorg/art2/4.9.0.23/art2-4.9.0.23.pom
	published ivy to /home/ivytest/.ivy2/local/myorg/YourModule/4.9.0.23/ivy.xml


Here is the output of the resolve on the art1 artifact, which is a jar:

[ivy:resolve] main: Checking cache for: dependency: myorg#art1;4.9.0.+
{internal=[default]}
[ivy:resolve] no cached resolved revision for myorg#art1;4.9.0.+
[ivy:resolve] don't use cache for myorg#art1;4.9.0.+: checkModified=true
[ivy:resolve] 		tried /home/ivytest/.ivy2/local/myorg/art1/[revision]/ivy.xml
[ivy:resolve] 		tried
/home/ivytest/.ivy2/local/myorg/art1/[revision]/art1-[revision].jar
[ivy:resolve] local do not support transaction. ivy pattern and
artifact pattern do not use the same directory for revision
[ivy:resolve] 	local: no ivy file found for myorg#art1;4.9.0.+: using
default data
[ivy:resolve] 		[4.9.0.23] myorg#art1
[ivy:resolve] 	found myorg#art1;4.9.0.23 in local
[ivy:resolve] 	[4.9.0.23] myorg#art1;4.9.0.+

Here is the resolve for art2 which is a tar.gz:
[ivy:resolve] == resolving dependencies
myorg#YourModule1;1.0.20101209112153->myorg#art2;4.9.0.+
[internal->default]
[ivy:resolve] main: Checking cache for: dependency: myorg#art2;4.9.0.+
{internal=[default]}
[ivy:resolve] no cached resolved revision for myorg#art2;4.9.0.+
[ivy:resolve] don't use cache for myorg#art2;4.9.0.+: checkModified=true
[ivy:resolve] 		tried /home/ivytest/.ivy2/local/myorg/art2/[revision]/ivy.xml
[ivy:resolve] 		tried
/home/ivytest/.ivy2/local/myorg/art2/[revision]/art2-[revision].jar
[ivy:resolve] 	local: no ivy file nor artifact found for myorg#art2;4.9.0.+


The only place the ivy.xml exists is in the parent directory, yet the
jar resolves fine, but not the tar.gz.

~/.ivy2/local> find .
.
./myorg
./myorg/art1
./myorg/art1/4.9.0.23
./myorg/art1/4.9.0.23/art1-4.9.0.23.pom.md5
./myorg/art1/4.9.0.23/art1-4.9.0.23.jar
./myorg/art1/4.9.0.23/art1-4.9.0.23.pom
./myorg/art1/4.9.0.23/art1-4.9.0.23.jar.md5
./myorg/art1/4.9.0.23/art1-4.9.0.23.pom.sha1
./myorg/art1/4.9.0.23/art1-4.9.0.23.jar.sha1
./myorg/YourModule
./myorg/YourModule/4.9.0.23
./myorg/YourModule/4.9.0.23/YourModule-4.9.0.23.pom.sha1
./myorg/YourModule/4.9.0.23/ivy.xml.sha1
./myorg/YourModule/4.9.0.23/YourModule-4.9.0.23.pom.md5
./myorg/YourModule/4.9.0.23/ivy.xml.md5
./myorg/YourModule/4.9.0.23/ivy.xml
./myorg/YourModule/4.9.0.23/YourModule-4.9.0.23.pom
./myorg/art2
./myorg/art2/4.9.0.23
./myorg/art2/4.9.0.23/art2-4.9.0.23.pom.md5
./myorg/art2/4.9.0.23/art2-4.9.0.23.tar.gz
./myorg/art2/4.9.0.23/art2-4.9.0.23.pom.sha1
./myorg/art2/4.9.0.23/art2-4.9.0.23.pom
./myorg/art2/4.9.0.23/art2-4.9.0.23.tar.gz.md5
./myorg/art2/4.9.0.23/art2-4.9.0.23.tar.gz.sha1


The dependencies appear as follows:

		<dependency org="myorg" name="art1" rev="4.9.0.+" conf="internal" />
		<dependency org="myorg" name="art2" rev="4.9.0.+" conf="internal" />



Publish definition:

ivy.default.ivy.pattern [organization]/[module]/[revision]/ivy.xml
ivy.default.artifact.pattern
[organization]/[artifact]/[revision]/[artifact]-[revision].[ext]

ivy.default.ivy.user.dir ${user.home}/.ivy2
ivy.local.default.root ${ivy.default.ivy.user.dir}/local


		<filesystem name="write-local-module" m2compatible="false">
			<artifact pattern="${ivy.local.default.root}/${ivy.default.artifact.pattern}"
/>
			<ivy pattern="${ivy.local.default.root}/${ivy.default.ivy.pattern}" />
		</filesystem>


Resolve definition:

ivy.repository.releases releases
ivy.repository.thirdparty internal
ivy.repository.snapshots snapshots

ivy.default.ivy.user.dir ${user.home}/.ivy2
ivy.local.default.root ${ivy.default.ivy.user.dir}/local
ivy.default.ivy.pattern [organization]/[module]/[revision]/ivy.xml
ivy.default.artifact.pattern
[organization]/[artifact]/[revision]/[artifact]-[revision].[ext]


<ivysettings>
	<properties file="${ivy.settings.dir}/ivy.properties" override="false" />
	<settings defaultResolver="main" circularDependencyStrategy="warn" />

	<resolvers>
		<chain name="archiva">
			<ibiblio name="archiva-releases" m2compatible="true" usepoms="true"
				root="${ivy.repository.host}/${ivy.repository.releases}"
				checkmodified="true" changingPattern=".*" />
			<ibiblio name="archiva-snapshots" m2compatible="true"
				usepoms="true" root="${ivy.repository.host}/${ivy.repository.snapshots}"
				checkmodified="true" changingPattern=".*" />
			<ibiblio name="archiva-thirdparty" m2compatible="true"
				usepoms="true" root="${ivy.repository.host}/${ivy.repository.thirdparty}" />
		</chain>
		<filesystem name="local" checkmodified="true"
			changingPattern=".*" m2compatible="false">
			<artifact pattern="${ivy.local.default.root}/${ivy.default.artifact.pattern}"
/>
			<ivy pattern="${ivy.local.default.root}/${ivy.default.ivy.pattern}" />
		</filesystem>
		<chain name="main" returnFirst="true">
			<resolver ref="local" />
			<resolver ref="archiva" />
		</chain>
	</resolvers>
</ivysettings>

Mime
View raw message