Official Maven repo for com.springsource.org.jboss.el - maven

I have a project with a dependency org.jboss.el:com.springsource.org.jboss.el:jar:2.0.0.GA for which I am trying to find the official Maven repository.
It is unclear to me where this depedency should come from. Should I download this and create a Nexus repo myself. Is there a official repo for this artifact?
[ERROR] Failed to execute goal on project myproject: Could not resolve dependencies for project myjar:jar:5.0.0-SNAPSHOT: Failure to find org.jboss.el:com.springsource.org.jboss.el:jar:2.0.0.GA in https://mynexusserver/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced -> [Help 1]

The artifact org.jboss.el:com.springsource.org.jboss.el:jar:2.0.0.GA is available from Spring repositories:
You can add them by adding this snippet inside your settings or POM:
<repository>
<id>com.springsource.repository.bundles.release</id>
<name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/release</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.external</id>
<name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
Note that the error message you are getting suggest to run Maven with the -U option also, to force the updates of dependencies.

Related

Spring Asciidoctor Extensions not in correct repo?

Good afternoon guys,
I've been trying to get spring-asciidoctor-extensions to work with my documentation but for some reason maven can't find the dependency.
The error i got after my build attempt:
Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:1.5.5:process-asciidoc (generate-docs) on project organization: Execution generate-docs of goal org.asciidoctor:asciidoctor-maven-plugin:1.5.5:process-asciidoc failed: Plugin org.asciidoctor:asciidoctor-maven-plugin:1.5.5 or one of its dependencies could not be resolved: Failure to find io.spring.asciidoctor:spring-asciidoctor-extensions:jar:0.1.1.RELEASE 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]
I checked thier GitHub and looked around to find out that theres nothing in the maven repo (obvious from error) and in this question found that the repo is in https://repo.spring.io/release. Is there a way to reference a dependency to a repo directly? If not what can i do?
You can add the repo.spring.io repository to your pom.xml.
<repositories>
<repository>
<id>spring-repo</id>
<url>https://repo.spring.io/release</url>
</repository>
</repositories>
With that declaration in place you will be able to resolve this dependency:
<dependency>
<groupId>io.spring.asciidoctor</groupId>
<artifactId>spring-asciidoctor-extensions</artifactId>
<version>0.1.1.RELEASE</version>
</dependency>
More details in the docs.
Note: it is not possible to explicitly associate this dependency with that repository. Maven walks through the repositories in order of their declaration until a given dependency is resolved (or not) however if all of your other dependencies are resolved from Maven Central then the only dependency left to be resolved from repo.spring.io will be spring-asciidoctor-extensions.
I ran into this issue as well. My misconception at first was that I expected the dependencies to be resolved from the repositories section. However turns out that it's rather the pluginRepositories section. Like so:
<pluginRepositories>
<pluginRepository>
<id>spring-repo</id>
<url>https://repo.spring.io/release</url>
</pluginRepository>
</pluginRepositories>

Maven Repo Order

I want to prioritize the order of repo to download dependencies. Such that, firstly, I want all my dependency will download from default maven repo http://repo1.maven.org/maven2 then if required plugin didn't find, fall back on the other repo to find it say https://repo.adobe.com/nexus/content/groups/public/ . I am using maven2.2.1. I have tried by adding below code in my project's pom
<distributionManagement>
<repository>
<id>adobe-public-releases</id>
<name>Adobe Public Repository</name>
<url>http://repo.adobe.com/nexus/content/groups/public</url>
<layout>default</layout>
</repository>
</distributionManagement>
But still getting below error:
[DEBUG] Connecting to repository: 'central' with url: 'http://repo1.maven.org/maven2'.
Downloading: http://repo1.maven.org/maven2/org/apache/abdera/abdera-extensions-opensearch/1.0-R783018/abdera-extensions-opensearch-1.0-R783018.pom
[DEBUG] Unable to locate resource in repository
org.apache.maven.wagon.ResourceDoesNotExistException: Unable to locate resource in repository
My settings.xml file is same as default provided.
Thanks,
/project/distributionManagement is where your own artifacts will be uploaded.
For dependency resolution, you must use /project/repositories

Trouble downloading non-JCenter artifacts from bintray

My organization is attempting to release some open source into this world and we are starting with some of our libraries. Currently what I have is published some artifacts into the organization's location. They are available here and can be seen here:
They are not currently linked to JCenter, because I am OK for now using the explicit repo provided.
However any attempt to resolve them through maven results in:
http://dl.bintray.com/bds/sdk/
[ERROR] Failed to execute goal on project protex-plugin-integration: Could not resolve dependencies for project com.blackducksoftware.plugins:protex-plugin-inte
gration:jar:1.1.1: The following artifacts could not be resolved: com.blackducksoftware.protex:protex-sdk-client:jar:6.4.2, com.blackducksoftware.protex:protex-
sdk-utilities:jar:6.4.2: Could not find artifact com.blackducksoftware.protex:protex-sdk-client:jar:6.4.2 in bintray-bds-sdk (http://dl.bintray.com/bds/sdk) ->
[Help 1]
This is odd to me since the files are definitely visible via said URL.
Is what I am doing impossible and I must submit to JCenter and be accepted first?
The pom contains:
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray-bds-sdk</id>
<name>bintray</name>
<url>http://dl.bintray.com/bds/sdk</url>
</repository>
</repositories>
Your repository is well configured in the POM, but the error reported is true: In the http://dl.bintray.com/bds/sdk/com/blackducksoftware/protex/protex-sdk-client/6.4.2 location you cannot find the protex-sdk-client-6.4.2.jar library; the only existing JAR file has the version missing in its name.
You should review the deployment procedure: For some reason (maybe the finalName, or some other parametrization in the maven-jar-plugin), the library is being published without the version suffix.

How do I correctly use Nexus and Maven/Jenkins for a 3rd Party library (not in Maven Repository) and a necessary p2 repository

we use Jenkins/Maven for BuildManagement and Continuous Integration. Managing 3rd party libraries should be handled by the Nexus Server we set up.
A 3rd party library in question is org.eclipse.bpmn2 0.7.0
This library isn't hosted at a remote Maven repository, as far as we know
We've uploaded the 3rd party libraries to a hosted Nexus 3rd party repository
We have some proxy Nexus repositories pointing around the web (which work)
Now to the (maybe) problem part:
Our project consists of Eclipse plugins
We therefore need access to a eclipse p2 repository
The dependencies to 3rd party libraries are described in the Manifest.MF
Nexus Open Source doesn't support p2 repositories
We therefore have to add the Eclipse p2 repository to the project POM
First, (probably) relevant settings from our settings.xml from the Maven that Jenkins uses:
<localRepository>/var/lib/jenkins/local_repo</localRepository>
We have a local Maven repository.
Maybe important: How do the local Maven repo and Nexus work together? Is the local repository redundant? Could it conflict with Nexus libraries? Or does Maven only load the dependencies from Nexus and store in the local repository? Should we have emptied it after installing Nexus?
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://localhost:8082/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built central repo to direct
all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
<activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles>
As you can probably see, we use the default nexus config for now.
Now to the relevant project POM contents:
<repositories>
<!--
<repository>
<id>UML2</id>
<layout>p2</layout>
<url>http://download.eclipse.org/modeling/mdt/updates/releases/</url>
</repository>
-->
<repository>
<id>indigo</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/indigo</url>
</repository>
</repositories>
We tried to incorporate the p2 repositories into Nexus, but then saw that the open source version can't handle p2 repositories. So we need to have them in the project POM, as repositories in addition to the Nexus.
The MDT repository is commented out because it seems to work without it.
The dependency to org.eclipse.bpmn2 is in the manifest.MF of the corresponding plugin using it:
Require-Bundle:
org.eclipse.bpmn2;bundle-version="0.7.0";visibility:=reexport
The library was uploaded to Nexus (using GAV parameters):
GroupID: org.eclipse
ArtifactID: org.eclipse.bpmn2
version: 0.7.0.201111021300
packaging: jar
MAYBE IMPORTANT: The classifier was left empty. What should be entered here?
When starting the Jenkins job and Maven with -e -X the output is as follows:
[DEBUG] P2resolver.addMavenProject de.some.tool:pom:2.0
[INFO] Adding repository (cached) http://download.eclipse.org/releases/indigo
[DEBUG] Added p2 repository indigo (http://download.eclipse.org/releases/indigo)
[INFO] Cannot complete the request. Generating details.
[INFO] Cannot complete the request. Generating details.
[INFO] {org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1, osgi.ws=gtk, osgi.arch=x86, osgi.os=linux, org.eclipse.update.install.features=true, org.osgi.framework.system.packages=}
[ERROR] Cannot resolve project dependencies:
[ERROR] Software being installed: de.modeltype.bpmn2 1.0.0.qualifier
[ERROR] Missing requirement: de.modeltype.bpmn2 1.0.0.qualifier requires 'bundle org.eclipse.bpmn2 0.7.0' but it could not be found
[ERROR]
mavenExecutionResult exceptions not empty
message : Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from de.modeltype.bpmn2 1.0.0.qualifier to bundle org.eclipse.bpmn2 0.7.0.", "No solution found because the problem is unsatisfiable."]
cause : "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from de.modeltype.bpmn2 1.0.0.qualifier to bundle org.eclipse.bpmn2 0.7.0.", "No solution found because the problem is unsatisfiable."]
Stack trace :
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from de.modeltype.bpmn2 1.0.0.qualifier to bundle org.eclipse.bpmn2 0.7.0.", "No solution found because the problem is unsatisfiable."]
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:104)
at hudson.maven.Maven3Builder.call(Maven3Builder.java:70)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:287)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: "No solution found because the problem is unsatisfiable.": ["Unable to satisfy dependency from de.modeltype.bpmn2 1.0.0.qualifier to bundle org.eclipse.bpmn2 0.7.0.", "No solution found because the problem is unsatisfiable."]
at org.eclipse.tycho.p2.impl.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:106)
at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:102)
at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:69)
at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:342)
at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:162)
at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:85)
at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:91)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
... 19 more
channel stopped
Finished: FAILURE
What are we doing wrong?
You have a few things going on here:
Maybe important: How do the local Maven repo and Nexus work together?
Is the local repository redundant? Could it conflict with Nexus
libraries? Or does Maven only load the dependencies from Nexus and
store in the local repository? Should we have emptied it after
installing Nexus?
Maven makes requests for artifacts not found in the local repository from the remote repositories. Nexus is a remote repository, even if it's on the same machine. So in order to get requests running through your new Nexus setup, you need to first empty the local repo. Then things will be cached in Nexus and in the local repo by Maven.
The next thing is that you have this:
<mirrorOf>*</mirrorOf>
which tells maven to make requests to Nexus for ALL repositories. This would include the P2 repo you defined lower in your settings. In order to tell Maven to bypass the mirror, you want to do this:
<mirrorOf>*,!indigo</mirrorOf>
Additionally, the p2 plugins for Nexus are available for open source, they just aren't included in the bundle by default, but you can download and install them manually.
And finally, we have IRC rooms and mailing lists and knowledgebases here that might be helpful to you: http://www.sonatype.org/nexus/participate
By default, Tycho doesn't search in Maven repositories for resolving dependencies. (Background: Searching the full Maven repository wouldn't be possible because the index of Maven repositories doesn't contain enough information for Tycho to do its dependency resolution and hence Tycho would be forced to download and analyse all Maven artefacts.)
However it is possible to add some Maven artefacts to Tycho's search space (the so-called "target platform"):
Set pomDependencies=consider on the target-platform-configuration plugin (see here for an example POM)
Add a dependency to the org.eclipse.bpmn2 bundle by its GAV in the POM.
If you then have a Require-Bundle: org.eclipse.bpmn2 in the manifest, Tycho will be able to resolve that dependency because the bundle is there in the target platform.
Note that you'll need to have the above configuration and dependency in all modules which transitively require the org.eclipse.bpmn2 bundle, so you probably want to put it into your parent POM.

How can i use SVN as Maven Repository

I am working on project which has multiple dependencies. Most of the dependencies are available at our centralized maven repository. My project includes some JARs which only specific to my application and unavailable at our Maven repo. Due to some policy/restriction i cant deploy that jars to our maven repository.
When i install these jars in my local repository(i.e.UserHome/.m2/repository) and compile the code its working fine.
Now i want these dependencies in SVN so that we can build the application package using Continuum.(We cant refer local dependency from Continuum server.)
Just to achieve these i copied the locally installed dependency from .m2/repository and committed it in SVN. Then i declared repository in pom.xml like..
<repositories>
<repository>
<id>repo.pu</id>
<name>repo.pu</name>
<url>https://URL/migration2/APP1/src/main/lib/</url>
<layout>default</layout>
</repository>
</repositories>
Now to use dependency from above repo i added code like...
<dependencies>
<dependency>
<groupId>repo.pu</groupId>
<artifactId>Ptestval</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
When i type mvn verify i am getting the below error..
[ERROR] Failed to execute goal on project APP1: Could not resolve dependencies f
or project fileservices.migration2:APP1:jar:1.0: Failed to collect dependencies
for [repo.pu:Ptestval:jar:1.0 (compile)]: Failed to read artifact descriptor for
repo.pu:Ptestval:jar:1.0: Could not transfer artifact repo.pu:Ptestval:pom:1.0
from/to repo.pu (https://URL/migration2/APP1/src/main/lib/): Access denied to:
https://URL/migration2/APP1/src/main/lib/repo/pu/Ptestv
al/1.0/Ptestval-1.0.pom -> [Help 1]
Could you please someone help me to resolve these issue?
EDIT: I created a repository like ..
<repositories>
<repository>
<id>repo.pu</id>
<name>repo.pu</name>
<url>https://SVNUserName:SVNPassword#SVN_URL/BaseProj/ProjA/src/main/lib</url>
<layout>default</layout>
</repository>
</repositories>
This technique works perfectly at my Personal laptop. Maven downloads the listed dependency from repo.
But when tries to use the same in my project on company network it is not working .. It gives the same error which i was getting before using this approach.
Can anyone help me please? What would be problem? Is it a network issue?
Set up a repository manager like Nexus and don't abuse Subversion for something it was not designed for. This is unfortunately done in Google Code.
You must configure your project to use wagon-scm.
See http://maven.apache.org/wagon/wagon-providers/wagon-scm/usage.html

Resources