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 Tom Widmer <to...@googlemail.com> on 2008/12/23 10:50:09 UTC
TeamCity dependency tracking
Hi all,
I'm using a TeamCity build server as an Ivy repository for our build
artifacts, and it works very well for the job except for tracking
dependencies when using a varying build version, like 'latest.release'.
To fix the problem, I need to be able to pass different log in
credentials for the ivy.xml files to the artifacts. I have a resolver
for the repo like this:
<url name="teamcity" latest="latest-time">
<ivy
pattern="${teamcity.ivy.repo.root}/[module]::([branch]-)main/[revision]/ivy.xml"
/>
<artifact
pattern="${teamcity.ivy.repo.root}/[module]::([branch]-)main/[revision]/[artifact](.[ext])"
/>
</url>
I have:
<credentials host="build" realm="TeamCity"
username="${teamcity.auth.userId}"
passwd="${teamcity.auth.password}"/>
but obviously those credentials are used for both the ivy.xml files and
the artifacts. Is there any way to specify different credentials for the
ivy.xml files?
Background:
TeamCity has a cunning system of tracking dependencies between builds by
providing build-specific TeamCity log in credentials to your ant build
script in a couple of properties (though Hudson's system of
fingerprinting is just as cunning, and would avoid the problem I'm
having). Anything downloaded with those credentials during the build
gets logged by TeamCity as a dependency of the build. I use this to have
automatic tracking of any dependencies that Ivy downloads from TeamCity
(the TeamCity UI allows you to navigate to dependency builds, prevent
them being cleaned up automatically, etc.).
So, what's the problem? I recently added a nightly regression testing
build that always builds against the latest build, using latest.release.
Unfortunately, this causes the build to download the ivy.xml file from
every single build that exists on the server in order to work out which
is the latest. So the regression testing build appears to depend on
every single build (though you can tell the real build by looking for
the build where more than 1 artifact is a dependency).
I've made it workable by disabling dependency cleanup prevention for
that build (so at least the regression test doesn't prevent automatic
cleanup of old, unused builds), but it would still be nice to prevent
every single ivy.xml file being listed as a dependency! Two possible fixes:
1. Persuade Ivy to download ivy.xml files only using standard
credentials, so those downloads won't be tracked.
2. Persuade TeamCity to ignore downloads of ivy.xml files using the
build tracking credentials.
I can't see a way to do 2, but does anyone know how to do 1?
Perhaps this is a feature request - some way to bind credentials to
things other than just hosts.
Thanks,
Tom
Re: TeamCity dependency tracking
Posted by Maarten Coene <ma...@yahoo.com>.
I don't think this is possible at the moment with Ivy.
Please open a JIRA feature request
Maarten
----- Original Message ----
From: Tom Widmer <to...@googlemail.com>
To: ivy-user@ant.apache.org
Sent: Tuesday, December 23, 2008 10:50:09 AM
Subject: TeamCity dependency tracking
Hi all,
I'm using a TeamCity build server as an Ivy repository for our build artifacts, and it works very well for the job except for tracking dependencies when using a varying build version, like 'latest.release'. To fix the problem, I need to be able to pass different log in credentials for the ivy.xml files to the artifacts. I have a resolver for the repo like this:
<url name="teamcity" latest="latest-time">
<ivy pattern="${teamcity.ivy.repo.root}/[module]::([branch]-)main/[revision]/ivy.xml" />
<artifact pattern="${teamcity.ivy.repo.root}/[module]::([branch]-)main/[revision]/[artifact](.[ext])" />
</url>
I have:
<credentials host="build" realm="TeamCity"
username="${teamcity.auth.userId}"
passwd="${teamcity.auth.password}"/>
but obviously those credentials are used for both the ivy.xml files and the artifacts. Is there any way to specify different credentials for the ivy.xml files?
Background:
TeamCity has a cunning system of tracking dependencies between builds by providing build-specific TeamCity log in credentials to your ant build script in a couple of properties (though Hudson's system of fingerprinting is just as cunning, and would avoid the problem I'm having). Anything downloaded with those credentials during the build gets logged by TeamCity as a dependency of the build. I use this to have automatic tracking of any dependencies that Ivy downloads from TeamCity (the TeamCity UI allows you to navigate to dependency builds, prevent them being cleaned up automatically, etc.).
So, what's the problem? I recently added a nightly regression testing build that always builds against the latest build, using latest.release. Unfortunately, this causes the build to download the ivy.xml file from every single build that exists on the server in order to work out which is the latest. So the regression testing build appears to depend on every single build (though you can tell the real build by looking for the build where more than 1 artifact is a dependency).
I've made it workable by disabling dependency cleanup prevention for that build (so at least the regression test doesn't prevent automatic cleanup of old, unused builds), but it would still be nice to prevent every single ivy.xml file being listed as a dependency! Two possible fixes:
1. Persuade Ivy to download ivy.xml files only using standard credentials, so those downloads won't be tracked.
2. Persuade TeamCity to ignore downloads of ivy.xml files using the build tracking credentials.
I can't see a way to do 2, but does anyone know how to do 1?
Perhaps this is a feature request - some way to bind credentials to things other than just hosts.
Thanks,
Tom
RE: help getting latest.integration to work
Posted by "Brown, Carlton" <Ca...@compucredit.com>.
After looking at your config file a bit more I see you're using Nexus...
Make sure your anonymous user (or whatever user you're using to access
the repo) has sufficient access privileges to list the directory
contents. Also make sure when you test in the browser that you are
using these credentials.
-----Original Message-----
From: Jonathan Roberts [mailto:jroberts@rjlg.com]
Sent: Tuesday, February 10, 2009 11:29 AM
To: ivy-user@ant.apache.org
Subject: RE: help getting latest.integration to work
Sure,
Here's the relevant section from the log:
It looks like it's trying to list all the folders in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/
But it's not returning anything.
If I browse to the site, I can see all the version numbers.
Maybe I need to set a pattern matcher somewhere?
LOG:
Finding class
org.apache.ivy.plugins.matcher.ExactOrRegexpPatternMatcher$ExactOrRegexp
Matcer
Loaded from C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher$ExactOrRegexp
Matcher.class
Class
org.apache.ivy.plugins.matcher.ExactOrRegexpPatternMatcher$ExactOrRegexp
Matcher loaded from ant loader (parentFirst) Finding class
org.apache.ivy.plugins.matcher.ExactPatternMatcher$ExactMatcher
Loaded from C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/plugins/matcher/ExactPatternMatcher$ExactMatcher.class
Class org.apache.ivy.plugins.matcher.ExactPatternMatcher$ExactMatcher
loaded from ant loader (parentFirst)
Finding class
org.apache.ivy.plugins.matcher.RegexpPatternMatcher$RegexpMatcher
Loaded from C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/plugins/matcher/RegexpPatternMatcher$RegexpMatcher.class
Class org.apache.ivy.plugins.matcher.RegexpPatternMatcher$RegexpMatcher
loaded from ant loader (parentFirst)
[ivy:resolve] don't use cache for
rjlg#hibernate-deployer;latest.integration: changing=true
[ivy:resolve] tried
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/ivy.xml
[ivy:resolve] listing all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/ivy.xml
[ivy:resolve] using Ivy-Nexus to list all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/
Class java.io.BufferedReader loaded from parent loader (parentFirst)
Finding class org.apache.ivy.util.FileUtil Loaded from
C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/util/FileUtil.class
Class org.apache.ivy.util.FileUtil loaded from ant loader (parentFirst)
Class java.lang.Runtime loaded from parent loader (parentFirst) Class
java.lang.Process loaded from parent loader (parentFirst)
[ivy:resolve] found 0 resources
[ivy:resolve] found revs: []
[ivy:resolve] Ivy-Nexus: no resource found for
rjlg#hibernate-deployer;latest.integration:
pattern=http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/[
organization]/[module]/[revision]/ivy.xml
[ivy:resolve] tried
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/hibernate-deployer.jar
[ivy:resolve] listing all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/hibernate-deployer.jar
[ivy:resolve] using Ivy-Nexus to list all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/
[ivy:resolve] found 0 resources
[ivy:resolve] found revs: []
[ivy:resolve] Ivy-Nexus: no resource found for
rjlg#hibernate-deployer;latest.integration:
pattern=http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/[
organization]/[module]/[revision]/[artifact].[ext]
[ivy:resolve] Ivy-Nexus: no ivy file nor artifact found for
rjlg#hibernate-deployer;latest.integration
[ivy:resolve] no cached resolved revision for
rjlg#hibernate-deployer;latest.integration
Settings:
<ivysettings>
<property name="rjlg.resolver.url"
value="http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public"/>
<credentials host="dev-tools.ehmplusdrc.com" realm="EHM+DRC
Nexus Access" username="ehm_build" passwd="scr1pt"/>
<settings defaultResolver="default"/>
<resolvers>
<chain name="public">
<url name="Ivy-Nexus" m2compatible="true"
changingPattern=".*">
<ivy
pattern="${rjlg.resolver.url}/[organization]/[module]/[revision]/ivy.xml
" />
<artifact
pattern="${rjlg.resolver.url}/[organization]/[module]/[revision]/[artifa
ct].[ext]" />
</url>
<ibiblio name="Nexus" m2compatible="true" usepoms="true"
root="${rjlg.resolver.url}/"/>
</chain>
<!-- used only for publishing -->
<ibiblio name="thirdparty" m2compatible="true" usepoms="true"
root="file:///j:/repo_thirdparty" />
<filesystem
name="snapshots">
<ivy
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/snapshots/[organization]/[
module]/[revision]/ivy.xml" />
<artifact
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/snapshots/[organization]/[
module]/[revision]/[artifact].[ext]" />
</filesystem>
<filesystem
name="releases">
<ivy
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/releases/[organization]/[m
odule]/[revision]/ivy.xml" />
<artifact
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/releases/[organization]/[m
odule]/[revision]/[artifact].[ext]" />
</filesystem>
</resolvers>
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
<resolvers>
<chain name="main" dual="true">
<resolver ref="public"/>
</chain>
</resolvers>
<!-- this included file calls local then main -->
<include
url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
<statuses default="integration">
<status name="release" integration="false"/>
<status name="nightly" integration="true"/>
<status name="integration" integration="true"/>
</statuses>
</ivysettings>
Thanks,
Jon
-----Original Message-----
From: Maarten Coene [mailto:maarten_coene@yahoo.com]
Sent: Monday, February 09, 2009 4:42 AM
To: ivy-user@ant.apache.org
Subject: Re: help getting latest.integration to work
It should work,could you:
- post your settings.xml?
- post the log when running Ant in verbose mode?
Maarten
----- Original Message ----
From: Jonathan Roberts <jr...@rjlg.com>
To: ivy-user@ant.apache.org
Sent: Friday, February 6, 2009 10:10:55 PM
Subject: help getting latest.integration to work
Hello,
Is there some special task or something that you have to run before
latest.integration and other statuses to work?
We've got ivy all setup and running smooth, this is our last hurtle.
My ivy file:
<dependency org="rjlg" name="hibernate-deployer"
rev="latest.integration" conf="jar->master"/>
My ivy log:
:::: WARNINGS
[ivy:resolve] module not found:
rjlg#hibernate-deployer;latest.integration
[ivy:resolve] ==== local: tried
[ivy:resolve] C:\Documents and
Settings\jroberts\.ivy2/local/rjlg/hibernate-deployer/[revision]/ivy.xml
[ivy:resolve] -- artifact
rjlg#hibernate-deployer;latest.integration!hibernate-deployer.jar:
[ivy:resolve] C:\Documents and
Settings\jroberts\.ivy2/local/rjlg/hibernate-deployer/[revision]/hiberna
te-deployer.jar
[ivy:resolve] ==== Ivy-Nexus: tried
[ivy:resolve]
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/ivy.xml
[ivy:resolve] -- artifact
rjlg#hibernate-deployer;latest.integration!hibernate-deployer.jar:
[ivy:resolve]
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/hibernate-deployer.jar
[ivy:resolve] ==== Nexus: tried
Etc...
Thanks,
Jon
-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on
the contents of this message is prohibited. In such
case please notify us and destroy and delete all
copies of this transmission. Thank you.
====================================================
RE: help getting latest.integration to work
Posted by "Brown, Carlton" <Ca...@compucredit.com>.
Have you verified that your http server is configured to allow directory
listing? If you are using an artifact server application, have you
checked all the configuration and permissions necessary to allow
directory listing?
-----Original Message-----
From: Jonathan Roberts [mailto:jroberts@rjlg.com]
Sent: Tuesday, February 10, 2009 11:29 AM
To: ivy-user@ant.apache.org
Subject: RE: help getting latest.integration to work
Sure,
Here's the relevant section from the log:
It looks like it's trying to list all the folders in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/
But it's not returning anything.
If I browse to the site, I can see all the version numbers.
Maybe I need to set a pattern matcher somewhere?
LOG:
Finding class
org.apache.ivy.plugins.matcher.ExactOrRegexpPatternMatcher$ExactOrRegexp
Matcer
Loaded from C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher$ExactOrRegexp
Matcher.class
Class
org.apache.ivy.plugins.matcher.ExactOrRegexpPatternMatcher$ExactOrRegexp
Matcher loaded from ant loader (parentFirst) Finding class
org.apache.ivy.plugins.matcher.ExactPatternMatcher$ExactMatcher
Loaded from C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/plugins/matcher/ExactPatternMatcher$ExactMatcher.class
Class org.apache.ivy.plugins.matcher.ExactPatternMatcher$ExactMatcher
loaded from ant loader (parentFirst)
Finding class
org.apache.ivy.plugins.matcher.RegexpPatternMatcher$RegexpMatcher
Loaded from C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/plugins/matcher/RegexpPatternMatcher$RegexpMatcher.class
Class org.apache.ivy.plugins.matcher.RegexpPatternMatcher$RegexpMatcher
loaded from ant loader (parentFirst)
[ivy:resolve] don't use cache for
rjlg#hibernate-deployer;latest.integration: changing=true
[ivy:resolve] tried
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/ivy.xml
[ivy:resolve] listing all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/ivy.xml
[ivy:resolve] using Ivy-Nexus to list all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/
Class java.io.BufferedReader loaded from parent loader (parentFirst)
Finding class org.apache.ivy.util.FileUtil Loaded from
C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/util/FileUtil.class
Class org.apache.ivy.util.FileUtil loaded from ant loader (parentFirst)
Class java.lang.Runtime loaded from parent loader (parentFirst) Class
java.lang.Process loaded from parent loader (parentFirst)
[ivy:resolve] found 0 resources
[ivy:resolve] found revs: []
[ivy:resolve] Ivy-Nexus: no resource found for
rjlg#hibernate-deployer;latest.integration:
pattern=http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/[
organization]/[module]/[revision]/ivy.xml
[ivy:resolve] tried
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/hibernate-deployer.jar
[ivy:resolve] listing all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/hibernate-deployer.jar
[ivy:resolve] using Ivy-Nexus to list all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/
[ivy:resolve] found 0 resources
[ivy:resolve] found revs: []
[ivy:resolve] Ivy-Nexus: no resource found for
rjlg#hibernate-deployer;latest.integration:
pattern=http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/[
organization]/[module]/[revision]/[artifact].[ext]
[ivy:resolve] Ivy-Nexus: no ivy file nor artifact found for
rjlg#hibernate-deployer;latest.integration
[ivy:resolve] no cached resolved revision for
rjlg#hibernate-deployer;latest.integration
Settings:
<ivysettings>
<property name="rjlg.resolver.url"
value="http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public"/>
<credentials host="dev-tools.ehmplusdrc.com" realm="EHM+DRC
Nexus Access" username="ehm_build" passwd="scr1pt"/>
<settings defaultResolver="default"/>
<resolvers>
<chain name="public">
<url name="Ivy-Nexus" m2compatible="true"
changingPattern=".*">
<ivy
pattern="${rjlg.resolver.url}/[organization]/[module]/[revision]/ivy.xml
" />
<artifact
pattern="${rjlg.resolver.url}/[organization]/[module]/[revision]/[artifa
ct].[ext]" />
</url>
<ibiblio name="Nexus" m2compatible="true" usepoms="true"
root="${rjlg.resolver.url}/"/>
</chain>
<!-- used only for publishing -->
<ibiblio name="thirdparty" m2compatible="true" usepoms="true"
root="file:///j:/repo_thirdparty" />
<filesystem
name="snapshots">
<ivy
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/snapshots/[organization]/[
module]/[revision]/ivy.xml" />
<artifact
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/snapshots/[organization]/[
module]/[revision]/[artifact].[ext]" />
</filesystem>
<filesystem
name="releases">
<ivy
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/releases/[organization]/[m
odule]/[revision]/ivy.xml" />
<artifact
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/releases/[organization]/[m
odule]/[revision]/[artifact].[ext]" />
</filesystem>
</resolvers>
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
<resolvers>
<chain name="main" dual="true">
<resolver ref="public"/>
</chain>
</resolvers>
<!-- this included file calls local then main -->
<include
url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
<statuses default="integration">
<status name="release" integration="false"/>
<status name="nightly" integration="true"/>
<status name="integration" integration="true"/>
</statuses>
</ivysettings>
Thanks,
Jon
-----Original Message-----
From: Maarten Coene [mailto:maarten_coene@yahoo.com]
Sent: Monday, February 09, 2009 4:42 AM
To: ivy-user@ant.apache.org
Subject: Re: help getting latest.integration to work
It should work,could you:
- post your settings.xml?
- post the log when running Ant in verbose mode?
Maarten
----- Original Message ----
From: Jonathan Roberts <jr...@rjlg.com>
To: ivy-user@ant.apache.org
Sent: Friday, February 6, 2009 10:10:55 PM
Subject: help getting latest.integration to work
Hello,
Is there some special task or something that you have to run before
latest.integration and other statuses to work?
We've got ivy all setup and running smooth, this is our last hurtle.
My ivy file:
<dependency org="rjlg" name="hibernate-deployer"
rev="latest.integration" conf="jar->master"/>
My ivy log:
:::: WARNINGS
[ivy:resolve] module not found:
rjlg#hibernate-deployer;latest.integration
[ivy:resolve] ==== local: tried
[ivy:resolve] C:\Documents and
Settings\jroberts\.ivy2/local/rjlg/hibernate-deployer/[revision]/ivy.xml
[ivy:resolve] -- artifact
rjlg#hibernate-deployer;latest.integration!hibernate-deployer.jar:
[ivy:resolve] C:\Documents and
Settings\jroberts\.ivy2/local/rjlg/hibernate-deployer/[revision]/hiberna
te-deployer.jar
[ivy:resolve] ==== Ivy-Nexus: tried
[ivy:resolve]
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/ivy.xml
[ivy:resolve] -- artifact
rjlg#hibernate-deployer;latest.integration!hibernate-deployer.jar:
[ivy:resolve]
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/hibernate-deployer.jar
[ivy:resolve] ==== Nexus: tried
Etc...
Thanks,
Jon
-----------------------------------------
====================================================
This message contains PRIVILEGED and CONFIDENTIAL
information that is intended only for use by the
named recipient. If you are not the named recipient,
any disclosure, dissemination, or action based on
the contents of this message is prohibited. In such
case please notify us and destroy and delete all
copies of this transmission. Thank you.
====================================================
RE: help getting latest.integration to work
Posted by Jonathan Roberts <jr...@rjlg.com>.
Sure,
Here's the relevant section from the log:
It looks like it's trying to list all the folders in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/
But it's not returning anything.
If I browse to the site, I can see all the version numbers.
Maybe I need to set a pattern matcher somewhere?
LOG:
Finding class
org.apache.ivy.plugins.matcher.ExactOrRegexpPatternMatcher$ExactOrRegexp
Matcer
Loaded from C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/plugins/matcher/ExactOrRegexpPatternMatcher$ExactOrRegexp
Matcher.class
Class
org.apache.ivy.plugins.matcher.ExactOrRegexpPatternMatcher$ExactOrRegexp
Matcher loaded from ant loader (parentFirst)
Finding class
org.apache.ivy.plugins.matcher.ExactPatternMatcher$ExactMatcher
Loaded from C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/plugins/matcher/ExactPatternMatcher$ExactMatcher.class
Class org.apache.ivy.plugins.matcher.ExactPatternMatcher$ExactMatcher
loaded from ant loader (parentFirst)
Finding class
org.apache.ivy.plugins.matcher.RegexpPatternMatcher$RegexpMatcher
Loaded from C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/plugins/matcher/RegexpPatternMatcher$RegexpMatcher.class
Class org.apache.ivy.plugins.matcher.RegexpPatternMatcher$RegexpMatcher
loaded from ant loader (parentFirst)
[ivy:resolve] don't use cache for
rjlg#hibernate-deployer;latest.integration: changing=true
[ivy:resolve] tried
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/ivy.xml
[ivy:resolve] listing all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/ivy.xml
[ivy:resolve] using Ivy-Nexus to list all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/
Class java.io.BufferedReader loaded from parent loader (parentFirst)
Finding class org.apache.ivy.util.FileUtil
Loaded from C:\working\eshopstuff\ehmdrc-core-ws\build\work\ivy\ivy.jar
org/apache/ivy/util/FileUtil.class
Class org.apache.ivy.util.FileUtil loaded from ant loader (parentFirst)
Class java.lang.Runtime loaded from parent loader (parentFirst)
Class java.lang.Process loaded from parent loader (parentFirst)
[ivy:resolve] found 0 resources
[ivy:resolve] found revs: []
[ivy:resolve] Ivy-Nexus: no resource found for
rjlg#hibernate-deployer;latest.integration:
pattern=http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/[
organization]/[module]/[revision]/ivy.xml
[ivy:resolve] tried
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/hibernate-deployer.jar
[ivy:resolve] listing all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/hibernate-deployer.jar
[ivy:resolve] using Ivy-Nexus to list all in
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/
[ivy:resolve] found 0 resources
[ivy:resolve] found revs: []
[ivy:resolve] Ivy-Nexus: no resource found for
rjlg#hibernate-deployer;latest.integration:
pattern=http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/[
organization]/[module]/[revision]/[artifact].[ext]
[ivy:resolve] Ivy-Nexus: no ivy file nor artifact found for
rjlg#hibernate-deployer;latest.integration
[ivy:resolve] no cached resolved revision for
rjlg#hibernate-deployer;latest.integration
Settings:
<ivysettings>
<property name="rjlg.resolver.url"
value="http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public"/>
<credentials host="dev-tools.ehmplusdrc.com" realm="EHM+DRC
Nexus Access" username="ehm_build" passwd="scr1pt"/>
<settings defaultResolver="default"/>
<resolvers>
<chain name="public">
<url name="Ivy-Nexus" m2compatible="true"
changingPattern=".*">
<ivy
pattern="${rjlg.resolver.url}/[organization]/[module]/[revision]/ivy.xml
" />
<artifact
pattern="${rjlg.resolver.url}/[organization]/[module]/[revision]/[artifa
ct].[ext]" />
</url>
<ibiblio name="Nexus" m2compatible="true" usepoms="true"
root="${rjlg.resolver.url}/"/>
</chain>
<!-- used only for publishing -->
<ibiblio name="thirdparty" m2compatible="true" usepoms="true"
root="file:///j:/repo_thirdparty" />
<filesystem
name="snapshots">
<ivy
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/snapshots/[organization]/[
module]/[revision]/ivy.xml" />
<artifact
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/snapshots/[organization]/[
module]/[revision]/[artifact].[ext]" />
</filesystem>
<filesystem
name="releases">
<ivy
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/releases/[organization]/[m
odule]/[revision]/ivy.xml" />
<artifact
pattern="//hq.rjlg.com/dfs/software/repo_rjlg/releases/[organization]/[m
odule]/[revision]/[artifact].[ext]" />
</filesystem>
</resolvers>
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
<resolvers>
<chain name="main" dual="true">
<resolver ref="public"/>
</chain>
</resolvers>
<!-- this included file calls local then main -->
<include
url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
<statuses default="integration">
<status name="release" integration="false"/>
<status name="nightly" integration="true"/>
<status name="integration" integration="true"/>
</statuses>
</ivysettings>
Thanks,
Jon
-----Original Message-----
From: Maarten Coene [mailto:maarten_coene@yahoo.com]
Sent: Monday, February 09, 2009 4:42 AM
To: ivy-user@ant.apache.org
Subject: Re: help getting latest.integration to work
It should work,could you:
- post your settings.xml?
- post the log when running Ant in verbose mode?
Maarten
----- Original Message ----
From: Jonathan Roberts <jr...@rjlg.com>
To: ivy-user@ant.apache.org
Sent: Friday, February 6, 2009 10:10:55 PM
Subject: help getting latest.integration to work
Hello,
Is there some special task or something that you have to run before
latest.integration and other statuses to work?
We've got ivy all setup and running smooth, this is our last hurtle.
My ivy file:
<dependency org="rjlg" name="hibernate-deployer"
rev="latest.integration" conf="jar->master"/>
My ivy log:
:::: WARNINGS
[ivy:resolve] module not found:
rjlg#hibernate-deployer;latest.integration
[ivy:resolve] ==== local: tried
[ivy:resolve] C:\Documents and
Settings\jroberts\.ivy2/local/rjlg/hibernate-deployer/[revision]/ivy.xml
[ivy:resolve] -- artifact
rjlg#hibernate-deployer;latest.integration!hibernate-deployer.jar:
[ivy:resolve] C:\Documents and
Settings\jroberts\.ivy2/local/rjlg/hibernate-deployer/[revision]/hiberna
te-deployer.jar
[ivy:resolve] ==== Ivy-Nexus: tried
[ivy:resolve]
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/ivy.xml
[ivy:resolve] -- artifact
rjlg#hibernate-deployer;latest.integration!hibernate-deployer.jar:
[ivy:resolve]
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/hibernate-deployer.jar
[ivy:resolve] ==== Nexus: tried
Etc...
Thanks,
Jon
Re: help getting latest.integration to work -- solved!
Posted by Maarten Coene <ma...@yahoo.com>.
The next release will probably be made within a few weeks, depending on the amount of time we have to create it...
We'll include a fix for this problem in that release.
Maarten
----- Original Message ----
From: Jonathan Roberts <jr...@rjlg.com>
To: ivy-user@ant.apache.org
Sent: Monday, February 23, 2009 10:56:40 PM
Subject: RE: help getting latest.integration to work -- solved!
After poking through the source, the ApacheURLLister had a bug which
caused it to not support full urls in the anchor tag's href. Nexus does
this by default.
This is fixed the in the ivy trunk, but didn't seem to make it to the
2.0 release. Any idea when the next patch is due out?
Thanks,
Jon
-----Original Message-----
From: news [mailto:news@ger.gmane.org] On Behalf Of Tom Widmer
Sent: Tuesday, February 10, 2009 12:10 PM
To: ivy-user@ant.apache.org
Subject: Re: help getting latest.integration to work
Jonathan Roberts wrote:
> Sure,
>
> Here's the relevant section from the log:
>
> It looks like it's trying to list all the folders in
>
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
> rnate-deployer/
> But it's not returning anything.
>
> If I browse to the site, I can see all the version numbers.
What does the html source for the Nexus page look like? Ivy is using
Apache HTTPD compatible parsing of the folder index (e.g. the HTML page
returned when accessing a directory page) looking for links to
subdirectories. It uses this regexp to do the search (see
ApacheURLLister.java in the Ivy source):
"<a[^>]*href=\"([^\"]*)\"[^>]*>(?:<[^>]+>)*?([^<>]+?)(?:<[^>]+>)*?</a>"
and returns any URLs matching that regexp that are children of the
folder. Maybe the problem is that Nexus does not provide something that
the above pattern matches correctly. The change to make it work with
Nexus would probably be quite trivial if that is the problem...
Tom
RE: help getting latest.integration to work -- solved!
Posted by Jonathan Roberts <jr...@rjlg.com>.
After poking through the source, the ApacheURLLister had a bug which
caused it to not support full urls in the anchor tag's href. Nexus does
this by default.
This is fixed the in the ivy trunk, but didn't seem to make it to the
2.0 release. Any idea when the next patch is due out?
Thanks,
Jon
-----Original Message-----
From: news [mailto:news@ger.gmane.org] On Behalf Of Tom Widmer
Sent: Tuesday, February 10, 2009 12:10 PM
To: ivy-user@ant.apache.org
Subject: Re: help getting latest.integration to work
Jonathan Roberts wrote:
> Sure,
>
> Here's the relevant section from the log:
>
> It looks like it's trying to list all the folders in
>
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
> rnate-deployer/
> But it's not returning anything.
>
> If I browse to the site, I can see all the version numbers.
What does the html source for the Nexus page look like? Ivy is using
Apache HTTPD compatible parsing of the folder index (e.g. the HTML page
returned when accessing a directory page) looking for links to
subdirectories. It uses this regexp to do the search (see
ApacheURLLister.java in the Ivy source):
"<a[^>]*href=\"([^\"]*)\"[^>]*>(?:<[^>]+>)*?([^<>]+?)(?:<[^>]+>)*?</a>"
and returns any URLs matching that regexp that are children of the
folder. Maybe the problem is that Nexus does not provide something that
the above pattern matches correctly. The change to make it work with
Nexus would probably be quite trivial if that is the problem...
Tom
Re: help getting latest.integration to work
Posted by Tom Widmer <to...@googlemail.com>.
Jonathan Roberts wrote:
> Sure,
>
> Here's the relevant section from the log:
>
> It looks like it's trying to list all the folders in
> http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
> rnate-deployer/
> But it's not returning anything.
>
> If I browse to the site, I can see all the version numbers.
What does the html source for the Nexus page look like? Ivy is using
Apache HTTPD compatible parsing of the folder index (e.g. the HTML page
returned when accessing a directory page) looking for links to
subdirectories. It uses this regexp to do the search (see
ApacheURLLister.java in the Ivy source):
"<a[^>]*href=\"([^\"]*)\"[^>]*>(?:<[^>]+>)*?([^<>]+?)(?:<[^>]+>)*?</a>"
and returns any URLs matching that regexp that are children of the
folder. Maybe the problem is that Nexus does not provide something that
the above pattern matches correctly. The change to make it work with
Nexus would probably be quite trivial if that is the problem...
Tom
Re: help getting latest.integration to work
Posted by Tom Widmer <to...@googlemail.com>.
Jonathan Roberts wrote:
> Sure,
>
> Here's the relevant section from the log:
>
> It looks like it's trying to list all the folders in
> http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
> rnate-deployer/
> But it's not returning anything.
>
> If I browse to the site, I can see all the version numbers.
>
> Maybe I need to set a pattern matcher somewhere?
> <ivysettings>
> <property name="rjlg.resolver.url"
> value="http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public"/>
> <credentials host="dev-tools.ehmplusdrc.com" realm="EHM+DRC
> Nexus Access" username="ehm_build" passwd="scr1pt"/>
>
> <settings defaultResolver="default"/>
>
> <resolvers>
> <chain name="public">
> <url name="Ivy-Nexus" m2compatible="true"
> changingPattern=".*">
I think you want:
descriptor="required" in the attributes there - you only want to use
this resolver if an ivy file is available.
> <ivy
> pattern="${rjlg.resolver.url}/[organization]/[module]/[revision]/ivy.xml
> " />
> <artifact
> pattern="${rjlg.resolver.url}/[organization]/[module]/[revision]/[artifa
> ct].[ext]" />
> </url>
> <ibiblio name="Nexus" m2compatible="true" usepoms="true"
> root="${rjlg.resolver.url}/"/>
This should use make use of maven-metadata.xml files by default
(useMavenMetadata="true" is the default) rather than doing a normal
directory listing.
What do you get in your browser with:
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibernate-deployer/maven-metadata.xml
?
Tom
Re: help getting latest.integration to work
Posted by Maarten Coene <ma...@yahoo.com>.
It should work,could you:
- post your settings.xml?
- post the log when running Ant in verbose mode?
Maarten
----- Original Message ----
From: Jonathan Roberts <jr...@rjlg.com>
To: ivy-user@ant.apache.org
Sent: Friday, February 6, 2009 10:10:55 PM
Subject: help getting latest.integration to work
Hello,
Is there some special task or something that you have to run before
latest.integration and other statuses to work?
We've got ivy all setup and running smooth, this is our last hurtle.
My ivy file:
<dependency org="rjlg" name="hibernate-deployer"
rev="latest.integration" conf="jar->master"/>
My ivy log:
:::: WARNINGS
[ivy:resolve] module not found:
rjlg#hibernate-deployer;latest.integration
[ivy:resolve] ==== local: tried
[ivy:resolve] C:\Documents and
Settings\jroberts\.ivy2/local/rjlg/hibernate-deployer/[revision]/ivy.xml
[ivy:resolve] -- artifact
rjlg#hibernate-deployer;latest.integration!hibernate-deployer.jar:
[ivy:resolve] C:\Documents and
Settings\jroberts\.ivy2/local/rjlg/hibernate-deployer/[revision]/hiberna
te-deployer.jar
[ivy:resolve] ==== Ivy-Nexus: tried
[ivy:resolve]
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/ivy.xml
[ivy:resolve] -- artifact
rjlg#hibernate-deployer;latest.integration!hibernate-deployer.jar:
[ivy:resolve]
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/hibernate-deployer.jar
[ivy:resolve] ==== Nexus: tried
Etc...
Thanks,
Jon
help getting latest.integration to work
Posted by Jonathan Roberts <jr...@rjlg.com>.
Hello,
Is there some special task or something that you have to run before
latest.integration and other statuses to work?
We've got ivy all setup and running smooth, this is our last hurtle.
My ivy file:
<dependency org="rjlg" name="hibernate-deployer"
rev="latest.integration" conf="jar->master"/>
My ivy log:
:::: WARNINGS
[ivy:resolve] module not found:
rjlg#hibernate-deployer;latest.integration
[ivy:resolve] ==== local: tried
[ivy:resolve] C:\Documents and
Settings\jroberts\.ivy2/local/rjlg/hibernate-deployer/[revision]/ivy.xml
[ivy:resolve] -- artifact
rjlg#hibernate-deployer;latest.integration!hibernate-deployer.jar:
[ivy:resolve] C:\Documents and
Settings\jroberts\.ivy2/local/rjlg/hibernate-deployer/[revision]/hiberna
te-deployer.jar
[ivy:resolve] ==== Ivy-Nexus: tried
[ivy:resolve]
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/ivy.xml
[ivy:resolve] -- artifact
rjlg#hibernate-deployer;latest.integration!hibernate-deployer.jar:
[ivy:resolve]
http://dev-ehmdrc.hq.rjlg.com:8001/nexus/content/groups/public/rjlg/hibe
rnate-deployer/[revision]/hibernate-deployer.jar
[ivy:resolve] ==== Nexus: tried
Etc...
Thanks,
Jon
Re: TeamCity dependency tracking
Posted by Tom Widmer <to...@googlemail.com>.
Maarten Coene wrote:
> I don't think this is possible at the moment with Ivy.
> Please open a JIRA feature request
I thought of a workaround in case anyone is using TeamCity in the same way:
TeamCity allows you to specify a non-authenticated download path that
doesn't trigger dependency tracking (the path contains guestAuth rather
than httpAuth). This only works if you have guest access to artefacts
enabled, so wouldn't necessarily work for everyone. Then, you have the
resolver path for ivy files use the guestAuth path, and the resolver
path for artifact files use the httpAuth path, so that only dependencies
on artifacts (rather than ivy files) are tracked.
Tom
> ----- Original Message ----
> From: Tom Widmer <to...@googlemail.com>
> To: ivy-user@ant.apache.org
> Sent: Tuesday, December 23, 2008 10:50:09 AM
> Subject: TeamCity dependency tracking
>
> Hi all,
>
> I'm using a TeamCity build server as an Ivy repository for our build artifacts, and it works very well for the job except for tracking dependencies when using a varying build version, like 'latest.release'. To fix the problem, I need to be able to pass different log in credentials for the ivy.xml files to the artifacts. I have a resolver for the repo like this:
>
> <url name="teamcity" latest="latest-time">
> <ivy pattern="${teamcity.ivy.repo.root}/[module]::([branch]-)main/[revision]/ivy.xml" />
> <artifact pattern="${teamcity.ivy.repo.root}/[module]::([branch]-)main/[revision]/[artifact](.[ext])" />
> </url>
>
> I have:
>
> <credentials host="build" realm="TeamCity"
> username="${teamcity.auth.userId}"
> passwd="${teamcity.auth.password}"/>
>
> but obviously those credentials are used for both the ivy.xml files and the artifacts. Is there any way to specify different credentials for the ivy.xml files?
>
>
> Background:
>
> TeamCity has a cunning system of tracking dependencies between builds by providing build-specific TeamCity log in credentials to your ant build script in a couple of properties (though Hudson's system of fingerprinting is just as cunning, and would avoid the problem I'm having). Anything downloaded with those credentials during the build gets logged by TeamCity as a dependency of the build. I use this to have automatic tracking of any dependencies that Ivy downloads from TeamCity (the TeamCity UI allows you to navigate to dependency builds, prevent them being cleaned up automatically, etc.).
>
> So, what's the problem? I recently added a nightly regression testing build that always builds against the latest build, using latest.release. Unfortunately, this causes the build to download the ivy.xml file from every single build that exists on the server in order to work out which is the latest. So the regression testing build appears to depend on every single build (though you can tell the real build by looking for the build where more than 1 artifact is a dependency).
>
> I've made it workable by disabling dependency cleanup prevention for that build (so at least the regression test doesn't prevent automatic cleanup of old, unused builds), but it would still be nice to prevent every single ivy.xml file being listed as a dependency! Two possible fixes:
>
> 1. Persuade Ivy to download ivy.xml files only using standard credentials, so those downloads won't be tracked.
> 2. Persuade TeamCity to ignore downloads of ivy.xml files using the build tracking credentials.
>
> I can't see a way to do 2, but does anyone know how to do 1?
>
> Perhaps this is a feature request - some way to bind credentials to things other than just hosts.
>
> Thanks,
>
> Tom
>
>
>
>