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 Helmut Denk <he...@gmx.de> on 2007/10/25 12:20:57 UTC

problem retrieving SNAPSHOT artifacts from integration-server

hello ivy-users and developers,

i find ivy very usefull. great work !

i use ivy 2.0.0-beta1-local-20071022215402
build from svn-trunk. on xp and sles9 with java5.

here is a short description of my ivy-build:

my buildsystem uses 5 repositorys: local, shared,
snapshot, release, thirdparty.

	<resolvers>
		<chain name="default-resolver" dual="false">
			<resolver ref="local"/>
			<resolver ref="shared"/>
			<resolver ref="snapshot"/>
			<resolver ref="released"/>
			<resolver ref="thirdparty"/>
		</chain>
	</resolvers>

local and shared are local -> resolved by filesysten-resolvers.

snapshot, release and thirdparty are remote
-> resolved by url-resolvers and served by tomcat5
on the integration-server

i use changingPattern=".*-SNAPSHOT" for local,
shared and snapshot, which are the repositorys,
where the status=integration artifacts go as
*-SNAPSHOT.jar for the use in developer-,
team- and public-scope.

this means, that the snapshot-repository is remote for
the development-build but local for the integration-build
(development-build and integration-build use different
ivyconf) and the snapshot-repository is the repository where the
results of the integration-builds are published. overwriting
the results of  previous integration-builds.

so the developer resolves/retrieves artifacts
of the integration-builds from snapshot-repository
through the ivy-cache. this seems to make problems ...

here is a description of my problem(s):

1. developers have to clean the ivy-cache so that a
updated (by integration-build) mylib-1.0-SNAPSHOT.jar
is resolved from the snapshot-repository and retrieved
to the lib.dir.

i tried to set snapshot-resolver local="true" but
that produced an error because one can not do that
for an url-resolver.

2. if developers publish a local-scoped-version of
mylib-1.0-SNAPSHOT.jar to the local-repository, this
version is resolved/retrieved. but if developers drop
the local-scoped-version after checkin of the changes to scm
and there is no mylib-1.0-SNAPSHOT.jar in the cache from
a previous resolve against snapshot-repository, they
get an 'impossible to resolve error' for mylib-1.0-SNAPSHOT.jar.
they have to clear the ivy-cache to get it working
again.

i think the key-problem is that i resolve/retrieve SNAPSHOTS
from remote through the ivy-cache. i would like to have no
caching at all for the snapshot-repository. how can i
solve this ? or is there an even better solution ?

thanks + have a nice day


here i attach my ivyconf for the development-build
and some relevant ant-targets:

http://www.nabble.com/file/p13403873/ivy-snap.txt ivy-snap.txt 
-- 
View this message in context: http://www.nabble.com/problem-retrieving-SNAPSHOT-artifacts-from-integration-server-tf4689888.html#a13403873
Sent from the ivy-user mailing list archive at Nabble.com.


Re: problem retrieving SNAPSHOT artifacts from integration-server

Posted by Helmut Denk <he...@gmx.de>.
oh thanks. that helps. i'll check this out on monday.

i was missguided by this 
http://www.nabble.com/setting-up-snapshots-with-ivy%2C-not-picking-up-latest-snapshot-tf4597050.html#a13156360
sample-config 
in the ivy-user-forum. i should have read it more carefully ... 

as you mentioned, schema-validate for ivysettings
would by helpful for that kind of mistakes.

have a nice time 


Xavier Hanin wrote:
> 
> You should put the changingPattern on the resolver (in your case url), not
> the resolvers tag (which doesn't accept any attribute). The settings file
> is
> not validated ATM because we don't know its structure... The documentation
> about resolvers details common attributes to all resolvers, meaning that
> they are available on all resolvers, not on the resolvers tag. Please
> provide a patch to the doc if you think this should be made clearer.
> 
> 

-- 
View this message in context: http://www.nabble.com/problem-retrieving-SNAPSHOT-artifacts-from-integration-server-tf4689888.html#a13443351
Sent from the ivy-user mailing list archive at Nabble.com.


Re: problem retrieving SNAPSHOT artifacts from integration-server

Posted by Xavier Hanin <xa...@gmail.com>.
On 10/26/07, Helmut Denk <he...@gmx.de> wrote:
>
>
> explaining a problem often helps to understand
> the essence ... ;-). maybe i should ask another
> question.
>
> assume i have a url-resolver like this:
>
> <resolvers changingPattern=".*-SNAPSHOT">
>   <url name="some-snapshot-repository" checkmodified="true">
>     <ivy pattern="somepattern" />
>     <artifact pattern="somepattern" />
>   </url>
> </resolvers>


You should put the changingPattern on the resolver (in your case url), not
the resolvers tag (which doesn't accept any attribute). The settings file is
not validated ATM because we don't know its structure... The documentation
about resolvers details common attributes to all resolvers, meaning that
they are available on all resolvers, not on the resolvers tag. Please
provide a patch to the doc if you think this should be made clearer.

HTH,

Xavier

why do i have to clean ivy-cache to get an
> updated mylib-1.0-SNAPSHOT.jar in my lib.dir ?
>
> i mean it's marked changing by the changingPattern.
> i would expect, that resolve compares timestamps and
> updates mylib-1.0-SNAPSHOT.jar in the cache. retrieve
> should update mylib-1.0-SNAPSHOT.jar in the lib.dir afterwards.
>
> hint: i use tomcat to server the remote repositorys. could that be
> the source of the problem ? the url-resolver may not be able
> to read the timestamp(s) ...
>
> cheers helmut
> --
> View this message in context:
> http://www.nabble.com/problem-retrieving-SNAPSHOT-artifacts-from-integration-server-tf4689888.html#a13420177
> Sent from the ivy-user mailing list archive at Nabble.com.
>
>


-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

Re: problem retrieving SNAPSHOT artifacts from integration-server

Posted by Helmut Denk <he...@gmx.de>.
explaining a problem often helps to understand
the essence ... ;-). maybe i should ask another
question.

assume i have a url-resolver like this: 

<resolvers changingPattern=".*-SNAPSHOT">
  <url name="some-snapshot-repository" checkmodified="true">
    <ivy pattern="somepattern" />
    <artifact pattern="somepattern" />
  </url>
</resolvers>

why do i have to clean ivy-cache to get an
updated mylib-1.0-SNAPSHOT.jar in my lib.dir ?

i mean it's marked changing by the changingPattern.
i would expect, that resolve compares timestamps and
updates mylib-1.0-SNAPSHOT.jar in the cache. retrieve
should update mylib-1.0-SNAPSHOT.jar in the lib.dir afterwards.

hint: i use tomcat to server the remote repositorys. could that be 
the source of the problem ? the url-resolver may not be able
to read the timestamp(s) ...

cheers helmut
-- 
View this message in context: http://www.nabble.com/problem-retrieving-SNAPSHOT-artifacts-from-integration-server-tf4689888.html#a13420177
Sent from the ivy-user mailing list archive at Nabble.com.