ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastian Nagel <sna...@apache.org>
Subject Re: IVY-1577 - how to activate automatic usage of Maven profiles
Date Wed, 24 Oct 2018 15:57:52 GMT
Hi Jaikiran,

ok, I can confirm that it works when the local ivy cache is wiped out,
in our case (and on Linux) by
  rm -rf ~/.ivy2/cache/javax.ws.rs/
the Nutch build succeeds using ivy 2.5.0-rc1.

Also you have to make sure that no other project using an older ivy version
fills the cache before. What are your recommendations to make sure that
the local ivy cache stays correct on the Apache Jenkins cluster where we
have little control which builds run on which machine: use a project-specific
cache or no cache at all? Or is there a way to get also the benefits from a
shared cache?

Thanks,
Sebastian

On 2018/10/24 14:45:06, Jaikiran Pai <jaikiran@apache.org> wrote: 
> Hi Sebastian,
> 
> There shouldn't be anything explicit to enable this in 2.5.0-rc1. When
> you tried this with 2.5.0-rc1 did you clean up your local cache to make
> sure the it's fetching the module descriptor afresh from the Maven repo
> instead of local cache?
> 
> FWIW, I just gave this a try locally. What I did was use this simple
> ivy.xml:
> 
> <ivy-module version="2.2" xmlns:o="http://ant.apache.org/ivy/osgi">
>     <info organisation="foo" module="bar"/>
>        
>     <dependencies>
>         <dependency org="javax.ws.rs" name="javax.ws.rs-api" rev="2.1" />
>     </dependencies>   
> </ivy-module>
> 
> 
> Then:
> 
> 
> java -jar apache-ivy-2.5.0-rc1/ivy-2.5.0-rc1.jar -cache ./temp-cache
> 
> 
> This resolved the dependencies correctly with 2.5.0-rc1 whereas when
> used with 2.4.0 it fails.
> 
> If it still fails with a fresh cache with 2.5.0-rc1 with the Nutch
> project, let us know and I'll dig a bit deeper. If you have some steps
> for us to try and reproduce this easily with the setup/project you are
> using, let us know.
> 
> -Jaikiran
> 
> 
> On 24/10/18 6:07 PM, Sebastian Nagel wrote:
> > Hi,
> >
> > the Apache Nutch community faces an dependency issue with the property "packaging.type"
defined in the Maven profiles. More details about the issue
> > are found in https://issues.apache.org/jira/browse/NUTCH-2669
> > Until now we have neither a reliable work-around nor a solution. Upgrading
> > to ivy 2.5.0-rc1 or a nightly build rc2 jar seems not not work. Maybe some additional
> > steps are necessary. 
> >
> > Below the ant/ivy logs and more. A description of all steps to upgrade the ivy lib
> > is found in NUTCH-2669.
> >
> > Thanks,
> > Sebastian
> >
> > [ivy:resolve] loadData of javax.ws.rs#javax.ws.rs-api;2.1 of rootConf=default
> > [ivy:resolve]   using default to resolve javax.ws.rs#javax.ws.rs-api;2.1
> > [ivy:resolve] default: Checking cache for: dependency: javax.ws.rs#javax.ws.rs-api;2.1
{compile=[compile(*), master(*)], runtime=[runtime(*)]}
> > [ivy:resolve] No entry is found in the ModuleDescriptorCache : /home/ubuntu/.ivy2/cache/javax.ws.rs/javax.ws.rs-api/ivy-2.1.xml
> > [ivy:resolve] post 1.3 ivy file: using exact as default matcher
> > [ivy:resolve]   found ivy file in cache for javax.ws.rs#javax.ws.rs-api;2.1 (resolved
by maven2): /home/ubuntu/.ivy2/cache/javax.ws.rs/javax.ws.rs-api/ivy-2.1.xml
> > [ivy:resolve] default: module revision found in cache: javax.ws.rs#javax.ws.rs-api;2.1
> > [ivy:resolve]   found javax.ws.rs#javax.ws.rs-api;2.1 in maven2
> > ..
> > [ivy:resolve] Sort dependencies of : javax.ws.rs#javax.ws.rs-api;2.1 / Number of
dependencies = 1
> > [ivy:resolve] Sort done for : javax.ws.rs#javax.ws.rs-api;2.1
> > ..
> > [ivy:resolve] Module descriptor is processed : javax.ws.rs#javax.ws.rs-api;2.1
> > ..
> > [ivy:resolve]    trying /home/ubuntu/.ivy2/local/javax.ws.rs/javax.ws.rs-api/2.1/${packaging.type}s/javax.ws.rs-api.${packaging.type}
> > [ivy:resolve]           tried /home/ubuntu/.ivy2/local/javax.ws.rs/javax.ws.rs-api/2.1/${packaging.type}s/javax.ws.rs-api.${packaging.type}
> > [ivy:resolve]   local: resource not reachable for javax.ws.rs#javax.ws.rs-api;2.1:
res=/home/ubuntu/.ivy2/local/javax.ws.rs/javax.ws.rs-api/2.1/${packaging.type}s/javax.ws.rs-api.${packaging.type}
> > [ivy:resolve]    trying http://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve]           tried http://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve] HTTP response status: 404 url=http://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.$%7Bpackaging.type%7D
> > [ivy:resolve] CLIENT ERROR: Not Found url=http://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.$%7Bpackaging.type%7D
> > [ivy:resolve]   maven2: resource not reachable for javax/ws/rs#javax.ws.rs-api;2.1:
res=http://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve]    trying https://repository.apache.org/content/repositories/snapshots/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve]           tried https://repository.apache.org/content/repositories/snapshots/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve] HTTP response status: 404 url=https://repository.apache.org/content/repositories/snapshots/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.$%7Bpackaging.type%7D
> > [ivy:resolve] CLIENT ERROR: Not Found url=https://repository.apache.org/content/repositories/snapshots/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.$%7Bpackaging.type%7D
> > [ivy:resolve]   apache-snapshot: resource not reachable for javax/ws/rs#javax.ws.rs-api;2.1:
res=https://repository.apache.org/content/repositories/snapshots/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve]    trying http://oss.sonatype.org/content/repositories/releases/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve]           tried http://oss.sonatype.org/content/repositories/releases/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve] HTTP response status: 301 url=http://oss.sonatype.org/content/repositories/releases/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.$%7Bpackaging.type%7D
> > [ivy:resolve]   sonatype: resource not reachable for javax/ws/rs#javax.ws.rs-api;2.1:
res=http://oss.sonatype.org/content/repositories/releases/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve] WARN:     [FAILED     ] javax.ws.rs#javax.ws.rs-api;2.1!javax.ws.rs-api.${packaging.type}:
 (0ms)
> > [ivy:resolve] WARN: ==== local: tried
> > [ivy:resolve] WARN:   /home/ubuntu/.ivy2/local/javax.ws.rs/javax.ws.rs-api/2.1/${packaging.type}s/javax.ws.rs-api.${packaging.type}
> > [ivy:resolve] WARN: ==== maven2: tried
> > [ivy:resolve] WARN:   http://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve] WARN: ==== apache-snapshot: tried
> > [ivy:resolve] WARN:   https://repository.apache.org/content/repositories/snapshots/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve] WARN: ==== sonatype: tried
> > [ivy:resolve] WARN:   http://oss.sonatype.org/content/repositories/releases/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > ..
> > [ivy:resolve] :: resolution report :: resolve 810ms :: artifacts dl 857ms
> > [ivy:resolve] WARN:     ::::::::::::::::::::::::::::::::::::::::::::::
> > [ivy:resolve] WARN:     ::              FAILED DOWNLOADS            ::
> > [ivy:resolve] WARN:     :: ^ see resolution messages for details  ^ ::
> > [ivy:resolve] WARN:     ::::::::::::::::::::::::::::::::::::::::::::::
> > [ivy:resolve] WARN:     :: javax.ws.rs#javax.ws.rs-api;2.1!javax.ws.rs-api.${packaging.type}
> > [ivy:resolve] WARN:     ::::::::::::::::::::::::::::::::::::::::::::::
> > ..
> > [ivy:resolve] :::: WARNINGS
> > [ivy:resolve]           [FAILED     ] javax.ws.rs#javax.ws.rs-api;2.1!javax.ws.rs-api.${packaging.type}:
 (0ms)
> > [ivy:resolve]   ==== local: tried
> > [ivy:resolve]     /home/ubuntu/.ivy2/local/javax.ws.rs/javax.ws.rs-api/2.1/${packaging.type}s/javax.ws.rs-api.${packaging.type}
> > [ivy:resolve]   ==== maven2: tried
> > [ivy:resolve]     http://repo1.maven.org/maven2/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve]   ==== apache-snapshot: tried
> > [ivy:resolve]     https://repository.apache.org/content/repositories/snapshots/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve]   ==== sonatype: tried
> > [ivy:resolve]     http://oss.sonatype.org/content/repositories/releases/javax/ws/rs/javax.ws.rs-api/2.1/javax.ws.rs-api-2.1.${packaging.type}
> > [ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
> > [ivy:resolve]           ::              FAILED DOWNLOADS            ::
> > [ivy:resolve]           :: ^ see resolution messages for details  ^ ::
> > [ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
> > [ivy:resolve]           :: javax.ws.rs#javax.ws.rs-api;2.1!javax.ws.rs-api.${packaging.type}
> > [ivy:resolve]           ::::::::::::::::::::::::::::::::::::::::::::::
> > [ivy:resolve] 
> > ..
> > BUILD FAILED
> > ../build.xml:116: The following error occurred while executing this line:
> > ../src/plugin/build.xml:68: The following error occurred while executing this line:
> > ../src/plugin/build-plugin.xml:229: impossible to resolve dependencies:
> >         resolve failed - see output for details
> >         at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:337)
> >         at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:271)
> >         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
> >         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >         at java.lang.reflect.Method.invoke(Method.java:498)
> >         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> >         at org.apache.tools.ant.Task.perform(Task.java:350)
> >         at org.apache.tools.ant.Target.execute(Target.java:448)
> >         at org.apache.tools.ant.Target.performTasks(Target.java:469)
> >         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
> >         at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
> >         at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
> >         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:446)
> >         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
> >         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >         at java.lang.reflect.Method.invoke(Method.java:498)
> >         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> >         at org.apache.tools.ant.Task.perform(Task.java:350)
> >         at org.apache.tools.ant.Target.execute(Target.java:448)
> >         at org.apache.tools.ant.Target.performTasks(Target.java:469)
> >         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
> >         at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:36)
> >         at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
> >         at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:446)
> >         at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
> >         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
> >         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >         at java.lang.reflect.Method.invoke(Method.java:498)
> >         at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
> >         at org.apache.tools.ant.Task.perform(Task.java:350)
> >         at org.apache.tools.ant.Target.execute(Target.java:448)
> >         at org.apache.tools.ant.Target.performTasks(Target.java:469)
> >         at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
> >         at org.apache.tools.ant.Project.executeTarget(Project.java:1370)
> >         at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
> >         at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
> >         at org.apache.tools.ant.Main.runBuild(Main.java:849)
> >         at org.apache.tools.ant.Main.startAnt(Main.java:228)
> >         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:283)
> >         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:101)
> >
> >
> > % grep -C1 packaging.type ~/.ivy2/cache/javax.ws.rs/javax.ws.rs-api/ivy-2.1.xml
> >         <publications>
> >                 <artifact name="javax.ws.rs-api" type="${packaging.type}" ext="${packaging.type}"
conf="master"/>
> >         </publications>
> >
> > % java -version
> > openjdk version "1.8.0_181"
> > OpenJDK Runtime Environment (build 1.8.0_181-8u181-b13-0ubuntu0.18.04.1-b13)
> > OpenJDK 64-Bit Server VM (build 25.181-b13, mixed mode)
> >
> > % ant -version
> > Apache Ant(TM) version 1.10.3 compiled on July 19 2018
> >
> > % java -jar ivy/ivy-2.5.0-rc2-test.jar -version
> > Apache Ivy 2.5.0-rc2-local-20181023065327 - 20181023065327 :: http://ant.apache.org/ivy/
> >
> >
> >
> 
> 

Mime
View raw message