Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-existent transitive dependencies included by jnlp-download-servlet (log4j:log4j:1.2.17 -> jmxri) #18

Open
ylexus opened this issue Dec 15, 2015 · 1 comment
Assignees
Labels
Milestone

Comments

@ylexus
Copy link

ylexus commented Dec 15, 2015

For some reason jnlp-download-servlet tries to include com.sun.jmx:jmxri:jar:1.2.1 which it claims comes from log4j:log4j:jar:1.2.17 which does not have that dependency. Granted, log4j:log4j:jar:1.2.15 did have it and we DO have 1.2.15 in the dependency tree, but it's successfully managed to 1.2.17 as you can see below.
If jnlp-download-servlet is removed from the pom, the project compiles successfully. Project's dependency:tree does not have jmxri and no log4j specific sub-dependencies:

...
[INFO] |     +- log4j:log4j:jar:1.2.17:compile (version selected from constraint [1.2.16,))
[INFO] |     +- org.99soft.guice:rocoto:jar:6.2:compile
...

Plugin configuration

<plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>webstart-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>process-resources</phase>
                                <goals>
                                    <goal>jnlp-download-servlet</goal>
                                </goals>
                            </execution>
                        </executions>

                        <configuration>
                            <outputDirectoryName>webstart</outputDirectoryName>

                            <!-- Set to true to exclude all transitive dependencies. Default is
                            false. -->
                            <excludeTransitive>false</excludeTransitive>

                            <jnlpFiles>
                                <jnlpFile>
                                    <templateFilename>jnlpTemplate.vm</templateFilename>
                                    <outputFilename>launch.jnlp</outputFilename>
                                    <jarResources>
                                        <jarResource>
                                            <groupId>cm.ehjgdsfn.rt</groupId>
                                            <artifactId>ejt-trader</artifactId>
                                            <classifier>${cmehjgdsfn.config.env}</classifier>
                                            <version>${project.version}</version>
                                            <mainClass>com.bglw.gmrt.cmehjgdsfn.ejtrt.ejttrader.ejtTraderApp</mainClass>
                                        </jarResource>
                                    </jarResources>
                                </jnlpFile>
                            </jnlpFiles>

                            <sign>
                                <keystore>${basedir}/src/main/sign/keyStore</keystore>
                                <keypass>fdsrgqerg</keypass>
                                <storepass>fedfgwerg</storepass>
                                <alias>webstart</alias>
                                <verify>false</verify>
                            </sign>
                            <unsign>true</unsign>
                            <verifyjar>false</verifyjar>
                        </configuration>
                    </plugin>

Debug level maven build extract - section from the plugin running

[INFO] artifact log4j:log4j: checking for updates from cm-ehjgdsfn-repo
[DEBUG] Reading resolution-state from: /data/cmehjgdsfn/teamcity_home/agent2/m2-repo/log4j/log4j/resolver-status.properties
[DEBUG] Writing resolution-state to: /data/cmehjgdsfn/teamcity_home/agent2/m2-repo/log4j/log4j/resolver-status.properties
[INFO] artifact log4j:log4j: checking for updates from efs-repo
[DEBUG] Reading resolution-state from: /data/cmehjgdsfn/teamcity_home/agent2/m2-repo/log4j/log4j/resolver-status.properties
[DEBUG] Writing resolution-state to: /data/cmehjgdsfn/teamcity_home/agent2/m2-repo/log4j/log4j/resolver-status.properties
[INFO] artifact log4j:log4j: checking for updates from central-mirror
[DEBUG] Reading resolution-state from: /data/cmehjgdsfn/teamcity_home/agent2/m2-repo/log4j/log4j/resolver-status.properties
[DEBUG] Writing resolution-state to: /data/cmehjgdsfn/teamcity_home/agent2/m2-repo/log4j/log4j/resolver-status.properties
[DEBUG]       log4j:log4j:jar:1.2.17:compile (setting version to: 1.2.17 from range: [1.2.16,))
[DEBUG]       log4j:log4j:jar:1.2.17:compile (selected for compile)
[DEBUG]         javax.mail:mail:jar:1.4:compile (selected for compile)
[DEBUG]           javax.activation:activation:jar:1.1:compile (selected for compile)
[DEBUG]         com.sun.jdmk:jmxtools:jar:1.2.1:compile (selected for compile)
[DEBUG]         com.sun.jmx:jmxri:jar:1.2.1:compile (selected for compile)

Contents of /data/cmehjgdsfn/teamcity_home/agent2/m2-repo/log4j/log4j/1.2.17/log4j-1.2.17.pom are exactly the same as https://repo1.maven.org/maven2/log4j/log4j/1.2.17/log4j-1.2.17.pom.

Resulting error:

[10:19:14][Step 2/6] [ERROR] Failed to execute goal org.codehaus.mojo:webstart-maven-plugin:1.0-beta-6:jnlp-download-servlet (default) on project ejt-trader-webstart: Could not resolv transitive dependencies: Could not transfer artifact com.sun.jmx:jmxri:jar:1.2.1 from/to java.net (https://maven-repository.dev.java.net/nonav/repository): Cannot access https://maven-repository.dev.java.net/nonav/repository with type legacy using the available connector factories: BasicRepositoryConnectorFactory
[10:19:14][Step 2/6] [ERROR] com.sun.jmx:jmxri:jar:1.2.1
[10:19:14][Step 2/6] [ERROR]
[10:19:14][Step 2/6] [ERROR] from the specified remote repositories:
[10:19:14][Step 2/6] [ERROR] cm-ehjgdsfn-repo (http://choumvs149.amrs.win.mg.afg:8080/nexus-2.0/content/groups/public, releases=true, snapshots=true),
[10:19:14][Step 2/6] [ERROR] efs-repo (http://efs.worldnet.mg.afg/efs/dist/maven/maven2-repository/incr/common/lib, releases=true, snapshots=false),
[10:19:14][Step 2/6] [ERROR] central-mirror (http://choumvs149.amrs.win.mg.afg:8080/nexus-2.0/content/groups/public, releases=true, snapshots=false),
[10:19:14][Step 2/6] [ERROR] java.net (https://maven-repository.dev.java.net/nonav/repository, releases=true, snapshots=true)
[10:19:14][Step 2/6] [ERROR] Path to dependency:
[10:19:14][Step 2/6] [ERROR] 1) cm.ehjgdsfn.ejtrt:ejt-trader-webstart:war:1.52-SNAPSHOT
[10:19:14][Step 2/6] [ERROR] 2) cm.ehjgdsfn.ejtrt:ejt-trader:jar:1.52-SNAPSHOT
[10:19:14][Step 2/6] [ERROR] 3) ime:xa-server:jar:1.30.4
[10:19:14][Step 2/6] [ERROR] 4) log4j:log4j:jar:1.2.17
[10:19:14][Step 2/6] [ERROR] 5) com.sun.jmx:jmxri:jar:1.2.1: Cannot access https://maven-repository.dev.java.net/nonav/repository with type legacy using the available layout factories: Maven2RepositoryLayoutFactory: Unsupported repository layout legacy
[10:19:14][Step 2/6] [ERROR] -> [Help 1]
@ylexus
Copy link
Author

ylexus commented Dec 15, 2015

Explicitly managing the log4j to 1.2.17 and excluding jmxri does not help:

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.sun.jmx</groupId>
                        <artifactId>jmxri</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
        </dependencies>
    </dependencyManagement>

BTW maven version 3.3.9, plugin version 1.0-beta-6

@tchemit tchemit added this to the 1.0-beta-8 milestone Feb 26, 2016
@tchemit tchemit self-assigned this Feb 26, 2016
@tchemit tchemit added the bug label Feb 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants