Unable to download artifactory from search.maven.org - java

I'm trying to do a clean install on this project
https://github.com/jberet/jberet-wildfly-samples
I'm stucked with this error:
Could not resolve dependencies for project
org.jberet.samples:clusterInfinispan:war:1.4.0.Alpha-SNAPSHOT: Failed
to collect dependencies at
org.jberet:jberet-wildfly-cluster-infinispan:jar:1.3.0.Final: Failed
to read artifact descriptor for
org.jberet:jberet-wildfly-cluster-infinispan:jar:1.3.0.Final: Failure
to find org.jberet:jberet-wildfly:pom:1.4.0.Alpha-SNAPSHOT
It appears that artifactory is ONLY available on search.maven.org
I tried to do either a force update -U and to manually clean the local repo directory, but nothing changes.
I wonder if I have to manually add the above repo or should automatically seek there
Any hints?

I think he didn't publish 1.4.0.Alpha in maven center.
You can try to change 1.4.0.Alpha to 1.3.0.Final in pom.xml like this
<parent>
<groupId>org.jberet</groupId>
<artifactId>jberet-parent</artifactId>
<version>1.3.0.Final</version>
</parent>
<groupId>org.jberet.samples</groupId>
<artifactId>wildfly-jberet-samples</artifactId>
<version>1.3.0.Final</version>
And use mvn clean install -Pwildfly

Wow, you are right: https://search.maven.org/artifact/org.jberet/jberet-wildfly-cluster-infinispan/1.3.0.Final/jar
I'm not sure if anybody here on Stackoverflow will be able to help you.
Continue your issue with jberet's community: https://github.com/jberet/jberet-wildfly-samples/issues/2 you have to solve it with them.
EDIT:
Now that I think more about it, it's also possible to add their SNAPSHOT repository to your settings.xml file: https://maven.apache.org/settings.html#Repositories but I didn't find link to their repository.
Anyway: witnessing this I would stay away from jberet project, because this is a big failure on their part.

Read the maven error: "failure to find org.jberet:jberet-wildfly:pom:1.4.0.Alpha-SNAPSHOT" means there is a a dependency referencing org.jberet:jberet-wildfly:pom 1.4.0.Alpha-SNAPSHOT.
Either the repository forbids deploying SNAPSHOT (and it make sense for central)
either your configuration forbids downloading SNAPSHOT (see http://maven.apache.org/settings.html#Repositories).
You should check local pom.xml referencing 1.4.0.Alpha-SNAPSHOT and replace it with a non SNAPSHOT (1.4.0.Alpha for beginners).

Related

maven tries to retrieve wrong snapshot version from repository because of bad maven-metadata.xml

I'm using maven to fetch dependencies from our company's internal repositories. We use Artifactory. Everything works ok, but sometimes I have a recurring problem. After mvn -U clean compile I get an error.
Could not resolve dependencies for project company_groupId:company_dependency-articfactId:jar:0.0.1-SNAPSHOT: Could not find artifact company_groupId:company_dependency-articfactId:jar:2.0.17-20210429.123648-56 in snapshots2 (https://company.repository/snapshots)
When I look which jars repository actually contains, it appears it has 3 files in company_dependency-articfactId/0.0.1-SNAPSHOT
maven-metadata.xml
company_dependency-articfactId-2.0.17-20210430.091957-56.jar
company_dependency-articfactId-2.0.17-20210430.091957-56.pom
So, maven searches for date 20210429 and what repository actually contains is date 20210430 .
I thought maybe something removes dependencies, but the I looked inside maven-metadata.xml .
Comments added for better understanding.
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
<groupId>company_dependencyId</groupId>
<artifactId>company_dependency-articfactId</artifactId>
<version>2.0.17-SNAPSHOT</version>
<versioning>
<snapshot>
<timestamp>20210430.091957</timestamp> <!-- ok version -->
<buildNumber>56</buildNumber>
</snapshot>
<lastUpdated>20210430092512</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>2.0.17-20210429.123648-56</value> <!-- WRONG version -->
<updated>20210429123648</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>2.0.17-20210430.091957-56</value> <!-- ok version -->
<updated>20210430091957</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
</metadata>
As you can see, jar version of snapshot actually points to the wrong jar, which doesn't exist.
I looked at other dependencies and they're ok. So it's not something, which happens to all artifacts at a specific date.
I've no idea what could have caused this. Maybe somebody has already encountered such an issue?
Also I have couple of specific questions.
Could this mismatch between pom and jar versions of snapshots occur naturally? Like a script, which uploads next version for pom, but not for jar?
Could it be some kind of an error, when we have already uploaded pom, but couldn't upload jar for some reason? I mean it probably could happen, but is it reasonable to think that actually happens regularly?
Maybe it's a normal thing to upload pom and jar separately?
I haven't experienced anything like that before, so any help is much appreciated.
There's a couple of bugs in Artifactory, which could have caused this. For example https://www.jfrog.com/jira/browse/RTFACT-21321 https://www.jfrog.com/jira/browse/RTFACT-6514 or https://www.jfrog.com/jira/browse/RTFACT-21321 .
The problem could be solved by recreating metadata as J Fabian Meier suggested.
Got same problem. After some research it seams to be a known & already fixed bug https://issues.apache.org/jira/browse/MNG-6754.
Upgrading your maven should fix it.

Maven- Could not resolve dependency

I am a beginner in using Maven.. I tried to add Grobid (for pdf parsing) in maven. The dependency I gave is :
<dependency>
<groupId>org.grobid</groupId>
<artifactId>grobid-core</artifactId>
<version>0.3.4</version>
</dependency>
But on building the pom it shows the following error:
[ERROR] Failed to execute goal on project Miner: Could not resolve dependencies for project Miner:war:1.0-SNAPSHOT: Failed to collect dependencies at org.grobid:grobid-core:jar:0.3.4 -> org.chasen:crfpp:jar:1.0.2: Failed to read artifact descriptor for org.chasen:crfpp:jar:1.0.2: Could not transfer artifact org.chasen:crfpp:pom:1.0.2 from/to 3rd-party-local-repo (file:///${basedir}/lib/): Repository path /${basedir}/lib does not exist, and cannot be created. -> [Help 1]
I have gone through different questions related..I tried after adding pom etc. Still it is not working.. why this error comes..do we have to do extra codes for Grobid..?
add the below repository in pom or .m2/settings.xml
<repositories>
<repository>
<id>Grobid repository</id>
<url>https://mvnrepository.com/artifact/org.grobid/grobid-core</url>
</repository>
</repositories>
Start by downloading maven from http://mirror.vorboss.net/apache/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.zip
Unzip it somewhere, then assuming your're on windows
1) set an environment variable M2_HOME to point at the unziped folder.
2) add %M2_HOME%/bin to your PATH environment variable
3) go to your home directory (probably C:/Users/????? and create a .m2 folder
4) move the settings.xml file from the maven unzippped/conf directory to the directory created in step 3.
5) you may have to set the proxy element correctly in your settings.xml file
It should work.
You might be new to maven, but it explicit the problem here:
Repository path /${basedir}/lib does not exist, and cannot be created.
This means that Maven could not locate the repository path you are trying to access. Or (from the "cannot be created") can't find the directory where to save the content.
As you did not provide pom.xml to look further, you'll have to find all ${basedir}/lib path in your pom.xml and in your maven settings (default to %USERPROFILE%/.m2/settings.xml or $HOME/.m2/settings.xml), then you may want to
try with an absolute path.
use an actual HTTP repository where that dependency and child' dependencies are.
use a repository server such as Sonatype Nexus or Archiva and provide a mirror/copy of it.

Nexus Proxy Repository to http://dynamicjasper.com FAILED

I'm trying to create a Nexus Proxy Repository to http://nexus.fdvs.com.ar/content/groups/public/, but we have only problems!!!! When I try buid my maven project, my Nexus does not find the DynamicJasper:4.0.2 artfact and the bellow error happens:
[ERROR] Failed to execute goal on project siepa-web: Could not resolve dependencies for project com.indra.cartoes:siepa-web:war:1.0.0-SNAPSHOT: Could not find artifact ar.com.fdvs:DynamicJasper:jar:4.0.2 in nexus (http://nexus.sispcs.web/nexus/content/groups/public/) -> [Help 1]
Any idea about these problem?
Thanks for your attention and time.
I have founded the problem.
Add proxy repository to Nexus Public Repository and error finish.
But now another error have emerged:
Failed to transfer file: http://nexus.sispcs.web/nexus/content/groups/public/ar/com/fdvs/DynamicJasper/4.0.2/DynamicJasper-4.0.2.pom. Return code is: 502 , ReasonPhrase:Bad Gateway
Any help?
The problem was resolved.
Really it was necessary add the target proxy repository to Nexus Public Repository.
Thx for all.
The first URL you reference returns an error.
Check that the artifact is actually available manually.

How to configure maven for alternate deployment repos?

I've been reading the docs for the deploy plugin, and am confused about the altDeployment repository parameters.
There are these three params:
altDeploymentRepository
altReleaseDeploymentRepository
altSnapshotDeploymentRepository
Whereas the altRelease and altSnapshot seem to be fairly straightfoward, I'm not sure what the altDeploymentRepository setting is for. Is that supposed to be a superset of the Snapshot and Release?
Can someone clarify the difference between the three settings and when to use which?
altDeploymentRepository
No idea
altReleaseDeploymentRepository
Let's say you are going to build the artifact which does not have any SNAPSHOT attached to your pom file. Ex: 43.0.1 (this is release version) 43.0.1-SNAPSHOT (this is SNAPSHOT version), release version will always be unique...also it means you have properly tested all the code.
So when you define releaseRepo, your artifact will load into the release repository
altSnapshotDeploymentRepository
SNAPSHOT artifact is useful for initial testing: once you build the code, respective artifact will load into the snapshot repository

Unable to use Neo4j 1.9.M05

When I add Neo4j 1.9.M05 to my project dependencies (with maven), I'm getting the following error in eclipse:
ArtifactDescriptorException: Failed to read artifact descriptor for org.neo4j:neo4j-kernel:jar:tests:1.9.M05: UnresolvableModelException: Failure to find org.neo4j:parent:pom:1.9.M05 in http://m2.neo4j.org/releases was cached in the local repository, resolution will not be reattempted until the update interval of neo4j-release-repository has elapsed or updates are forced
This seems to make sense because the URL "http://m2.neo4j.org/content/repositories/releases/org/neo4j/parent" does not exist. Was anybody able to use 1.9.M05 already? Is there another public repository where I can find this dependency?
ps: does anybody know when the neo4j-cypher-dsl module gets updated to 1.9.M05?
For now, you can bypass this problem by manually placing this parent pom in your local maven repository (or upload it to your companies nexus, or ...).
If the parent has not been deployed, I would suggest you file a bug report with the authors, as this won't work. They'll either have to deploy the parent, of spin off a new release.

Categories

Resources