Sonatype Nexus can't index IBM Maven repository - maven

We're trying to proxy the IBM Maven repository on our company internal Sonatype Nexus. We added the repository address but the repo has not been populated even under direct request.
The Sonatype nexus' "Browse Index" tab is empty whereas the "Browse Remote" correctly shows the library tree. But when adding dependecies to a project's pom.xml file, the IDE says it cannot find the archetypes and the artifacts.
Is the IBM repository indexed? Is there something we're missing? We are using IBM RAD 9.5 and Sonatype Nexus™ 2.11.4-01

Many Maven repositories do not publish search indexes, they are entirely optional, and only used to support interactive search. They are not used by Maven for artifact retrieval. To see if the remote publishes a search index try retrieving ".index/nexus-maven-repository-index.properties" from it.
If Maven cont' download artifacts from the repository see here for information on how to diagnose the issue:
https://support.sonatype.com/hc/en-us/articles/213464518-Troubleshooting-Artifact-Download-Failures
Again, artifact download failures have nothing to do with search indexes.

Related

health check of custom repositories in Nexus?

I have created a repository in Nexus. As I am the owner of this repository, it is of type : Hosted.
I was going through the book of Mastering Apache Maven 3.0 and it says that, it is not possible to perform a health check on the repositories which are
1.The Repository Type is Proxy.
2.The Repository Policy is not Snapshot.
3.The Repository is In Service.
I have the last 2 conditions satisfied in my repository. But, the type of my repository is Hosted as I have the repository in my local machine.
Is there anything which I can do for a health check of custom repositories in Nexus?
I have one more question. If I want to mark an artifact in my hosted repository, how should I do that? Or should I just delete the vulnerable artifact from the repository?
Thanks in Advance!
How could nexus perform a health check on your custom libs?
From the nexus docs
HDS exposes data about the components in the Central Repository and
other public repositories, including license information, security
vulnerability data, and other statistics like relative usage
popularity and age
HDS is
Hosted Data Services (HDS) run by Sonatype
None of that is available for your hosted custom libraries. You can't really expect sonatype to maintain a database about them, because it doesn't know about them. If you want this, move your libs to an open-source model with an appropriate licence and upload them to maven central.

How to update Nexus index of SpringSource repository

I added two SpringSource repositories to my Nexus instance
http://repository.springsource.com/maven/bundles/release
http://repository.springsource.com/maven/bundles/external
Configuration looks fine but I noticed that the index is always empty. So it is not possible to resolved depedencies for artifacts in this repository.
I can use Browse Remote to navigate to the artifact. So the artifact I need is in the repository but without an index, this is of no use it seems.
Also when I use search in Nexus I cannot find the artifact.
Why is there no index for these repositories?
How should these repositories be used?
These repositories do not publish search indexes, you can test for this by trying to retrieve "/.index/nexus-maven-repository-index.properties" through them:
http://repository.springsource.com/maven/bundles/release/.index/nexus-maven-repository-index.properties
Search indexes are an optional repository feature, they are not needed for artifact retrieval, they are used to support interactive search in UI's such as Nexus and m2Eclipse. Nexus will be able to pull artifacts from these repositories without issue, and as artifacts are downloaded they will be added to the local search indexes.

Publishing licensed artifact to Maven Central Repository

I need to push our project API's (bundled jar) to Maven Central Repository. As Part of that,i have gone through this link . However, am quite confused whether our project is eligible to publish in maven central repo,
Our API is not open source. it need to distribute only to client who purchase from us. is Maven provides any restrictions to download jar only for specific user who has some key etc?
POM.xml is requesting for licensing information. ours is not open source, if we allowed to publish, what should be licensing content in pom.xml?
Why we have to give our repo information in pom.xml? we are using bitbucket and hence providing the repo url is not accessible for others. can we have dummy repo or it is mandatory?
Please help me out guys.
Everything you publish to maven central will be available to everyone in the world.
For your use case, you can consider hosting your own maven repository.
Check sonatype nexus, artifactory, archiva...
With your own repo, you can configure a password in your server. Then your clients will need to configure your server in their pom.xml or settings.xml to download your artifacts.

Proxying maven central snapshots leads to "Remote disabled automatic routing" error in Nexus

My project uses an open source framework I have written. The latest version of the framework is in maven central, but we need its latest snapshot version. The snapshot version can be found in https://oss.sonatype.org/content/repositories/snapshots/
We am using an installation Sonatype Nexus in the project as a mirror of everything (*). In Nexus I have defined a proxy-repository with repository-policy snapshot to the above link. The public repositories group contains that proxy-repository.
Unfortunately routing for that proxy-repository fails in Nexus with "Remote disabled automatic routing" and the build fails since it can't find the frameworks snapshot version in the repository.
How can I access a snapshot version of a framework stored in central via my Sonatype Nexus instance? According to https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide#SonatypeOSSMavenRepositoryUsageGuide-7a.2.PublishSnapshots this should be possible.
In your proxy repository configuration is a "Repository Policy" drop down -> you need you choose "SNAPSHOT" there.

is weblogic-maven-plugin available from maven center repository?

When i run my maven build script i get
Plugin com.oracle.weblogic:weblogic-maven-plugin:2.9.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.oracle.weblogic:weblogic-maven-plugin:jar:2.9.1: Could not find artifact com.oracle.weblogic:weblogic-maven-plugin:pom:2.9.1 in central (http://repo1.maven.org/maven2)
But when i search in repository i can see it there http://search.maven.org/#search|ga|1|weblogic-maven-plugin
Why this plugin is not available?
As Oracle WebLogic is not an open source product, Oracle has decided not to publish their Maven plugins in the Maven Central repository (providing the sources for each published artifact has now become a requirement, according to the Maven Central Repository Usage Guide).
Until recently, the only way was to build and install the WebLogic JAR file into the local Maven cache.
Starting from 2015, Oracle has set up a Maven repository which can be accessed by anyone having a valid OTN account - see abarisone's answer.
From the early months of 2015 Oracle has at last made its Maven repository available for Continuous Integration purposes.
This means that you will be able to find not only all Oracle Database artifacts but also those related to Fusion Middleware, Oracle Service Bus, ADF and so on.
You can find more info reading this blog post.
Obviously you need to have a valid OTN account to log in, and the same is required to configure maven proxies and Nexus.
Once registered you will have access to the following link which explains all the instructions in order to configure the repository.
About Sonatype Nexus, you need at least version 2.11.2 to be able to add the Oracle repository, as reported here

Resources