How to get artifact from maven repository without maven? - maven

First, I am not a maven user. I need this library: https://github.com/ansell/JenaSesame but only the source code is available. The readme shows this information:
Repository
http://openjena.org/repo-dev
Group: org.openjena
Artifact: jena-sesame
But when I browse to that location I get a 404. How can I grab that artifact from that repository? I'm willing to install maven if I have to to get it; I just need the compiled library jars.
I have already searched the maven central repository at http://search.maven.org , and it is not there.

Any publicly-accessible repository should be viewable in a browser, and as such you should be able to download any JAR file contained within. The URL you've listed, openjena.org/repo-dev [1], looks more like a development repository. There are plenty of repositories around the world that are internal repositories, so this looks like one that hasn't been set up for public consumption.
It looks like they have binary releases available for download here: http://www.apache.org/dist/jena/ Have you looked there for what you're after?
[1]: Now a spam domain - visit https://jena.apache.org/ instead.

Related

Is it possible to make a maven-repository with a static-website?

Stupide idea but ... is it possible to create a maven repository from a static website?
if I mannualy put pom and jar file on a website with a path similar to the one on any maven repository, then I reference the website as a maven repository from which I try to import dependency, will it work ?
I need it in order to store my snapshot version without publishing them. I don't care of security but I have 0 budget

Is there a way in Gradle to define what patterns of artifacts should, (or should not), be resolved via a repository?

Is there a way in Gradle to explicitly define where certain artifacts should be coming from?
We have a legacy project which is being on-boarded to use a proper artifact repository manager, instead of a network share. However, we have multiple repositories from which artifacts are being downloaded. We'd like to be able to fine-grain where certain artifacts should be coming from, until we can fully on-board to the artifact repository manager in question.
Is something like this possible?
Yes that is possible as of Gradle 5.1
https://docs.gradle.org/5.1/release-notes.html#repository-to-dependency-matching
Repository to dependency matching
It is now possible to match repositories to dependencies, so that Gradle doesn't search for a dependency in a repository if it's never going to be found there.
See the docs for more details: https://docs.gradle.org/5.6.2/userguide/declaring_repositories.html#sec::matching_repositories_to_dependencies

intellij idea specify repository for downloading sources

It seems that question can be related to How to automatically attach source code for dependency in Intellij? but it`s not in full manner.
In debug mode I'm getting into decompiled file and idea ask me to download or set the path to sources.
For resolving I'm using some nexus repository which aggregates different vendors public jars (proxy repositories,reuploaded jars and etc). Unfortunately it contains jars but very often it doesn't contain sources or javadocs.
But at the same time vendors' repositories contain sources. After clicking "download" button - I can see that idea try to find sources only in "oss.sonatype.org" repository.
So is any ability to set the list of repositories where Idea can search sources?
IntelliJ will respect your normal Maven configuration. You can define repositories in the actual pom.xml or in your maven user setting under ~/.m2/settings.xml. See https://maven.apache.org/guides/mini/guide-multiple-repositories.html
Check settings of IntelliJ IDEA "Settings-->Maven-->Repositories
There are two sections:
Index Maven Repositories
Artifactory or Nexus Service URLs

Grails support for new Maven Central

I was trying to pick up dependencies from the maven central repo and it looks like the URL to download the same has recently moved from repo1.maven.org to search.maven.org with a different format and as such Grails 2.2.2 isn't able to resolve it.
Do we know if this has been updated in the newer grails versions and if not is there a suggested elegant work around for this short of downloading the jars to the lib folder and renaming them?
Thanks
The URL hasn't changed, e.g. see http://repo1.maven.org/maven2/org/springframework/security/oauth/spring-security-oauth2/1.0.5.RELEASE/
What did change (months ago) is that their web-based search moved to search.maven.org. But if the URL changed or if you want another custom repo, you could easily add it to your BuildConfig.groovy using mavenRepo "http://download.java.net/maven/2/" substituting the correct URL
Note that grailsCentral() is a front-end for other repos, in addition to having a few jars there for real. Most of the resources there are passthroughs to Maven Central or other repos. It should be first in your repo list so it's accessed first, and then if something isn't there it can fall back to one of the other defined repos.

How do i set Maven to retrieve dependencies first from my own remote repository (Archiva)?

How do i set Maven to retrieve external dependencies first from my own remote repository (using Archiva), and if its not found, Archiva will download from external sources, and at the same time saves the downloaded dependency?
You essentially have to set up your .m2/settings.xml file, nothing fancy.
Here is a pretty comprehensive guide. While based on Artifactory, the aspects of POM configuring are obviously general. That should give you all the information you need.

Resources