Oliver Oliver - 4 months ago 26
Java Question

Can't download CQ DAM API JAR from Maven Repository?

I used to work with CRXDE Eclipse now I am migrating the project to Maven. I made a list of all dependencies. And put them in the bundle/pom.xml. One of them being

<dependency>
<groupId>com.day.cq.dam</groupId>
<artifactId>cq-dam-api</artifactId>
<version>5.5.0</version>
</dependency>


And I also added repository information in the Parent POM.xml

<repository>
<id>adobe-releases</id>
<url>https://repo.adobe.com/nexus/content/groups/public/</url>
</repository>


As Mentioned Here

All other jars are downloaded except this jar.
This is the error when I try to install

[ERROR] Failed to execute goal on project hrportal-bundle: Could not resolve dep
endencies for project hrporatal:hrportal-bundle:bundle:1.1.0-SNAPSHOT: Failed to
collect dependencies at com.day.cq.dam:cq-dam-api:jar:5.5.0: Failed to read art
ifact descriptor for com.day.cq.dam:cq-dam-api:jar:5.5.0: Could not transfer art
ifact com.day.cq.dam:cq-dam-api:pom:5.5.0 from/to adobe (http://repo.adobe.com/n
exus/content/groups/public): java.lang.RuntimeException: Could not generate DH k
eypair: Prime size must be multiple of 64, and can only range from 512 to 1024 (
inclusive) -> [Help 1]


When I checked the .m2 folder I couldn't see the downloaded JAR, I just see one file that has the following written inside it.

#NOTE: This is an Aether internal implementation file, its format can be changed without prior notice.
#Mon Jan 05 15:19:27 IST 2015
http\://repo.maven.apache.org/maven2/.lastUpdated=1420449912904
https\://code.lds.org/nexus/content/groups/main-repo/.error=
@default-https\://repo.adobe.com/nexus/content/groups/public/.lastUpdated=1420451367149
http\://repo.maven.apache.org/maven2/.error=
https\://code.lds.org/nexus/content/groups/main-repo/.lastUpdated=1420449911681
@default-http\://repo.adobe.com/nexus/content/groups/public/.lastUpdated=1420451366718
https\://repo.adobe.com/nexus/content/groups/public/.error=Could not transfer artifact com.day.cq.dam\:cq-dam-api\:pom\:5.5.0 from/to adobe-releases (https\://repo.adobe.com/nexus/content/groups/public/)\: java.lang.RuntimeException\: Could not generate DH keypair
http\://repo.adobe.com/nexus/content/groups/public/.error=Could not transfer artifact com.day.cq.dam\:cq-dam-api\:pom\:5.5.0 from/to adobe (http\://repo.adobe.com/nexus/content/groups/public)\: java.lang.RuntimeException\: Could not generate DH keypair


Please help me I am new to Maven. And what is Scope provided In Maven ?

Answer

I am still not able to download the jar. I found a work around.

I downloaded the JAR Manually and installed it in Maven using following command.

mvn install:install-file -DgroupId=com.day.cq.dam -DartifactId=cq-dam-api -Dversion=5.5.0 -Dpackaging=jar -Dfile=C:\Users\okaunds\Desktop\cq-dam-api-5.5.0.jar

And then I ran my install command for CQ project. And it worked.

Any inputs on why it isn't downloading from the repository are welcome.

Comments