[
https://issues.jenkins-ci.org/browse/JENKINS-13917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163312#comment-163312
]
yossis commented on JENKINS-13917:
----------------------------------
This library is not distributed with Artifactory plugin. Are you using an old
version?
> Artifactory plugin libraries affecting the path used during an Ant build
> ------------------------------------------------------------------------
>
> Key: JENKINS-13917
> URL: https://issues.jenkins-ci.org/browse/JENKINS-13917
> Project: Jenkins
> Issue Type: Bug
> Components: artifactory
> Affects Versions: current
> Environment: Linux (CentOS 6)
> Reporter: Camden Holt
> Assignee: yossis
>
> We have a job using an Ant script to perform the build. One of the targets
> in this script generates instrumented classes to enable us to generate a
> Cobertura coverage report.
> As part of our set of standard libraries, we include various jars from the
> slf4j suite. When we enable the Artifactory plugin for this job, the
> Cobertura Ant target fails, because of an incompatible set of jars being
> used. The snippet of output below is generated with verbose logging from the
> VM:
> 12:19:40 cobertura-instrumented-src-classes:
> 12:19:40 [Loaded net.sourceforge.cobertura.ant.CommonMatchingTask from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/cobertura-1.9.4.1.jar]
> 12:19:40 [Loaded net.sourceforge.cobertura.ant.InstrumentTask from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/cobertura-1.9.4.1.jar]
> 12:19:40 [Loaded net.sourceforge.cobertura.ant.MergeTask from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/cobertura-1.9.4.1.jar]
> 12:19:40 [Loaded net.sourceforge.cobertura.ant.CheckTask from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/cobertura-1.9.4.1.jar]
> 12:19:40 [Loaded net.sourceforge.cobertura.ant.ReportTask from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/cobertura-1.9.4.1.jar]
> 12:19:40 [Loaded net.sourceforge.cobertura.ant.Ignore from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/cobertura-1.9.4.1.jar]
> 12:19:40 [Loaded net.sourceforge.cobertura.ant.IgnoreBranches from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/cobertura-1.9.4.1.jar]
> 12:19:40 [Loaded net.sourceforge.cobertura.ant.IncludeClasses from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/cobertura-1.9.4.1.jar]
> 12:19:40 [Loaded net.sourceforge.cobertura.ant.ExcludeClasses from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/cobertura-1.9.4.1.jar]
> 12:19:40 [Loaded org.apache.tools.ant.taskdefs.ImportTask from
> file:/opt/apache-ant-1.8.1/lib/ant.jar]
> 12:19:40 [Loaded net.sourceforge.cobertura.util.CommandLineBuilder from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/cobertura-1.9.4.1.jar]
> 12:19:40 [Loaded org.apache.log4j.Category from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/log4j-over-slf4j-1.6.4.jar]
> 12:19:40 [Loaded org.apache.log4j.Logger from
> file:/opt/jenkins/jobs/data-processing/workspace/test-lib/log4j-over-slf4j-1.6.4.jar]
> * 12:19:40 [Loaded org.slf4j.MarkerFactory from
> file:/opt/jenkins/plugins/artifactory/WEB-INF/lib/slf4j-api-1.5.8.jar]
> 12:19:40 [Loaded org.apache.tools.ant.util.DateUtils from
> file:/opt/apache-ant-1.8.1/lib/ant.jar]
> The line prefixed with * shows the problem; the slf4j-api-1.5.8.jar is being
> loaded from the artifactory plugin directory. This is an older version than
> that supplied with our project which is 1.6.4 - and this is causing a problem
> when the compilation step occurs.
> When we run this from the command line using ant directly we can see that
> the correct jar from within our project is loaded.
> I'm afraid I don't understand fully how the addition of plugins affects the
> build environment technically, but I assume that the Artifactory plugin has
> been able to modify the environment/build path somehow to ensure that it's
> available at the appropriate time. Unfortunately this seems to cause problems
> if newer libraries are needed elsewhere.
> We can work around this by using the Ant/Ivy/Artifactory integration from the
> build script directly, but it would be good to be able to do this from
> Jenkins and simplify our scripts.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira