To resolve org.apache.sling.event.jobs,version=[1.5,2] -- Cannot be resolved error in my bundle I added the dependency in the main pom.xml. But when I try to add the same minus the version and scope in the core xml file I am getting a Failed to collect dependencies error.
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.event</artifactId>
<version>4.2.0</version>
<scope>provided</scope>
</dependency>
Error is as follows:
Failed to collect dependencies at org.apache.sling:org.apache.sling.event:jar:4.2.0: Failed to read artifact descriptor for org.apache.sling:org.apache.sling.event:jar:4.2.0: Could not transfer artifact org.apache.sling:org.apache.sling.event:pom:4.2.0 from/to cqblueprints.releases (http://dev.cqblueprints.com/nexus/content/repositories/releases/): Connection refused: connect -> [Help 1]
[ERROR]
The issue, simply, is that the repo you are using: http://dev.cqblueprints.com/nexus/content/repositories/releases/ does NOT have the artifact you are looking for org.apache.sling.event
take a look at http://dev.cqblueprints.com/nexus/content/repositories/releases/org/apache/sling/ I'd expect to see org.apache.sling.event but I don't.
You'll have to add a different repo that has the artifact, maybe Maven central or the Adobe repo.
see this: https://helpx.adobe.com/experience-manager/kb/SetUpTheAdobeMavenRepository.html
Also, the version you are specifying is 4.2.2 you have to check what version is provided by AEM by going to /system/console/bundles and looking for org.apache.sling.event and use that bundle's version.
Related
I have tried multiple options changing the spring boot starter parent versions updating the
repository URL in the POM file, But still no luck keep on getting the below issue.
Tried adding the repository config in the pom still getting the issue. I have tried deletng the entire m2 repo but no luck its trying to download other tuff but not the plugin.
Error :
plugin org.springframework.boot:spring-boot-maven-plugin:2.1.3.RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.springframework.boot:spring-boot-maven-plugin:jar:2.1.3.RELEASE: Could not transfer artifact org.springframework.boot:spring-boot-maven-plugin:pom:2.1.3.RELEASE from/to central (http://repo.maven.apache.org/maven2): Failed to transfer http://repo.maven.apache.org/maven2/org/springframework/boot/spring-boot-maven-plugin/2.1.3.RELEASE/spring-boot-maven-plugin-2.1.3.RELEASE.pom. Error code 501, HTTPS Required
The url from where your code is trying to fetch the dependency should be an https url
expected url
in your case it is :-
your code URL
You might need to change your artifactory url
Please find the below logs :
[ERROR] Failed to execute goal on project hospital: Could not resolve dependencies for project
com.project_name.test.web:hospital:war:0.0.1-SNAPSHOT: Failed to collect dependencies at
com.example.test:example-child:jar:1.1.12-SNAPSHOT: Failed to read artifact descriptor for
com.example.test:example-child:jar:1.1.12-SNAPSHOT: Could not transfer artifact
com.example.test:example-parent:pom:1.1.12-SNAPSHOT from/to maven-central
(http://central.maven.org/maven2/): central.maven.org: Unknown host central.maven.org -> [Help 1]
Thanks in advance!
This failes likely due to an artifact downloaded earlier (in my case .m2/repository/org/geotools/geotools/19.1/geotools-19.1.pom) containing this as a specific repo, maybe even retrieved from a thirdparty repo.
Check your local artifacts for references to the repository, e.g. by this brute force approach:
grep -nr "central.maven.org" ~/.m2/repository/
Replacing/removing the dependency solved the issue.
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.
I have two modules and one links the other one. When I install the second one the build failed saying me 'Could not find artifact'. Here's poms:
<groupId>xyz.upperlevel.graphicengine</groupId>
<artifactId>graphicengine</artifactId>
<packaging>pom</packaging>
<version>FINAL</version>
<modules>
<module>graphicengine-api</module>
<module>gamelauncher</module>
<module>testgame</module>
</modules>
This is the pom of the main project.
Then here's the pom of one of its modules (are all the equal):
<parent>
<groupId>xyz.upperlevel.graphicengine</groupId>
<artifactId>graphicengine</artifactId>
<version>FINAL</version>
</parent>
<groupId>xyz.upperlevel.graphicengine.testgame</groupId>
<artifactId>testgame</artifactId>
<version>1.0-SNAPSHOT</version>
I have the module A that links to the module B all inside the MAIN project. When I build the module A all goes fine (since it has no dependency from local modules) but when I build the module B it failed. This is the error:
Failed to execute goal on project gamelauncher: Could not resolve dependencies for project xyz.upperlevel.graphicengine.gamelauncher:gamelauncher:jar:1.0-SNAPSHOT: Failed to collect dependencies at xyz.upperlevel.graphicengine.api:graphicengine-api:jar:1.0-SNAPSHOT: Failed to read artifact descriptor for xyz.upperlevel.graphicengine.api:graphicengine-api:jar:1.0-SNAPSHOT: Failure to find xyz.upperlevel.graphicengine:graphicengine:pom:FINAL 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]
How to solve?
Do you use the right coordinates of your artifacts? Maven should have created the repository automatically. See https://maven.apache.org/guides/introduction/introduction-to-repositories.html for more informations on repositories. For a detailed spec for artifacts and dependencies see https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html.
To be able to help you in a better way, please provide some code.
I HAVE SOLVED: I WAS BUILDING FROM MODULES PATH AND INSTEAD OF BUILDING FROM ROOT PROJECT PATH! DON'T FALL IN MY SAME ERROR!
I see the jbox2d Vec2 class in the repository:
http://code.google.com/p/playn/source/browse/gwtbox2d/src/org/jbox2d/common/Vec2.java
How do I make the PlayN port of JBox2D package accessible to my code? I'm using Eclipse but my project does not appear to be aware of the package.
Update:
Following the example here, I've added playn-jbox2d as a dependency in my core/pom.xml file. However, when I load my project I get the following error:
ArtifactDescriptorException: Failed to read artifact descriptor for
com.googlecode.playn:playn-jbox2d:jar:1.1.1:
ArtifactResolutionException: Could not transfer artifact
com.googlecode.playn:playn-jbox2d:pom:1.1.1 from/to central
(http://repo1.maven.org/maven2): Failed to transfer
http://repo1.maven.org/maven2/com/googlecode/playn/playn-jbox2d/1.1.1/playn-jbox2d-1.1.1.pom.
Error code 416, Requested Range Not
Satisfiable pom.xml /myproject-core line 1 Maven Dependency Problem
After a bit of a goose chase, I figured out how to enable this. Following the example here, I manually added playn-jbox2d as a dependency in my core/pom.xml file. Here is what that section of my pom.xml file now looks like:
<dependencies>
<dependency>
<groupId>com.googlecode.playn</groupId>
<artifactId>playn-core</artifactId>
<version>${playn.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.playn</groupId>
<artifactId>playn-jbox2d</artifactId>
<version>${playn.version}</version>
</dependency>
</dependencies>
Then in Eclipse:
Right-click core directory in Package Explorer window > Maven > Update Dependencies
Thanks to all who offered assistance.
You need to add JBox2D library to your workspace. Follow Basic guide for importing and building JBox2D. There are instructions for eclipse as well. Or you can download JBox2D jars and add them to eclipse. Here is a tutorial how to add jars to your workspace.