plugin included xercesImpl.jar from jenkins-test-harness test dependancy

21 views
Skip to first unread message

Ted Xiao

unread,
Apr 16, 2017, 10:49:31 AM4/16/17
to Jenkins Developers
It is pretty weird, I had below dependency


[INFO] +- org.jenkins-ci.main:jenkins-test-harness:jar:2.18:test
[INFO] |  +- org.eclipse.jetty:jetty-webapp:jar:9.2.15.v20160210:test
[INFO] |  |  +- org.eclipse.jetty:jetty-xml:jar:9.2.15.v20160210:test
[INFO] |  |  \- org.eclipse.jetty:jetty-servlet:jar:9.2.15.v20160210:test
[INFO] |  +- org.eclipse.jetty:jetty-security:jar:9.2.15.v20160210:test
[INFO] |  |  \- org.eclipse.jetty:jetty-server:jar:9.2.15.v20160210:test
[INFO] |  |     \- org.eclipse.jetty:jetty-http:jar:9.2.15.v20160210:test
[INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] |  +- org.jenkins-ci.main:jenkins-test-harness-htmlunit:jar:2.18-1:test
[INFO] |  |  +- xalan:xalan:jar:2.7.2:test
[INFO] |  |  +- xalan:serializer:jar:2.7.2:test
[INFO] |  |  +- xerces:xercesImpl:jar:2.11.0:compile
[INFO] |  |  +- xml-apis:xml-apis:jar:1.4.01:
compile

[INFO] |  |  +- net.sourceforge.nekohtml:nekohtml:jar:1.9.22:test
[INFO] |  |  +- net.sourceforge.cssparser:cssparser:jar:0.9.16:test
[INFO] |  |  +- org.w3c.css:sac:jar:1.3:test
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-client:jar:9.2.12.v20150709:test
[INFO] |  |  +- org.eclipse.jetty:jetty-util:jar:9.2.12.v20150709:test
[INFO] |  |  +- org.eclipse.jetty:jetty-io:jar:9.2.12.v20150709:test
[INFO] |  |  +- org.eclipse.jetty.websocket:websocket-common:jar:9.2.12.v20150709:test
[INFO] |  |  \- org.eclipse.jetty.websocket:websocket-api:jar:9.2.12.v20150709:test
[INFO] |  +- org.jvnet.hudson:embedded-rhino-debugger:jar:1.2:test
[INFO] |  +- org.netbeans.modules:org-netbeans-insane:jar:RELEASE72:test
[INFO] |  \- com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1:test



xerces:xercesImpl:jar:2.11.0:compile was set as compile dependency and was included in the final artifact (hpi file), it just happened recently.

Jesse Glick

unread,
Apr 24, 2017, 12:46:24 PM4/24/17
to Jenkins Dev
On Sun, Apr 16, 2017 at 10:49 AM, Ted Xiao <xia...@gmail.com> wrote:
> xerces:xercesImpl:jar:2.11.0:compile was set as compile dependency and was
> included in the final artifact (hpi file), it just happened recently.

Not sure why offhand. Does not happen in a sample plugin AFAICT:

https://github.com/jenkinsci/plugin-pom/pull/58

BTW you should use

<no-test-jar>false</no-test-jar>

if you want to publish a test JAR, rather than the custom execution you have.

Ted Xiao

unread,
Apr 25, 2017, 1:42:45 AM4/25/17
to Jenkins Developers
Found out it is caused by org.jenkins-ci.plugins:jacoco, although it showed in org.jenkins-ci.main:jenkins-test-harness. 

fixed by

<dependency>
    <groupId>org.jenkins-ci.plugins</groupId>
    <artifactId>jacoco</artifactId>
    <version>2.1.0</version>
    <optional>true</optional>
    <exclusions>
        <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-project</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact-manager</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-container-default</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.jacoco</groupId>
            <artifactId>*</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.apache.maven.reporting</groupId>
            <artifactId>maven-reporting-api</artifactId>
        </exclusion>
        <exclusion>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
        </exclusion>
        <exclusion>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
        </exclusion>
    </exclusions>
</dependency>

I packaged test-jar so another plugin can use the TestBase class in src/test folder

Jesse Glick

unread,
Apr 25, 2017, 1:59:26 PM4/25/17
to Jenkins Dev
On Tue, Apr 25, 2017 at 1:42 AM, Ted Xiao <xia...@gmail.com> wrote:
> Found out it is caused by org.jenkins-ci.plugins:jacoco

Probably https://github.com/jenkinsci/jacoco-plugin/commit/4baa40f8fb07cda1159880769e0f92024183d152
needs to be released.
Reply all
Reply to author
Forward
0 new messages