Why is incorrect URL used for glassfish's security-all jar from Maven repo? - glassfish

I added the following to build.sbt (doing programmatic login with embedded GlassFish for unit tests):
libraryDependencies += "org.glassfish.main.security" % "security-all" % "4.0"
However sbt seems to try to fetch the wrong URL. It tries to get (note the additional glassfish- in the extension):
http://repo1.maven.org/maven2/org/glassfish/main/security/security-ee/4.0/security-ee-4.0.glassfish-jar
But the actual jar file is at:
http://repo1.maven.org/maven2/org/glassfish/main/security/security-ee/4.0/security-ee-4.0.jar
So instead of using .jar as the extension it appears to be using .glassfish-jar for some reason and am facing the following download failed errors:
[trace] Stack trace suppressed: run last *:update for the full output.
[error] (*:update) sbt.ResolveException: download failed: org.glassfish.main.security#security;4.0!security.glassfish-jar
[error] download failed: org.glassfish.main.admin#config-api;4.0!config-api.glassfish-jar
[error] download failed: org.glassfish.main.common#common-util;4.0!common-util.glassfish-jar
[error] download failed: org.glassfish.main.common#glassfish-api;4.0!glassfish-api.glassfish-jar
[error] download failed: org.glassfish.main.common#scattered-archive-api;4.0!scattered-archive-api.glassfish-jar
[error] download failed: org.glassfish.main.security#ssl-impl;4.0!ssl-impl.glassfish-jar
[error] download failed: org.glassfish.main.common#internal-api;4.0!internal-api.glassfish-jar
[error] download failed: org.glassfish.main.deployment#deployment-common;4.0!deployment-common.glassfish-jar
[error] download failed: org.glassfish.main.security#security-ee;4.0!security-ee.glassfish-jar
[error] download failed: org.glassfish.main.common#glassfish-ee-api;4.0!glassfish-ee-api.glassfish-jar
[error] download failed: org.glassfish.main.deployment#dol;4.0!dol.glassfish-jar
[error] download failed: org.glassfish.main.common#annotation-framework;4.0!annotation-framework.glassfish-jar
[error] download failed: org.glassfish.main.security#jaspic.provider.framework;4.0!jaspic.provider.framework.glassfish-jar
[error] download failed: org.glassfish.main.ejb#ejb-internal-api;4.0!ejb-internal-api.glassfish-jar
[error] download failed: org.glassfish.main.connectors#connectors-internal-api;4.0!connectors-internal-api.glassfish-jar
[error] download failed: org.glassfish.main.transaction#transaction-internal-api;4.0!transaction-internal-api.glassfish-jar
[error] download failed: org.glassfish.main.admin#admin-util;4.0!admin-util.glassfish-jar
[error] download failed: org.glassfish.main.security#security-services;4.0!security-services.glassfish-jar
[error] download failed: org.glassfish.main.resources#resources-connector;4.0!resources-connector.glassfish-jar
[error] download failed: org.glassfish.main.resourcebase.resources#nucleus-resources;4.0!nucleus-resources.glassfish-jar
[error] download failed: org.glassfish.main.security#inmemory.jacc.provider;4.0!inmemory.jacc.provider.glassfish-jar
I have no idea why or even where to look. I would think it would be something with the pom file, but Netbeans (probably the Maven embedded in Netbeans) did not have any trouble with the same pom.
Also, all the "transitive" jars end up have the wrong URL as well, so they all fail.
I worked around it with this:
libraryDependencies += "org.glassfish.main.security" % "security-ee" % "4.0" from "http://repo1.maven.org/maven2/org/glassfish/main/security/security-ee/4.0/security-ee-4.0.jar" intransitive()
but I would rather not have to do that hoping there is a way to do this properly. My searches for a real solution to this came up empty. Please advise.

The reason for the behaviour is that the module defines the packaging glassfish-jar for some of the transitive dependencies - see inmemory.jacc.provider-4.0.pom and security-4.0.pom:
<packaging>glassfish-jar</packaging>
Run sbt update in the project and open target/resolution-cache/reports/default-glassfish-security_2.10-compile.xml for the resolution report for the Compile (default) configuration.
Use sbt-dependency-graph to visualize your project's dependencies.

Related

Unable to import a giter project in IntellliJ

I have created starter projects from the following link - https://www.playframework.com/documentation/2.6.x/Tutorials
Now I want to import these projects in IntelliJ.I am trying to follow the instructions from this link but I get this error. What is the mistake? I tried importing by first selecting the complete directory and later by selecting only build.sbt . IntelliJ versiokn is 2016.3.4
https://www.jetbrains.com/help/idea/getting-started-with-play-2-x.html#import_project
Error
Error while importing SBT project: ...
[error] at sbt.MainLoop$.runLoggedLoop(MainLoop.scala:37)
[error] at sbt.MainLoop$.runLogged(MainLoop.scala:29)
[error] at sbt.StandardMain$.runManaged(Main.scala:104)
[error] at sbt.xMain.run(Main.scala:71)
[error] at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
[error] at xsbt.boot.Launch$.withContextLoader(Launch.scala:128)
[error] at xsbt.boot.Launch$.run(Launch.scala:109)
[error] at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:35)
[error] at xsbt.boot.Launch$.launch(Launch.scala:117)
[error] at xsbt.boot.Launch$.apply(Launch.scala:18)
[error] at xsbt.boot.Boot$.runImpl(Boot.scala:41)
[error] at xsbt.boot.Boot$.main(Boot.scala:17)
[error] at xsbt.boot.Boot.main(Boot.scala)
[error] java.lang.ClassNotFoundException: org.jetbrains.sbt.CreateTasks$
[error] Use 'last' for the full log.
[error] Not a valid key: dump-structure (similar: buildStructure)
[error] */*:dump-structure
[error] ^
[INFO] [12/22/2017 05:46:39.234] [Thread-5] [CoordinatedShutdown(akka://sbt-web)] Starting coordinated shutdown from JVM shutdown hook
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=384M; support was removed in 8.0
See complete log in C:\Users\Manu\.IntelliJIdea2016.3\system\log\sbt.last.log Consult IDE log for more details (Help | Show Log)

Could not resolve dependencies for project org.apache.ignite:ignite-examples:jar:2.0.0

I am getting miss-jar file errors with .examples/pom.xml. Below is the error message. Anyone knows how to resolve this? Thanks a lot.
[ERROR] Failed to execute goal on project ignite-examples: Could not resolve dependencies for project org.apache.ignite:ignite-examples:jar:2.0.0: Failure to find org.apache.ignite:ignite-apache-license-gen:jar:2.0.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
Try to build project with -am option, -am builds projects that your project depends on

Error installing Oozie 4.2.0

While trying to execute mkdistro.sh getting the following error:
[ERROR]
[ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.apache.oozie:oozie-main:4.2.0: Could not transfer artifact org.apache:apache:pom:16 from/to central (http://repo1.maven.org/maven2): repo1.maven.org: unknown error and 'parent.relativePath' points at wrong local POM # line 22, column 13
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.apache.oozie:oozie-main:4.2.0 (/usr/local/Oozie_4.2.0_O/oozie-4.2.0/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.apache.oozie:oozie-main:4.2.0: Could not transfer artifact org.apache:apache:pom:16 from/to central (http://repo1.maven.org/maven2): repo1.maven.org: unknown error and 'parent.relativePath' points at wrong local POM # line 22, column 13: Unknown host repo1.maven.org: unknown error -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
System information:
Hadoop Version: 2.4.0
Maven Version: 3.3.9
Oozie: 4.2.0
How can I solve this error?

Unable to build ODL sdn controller code .?

I have downloaded the code using
git clone https://git.opendaylight.org/gerrit/p/integration/distribution.git
When I try to build this, it shows following error.
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for org.opendaylight.integration:root:0.5.0-SNAPSHOT: Could not find artifact org.opendaylight.odlparent:odlparent:pom:1.7.0-SNAPSHOT and 'parent.relativePath' points at no local POM # line 4, column 11
#
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project org.opendaylight.integration:root:0.5.0-SNAPSHOT (/home/controller/distribution/pom.xml) has 1 error
[ERROR] Non-resolvable parent POM for org.opendaylight.integration:root:0.5.0-SNAPSHOT: Could not find artifact org.opendaylight.odlparent:odlparent:pom:1.7.0-SNAPSHOT and 'parent.relativePath' points at no local POM # line 4, column 11 -> [Help 2]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
You need to make sure your settings.xml points to the OpenDaylight Nexus artifact repository. The simplest way to do this is to download https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml and place it in your ~/.m2 folder (wherever that is — it depends on your operating system).
Yes, your settings.xml should be updated. An alternative way of updating (though same result as above):
Run this from your terminal:
cp -n ~/.m2/settings.xml{,.orig} ; \wget -q -O - https://raw.githubusercontent.com/opendaylight/odlparent/master/settings.xml > ~/.m2/settings.xml
As suggested by stephen, path may be different based on your OS. Change it accordingly.

Jenkins just login at the second attempt

When I do a deploy on jenkins it fails at the first attempt, but second attempt suceeds.
The same for the (web console) login. When I try to login in first time it fails, but when I retry the login suceeds. (Yes, I typed my password correctly both times).
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project test: Failed to deploy artifacts: Could not transfer artifact com.teste:test:jar:0.8.0 from/to artifactory.test.com(http://artifactory.test/libs-release-local): Failed to transfer file: http://artifactory.test.com/libs-release-local/com/test/test/0.8.0/test-0.8.0.jar. Return code is: 401, ReasonPhrase:Bad credentials. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
Thanks.
Fix <ldapUrl> tag in /app/artifactory/etc/artifactory.config.latest.xml file