[ 
https://issues.apache.org/jira/browse/NUTCH-2669?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16792447#comment-16792447
 ] 

Sebastian Nagel commented on NUTCH-2669:
----------------------------------------

Hi [~lewismc],
one point is that the work-around to defined the property {{packaging.type = 
jar}} only works on the second run. That's ugly: user have to know about it and 
it requires extra efforts in cases the ivy cache is volatile, e.g. when the ant 
build is part of a Docker image build. The problem is the dead lock because of 
IVY-1586/NUTCH-2672 which blocks the upgrade to ivy-2.5.0-rc1. One week ago, 
[~tbm-exerp] mentioned that IVY-1586 can be worked around if the artifact is 
explicitly given. I hadn't the time to try it yet, but we may take this way for 
the releases and only for dependencies causing troubles. It would make the 
dependency management much more complex when applied to all dependencies.
Regarding the (additional) problem with the {{javax.measure}} dependency: this 
has been reported by @axrdb in [PR 
#403|https://github.com/apache/nutch/pull/403]. One parallel to your failure is 
the strange version number of the dependency:

{noformat}
[ivy:retrieve] module not found: 
javax.measure#unit-api;working@DB-MBP-0TG8WP.local
{noformat}

But I'm not able to reproduce it:
{noformat}
% rm -rf ~/.ivy2/cache/javax.measure/unit-api/

% ant clean compile-core compile-plugins
init:
    [mkdir] Created dir: 
/mnt/data/wastl/proj/crawler/nutch/git/2.x/build/parse-tika/classes
    [mkdir] Created dir: 
/mnt/data/wastl/proj/crawler/nutch/git/2.x/build/plugins/parse-tika

init-plugin:

deps-jar:

clean-lib:

resolve-default:
[ivy:resolve] :: loading settings :: file = 
/mnt/data/wastl/proj/crawler/nutch/git/2.x/ivy/ivysettings.xml
[ivy:resolve] downloading 
http://repo1.maven.org/maven2/javax/measure/unit-api/1.0/unit-api-1.0.jar ...
[ivy:resolve] ............... (27kB)
[ivy:resolve] ... (0kB)
[ivy:resolve]   [SUCCESSFUL ] javax.measure#unit-api;1.0!unit-api.jar(bundle) 
(68ms)
{noformat}


> Reliable solution for javax.ws packaging.type
> ---------------------------------------------
>
>                 Key: NUTCH-2669
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2669
>             Project: Nutch
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 2.4, 1.16
>            Reporter: Sebastian Nagel
>            Priority: Blocker
>             Fix For: 2.4
>
>
> The upgrade of Tika to v1.19.1 (NUTCH-2651, NUTCH-2665, NUTCH-2667) raises an 
> ant/ivy issue during build when resolving/fetching dependencies:
> {noformat}
> [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/jenkins/.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] :::: ERRORS
> ...
> BUILD FAILED
> {noformat}
> More information about this issue is linked on 
> [jax-rs#576|https://github.com/jax-rs/api/pull/576]. 
> A work-around is to define a property {{packaging.type}} and set it to 
> {{jar}}. This can be done
> - in command-line {{ant -Dpackaging.type=jar ...}}
> - in default.properties
> - in ivysettings.xml
> The last work-around is active in current master/1.x. However, there are 
> still Jenkins builds failing while few succeed:
> ||#build||status jax-rs||machine||work-around||
> |3578|success|H28|ivysettings.xml|
> |3577|failed|H28|ivysettings.xml|
> |3576|failed|H33|ivysettings.xml|
> |3575|success|ubuntu-4|ivysettings.xml|
> |3574|failed|ubuntu-4|-Dpackaging.type=jar + default.properties|
> |3571|failed|?|-Dpackaging.type=jar + default.properties|
> |3568|failed|?|-Dpackaging.type=jar + default.properties|
> Builds which failed for other reasons are left away. The only pattern I see 
> is that only the second build on every of the Jenkins machines succeeds. A 
> possible reason could be that the build environments on the machines persist 
> state (the Nutch build directory, local ivy cache, etc.). If this is the 
> case, it may take some time until all Jenkins machines will succeed.
> The ivysettings.xml work-around was the first which succeeded on a Jenkins 
> build but it may be the case that all three work-arounds apply.
> The issue is supposed to be resolved (without work-arounds) by IVY-1577. 
> However, it looks like it isn't:
> - get rc2 of ivy 2.5.0 (the URL may change):
> {noformat}
> % wget -O ivy/ivy-2.5.0-rc2-test.jar \
>     
> https://builds.apache.org/job/Ivy/lastSuccessfulBuild/artifact/build/artifact/org.apache.ivy_2.5.0.cr2_20181023065327.jar
> {noformat}
> - edit default properties and set {{ivy.version=2.5.0-rc2-test}}
> - remove work-around in ivysettings.xml (or default.properties)
> - run {{ant clean runtime}} and check for failure resp. whether javax.ws lib 
> is in place: {{ls build/lib/javax.ws.rs-api*.jar}}
> This solution fails for 
> [ivy-2.5.0-rc1.jar|http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.5.0-rc1/ivy-2.5.0-rc1.jar]
>  and the mentioned rc2 jar as of 2018-10-23. But maybe the procedure is 
> wrong, I'll contact the ant/ivy team to solve this.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to