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

Sebastian Nagel commented on NUTCH-2672:
----------------------------------------

Note: the reordering only helps once when the local ivy cache does not contain 
the dependency. If the jar is taken from the local cache is taken from the 
local cache, the wrong one placed in build/lib/:
{noformat}
[ivy:retrieve]  retrieving 
/home/ubuntu/.ivy2/cache/com.j256.ormlite/ormlite-core/jars/ormlite-core-5.1-tests.jar
[ivy:retrieve]          to .../build/lib/ormlite-core-5.1.jar
{noformat}

> Ant build erronously installs *-test.jar instead *.jar for target "nightly"
> ---------------------------------------------------------------------------
>
>                 Key: NUTCH-2672
>                 URL: https://issues.apache.org/jira/browse/NUTCH-2672
>             Project: Nutch
>          Issue Type: Sub-task
>          Components: build
>    Affects Versions: 1.16
>            Reporter: Sebastian Nagel
>            Priority: Minor
>             Fix For: 1.16
>
>
> The Jenkins build (1.x/trunk only) failed because instead of the "normal" 
> jars the *-test.jar versions are installed in build/lib/ which causes a 
> compiler error ("cannot find symbol"):
> {noformat}
> resolve-test:
> [ivy:resolve] :: Apache Ivy 2.5.0-rc1 - 20180412005306 :: 
> http://ant.apache.org/ivy/ ::
> [ivy:resolve] :: loading settings :: file = 
> /home/jenkins/jenkins-slave/workspace/Nutch-trunk/ivy/ivysettings.xml
> ...
> resolve-default:
> [ivy:resolve] downloading 
> http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-auth/2.7.4/hadoop-auth-2.7.4-tests.jar
>  ...
> [ivy:resolve] ...... (99kB)
> [ivy:resolve] .. (0kB)
> [ivy:resolve]         [SUCCESSFUL ] 
> org.apache.hadoop#hadoop-auth;2.7.4!hadoop-auth.jar(test-jar) (181ms)
> [ivy:resolve] downloading 
> http://repo1.maven.org/maven2/org/apache/zookeeper/zookeeper/3.4.6/zookeeper-3.4.6-tests.jar
>  ...
> [ivy:resolve] 
> ........................................................................ 
> (526kB)
> [ivy:resolve] .. (0kB)
> [ivy:resolve]         [SUCCESSFUL ] 
> org.apache.zookeeper#zookeeper;3.4.6!zookeeper.jar(test-jar) (35ms)
> [ivy:resolve] downloading 
> http://repo1.maven.org/maven2/org/apache/hadoop/hadoop-yarn-common/2.7.4/hadoop-yarn-common-2.7.4-tests.jar
>  ...
> [ivy:resolve] ........................... (258kB)
> [ivy:resolve] .. (0kB)
> [ivy:resolve]         [SUCCESSFUL ] 
> org.apache.hadoop#hadoop-yarn-common;2.7.4!hadoop-yarn-common.jar(test-jar) 
> (181ms)
> [ivy:resolve] downloading 
> http://repo1.maven.org/maven2/com/j256/ormlite/ormlite-core/5.1/ormlite-core-5.1-tests.jar
>  ...
> [ivy:resolve] 
> ......................................................................................
>  (643kB)
> [ivy:resolve] .. (0kB)
> [ivy:resolve]         [SUCCESSFUL ] 
> com.j256.ormlite#ormlite-core;5.1!ormlite-core.jar (321ms)
>   [taskdef] Could not load definitions from resource 
> org/sonar/ant/antlib.xml. It could not be found.
> copy-libs:
> compile-core:
>     [javac] Compiling 298 source files to 
> /home/jenkins/jenkins-slave/workspace/Nutch-trunk/build/classes
>     [javac] 
> /home/jenkins/jenkins-slave/workspace/Nutch-trunk/src/java/org/apache/nutch/webui/model/SeedList.java:32:
>  error: cannot find symbol
>     [javac] import com.j256.ormlite.field.ForeignCollectionField;
>     [javac]                              ^
>     [javac]   symbol:   class ForeignCollectionField
>     [javac]   location: package com.j256.ormlite.field
>     [javac] 
> /home/jenkins/jenkins-slave/workspace/Nutch-trunk/src/java/org/apache/nutch/webui/model/SeedUrl.java:29:
>  error: cannot find symbol
>     [javac] import com.j256.ormlite.field.DatabaseField;
>     [javac]                              ^
> {noformat}
> The problem is reproducible by:
> # cleaning the local ivy cached
> {noformat}
> rm -rf ~/.ivy2/cache/com.j256.ormlite/
> {noformat}
> # and running {{ant clean nightly}} or {{ant clean compile-core-test}}
> It's not reproducible
> - when rolling back NUTCH-2671 and using ivy 2.4.0
> - when running {{ant clean resolve-default}} or {{ant clean resolve-test}}



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

Reply via email to