unable to resolve dependency for akamai edgegrid API - maven

I am trying to use akamai edgegrid API for invalidating akamai chache. I have added below dependency in my pom.xml, but my bundle keeps in installed state. Below are more details-
pom.xml dependency-
<dependency>
<groupId>com.akamai.edgegrid</groupId>
<artifactId>edgegrid-signer-apache-http-client</artifactId>
<version>2.1.0</version>
<scope>provided</scope>
</dependency>
Bundle is in installed state, on felix console it says-
Imported Packages com.akamai.edgegrid.signer -- Cannot be resolved
error.log says -
Unable to resolve 497.82: missing requirement [497.82] osgi.wiring.package; (osgi.wiring.package=com.akamai.edgegrid.signer)

You have used <scope>provided</scope> , it means this jar will be used during compile time and during run time it will use the jar available on the run time environment. Unfortunately edgegrid-signer-apache-http-client-2.1.0.jar is not available on the AEM instance.
To resolve the issue, Do not use <scope>provided</scope> .
Updated POM -
<dependency>
<groupId>com.akamai.edgegrid</groupId>
<artifactId>edgegrid-signer-apache-http-client</artifactId>
<version>2.1.0</version>
</dependency>
Before deploying the bundle on AEM, extract the jar and check edgegrid-signer-apache-http-client.jar , edgegrid-signer-core.jar, httpclient.jar, httpcore.jar should be part of the bundle.
Hopefully it will solve your issue. All the best.
Please let me know if you still face any issue.
-Mrutyunjaya

Related

How to incorporate BIRT 4.9.0 into POM?

Scenario:
I am refactoring my application to work under java 17. Birt runtime 3.7.x is embedded in my application.
In updating to point to birt 4.9.0, I have updated my pom as follows:
<dependency>
<groupId>org.eclipse.birt</groupId>
<artifactId>birt-runtime</artifactId>
<version>4.9.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.eclipse.birt/birt-runtime-osgi -->
<dependency>
<groupId>org.eclipse.birt</groupId>
<artifactId>birt-runtime-osgi</artifactId>
<version>4.9.0</version>
</dependency>
When I build, I get the exception
org.eclipse.birt:birt-runtime:jar:4.9.0 was not found in https://repo1.maven.org/maven2 during a previous attempt
I have deleted and rebuilt my local .m2 directory.
When I dig around the maven repository I find the file at https://repo1.maven.org/maven2/org/eclipse/birt/birt-runtime/4.9.0/
This link (BiRT latest Runtime as one Maven Dependency for Eclipse) was resolved by manually downloading the file and pointing to a local copy. I'd prefer to avoid that, since Maven is all about avoiding that kind of scenario.
I suspect there's something in the maven path I am missing.
Thank you in advance.

maven Failed to collect dependencies for flapdoodle.embed.mongo

I have an issue locally with maven range. Maven failed to collect dependencies for below dependency. But in deed, there is version for 3.4.6 which was downloaded already.
May u have any hints?
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>[3.4.6,3.5.0)</version>
<scope>test</scope>
</dependency>
Check your internet connection also see if you need to configure proxy for your internet
I had similar issue and this fixed it.

Imported Packages : com.day.cq.wcm.api,version=[1.29,2) and org.apache.sling.api.resource,version=[2.12,3) -- Cannot be resolved

I am facing a weird issue after creating the AEM project using the archetype 24 from https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetype/overview.html?lang=en#available-properties
The project build successfully and deployed perfectly and somehow the osgi bundle is not "Active" because of below issue in bold: com.day.cq.wcm.api,version=[1.29,2) -- Cannot be resolved and org.apache.sling.api.resource,version=[2.12,3) -- Cannot be resolved
Imported Packages:
**com.day.cq.wcm.api,version=[1.29,2) -- Cannot be resolved**
**org.apache.sling.api.resource,version=[2.12,3) -- Cannot be resolved**
I have tried to add these dependencies in the parent pom finding in http://localhost:4502/system/console/depfinder
Somehow my efforts failed to resolve this issue, could anyone help me to resolve the issue.
thanks in advance
What you did to "solve" the issue is telling your bundle to accept any version of the packages. This very likely will cause problems later as you might get an incompatible implementation.
Instead what you should do is use the system console bundle view in AEM/sling to find out which versions of the packages are offered by the bundles. Probably the versions are lower than 1.29 and 2.12.
So the correct solution would be to use an older version of the archetype that matches the versions offered by your AEM/sling system.
Please change the language of the website to English and read the article here: https://flagtick.com/post/getting-started-with-aem-sites-setup-project-eduzone-system-part-7
It might help you a little bit.
</executions>
<dependencies>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.caconfig.bnd-plugin</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
</plugin>
I had same problem with archetype 26.
resolved by adding this dependencies inside core/pom.xml
<!-- https://mvnrepository.com/artifact/com.day.cq.wcm/cq-wcm-api -->
<dependency>
<groupId>com.day.cq.wcm</groupId>
<artifactId>cq-wcm-api</artifactId>
<version>5.9.4</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.sling/org.apache.sling.api -->
<dependency>
<artifactId>org.apache.sling.api</artifactId>
<version>2.18.4</version>
<groupId>org.apache.sling</groupId>
<scope>provided</scope>
</dependency>

Vaadin grid-renderers-collection-addon breaks compilation of widgetset

I added grid-renderers-collection-addon to my pom.xml in a maven project:
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>grid-renderers-collection-addon</artifactId>
<version>0.94</version>
</dependency>
Now everything is broken, even if I remove the addon from pom.xml again.
I get the message:
Failed to load the widgetset: ./../../VAADIN/widgetsets/AppWidgetset/AppWidgetset.nocache.js?1519127577157
I really want to use the addon, but I don't even know which is the latest version. I looked at solutions that involved having a ProjectWidgetSet.gwt.xml file, but I don't know where to get this file from.
vaadin.version is 8.1.1 not sure the addon is matching this version
I fixed the error by commenting out an important artifact in pom.xml, launching the service (aborting because of errors), then adding the artifact again.
It was this artifact:
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
</dependency>

Cannot make Axis2 run with OSGi

I want to build a client (just a client) with Axis2. I use Maven and OSGi (Felix). I manage to successfully install it using Maven, however when I run it using PAX provision, there come a bunch of error. This is my initial configuration in the POM (plus some more dependencies of AXIOM and WSDL4j).
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
<version>1.6.2</version>
</dependency>
This builds fine, but when I do pax:provision I get
ERROR: Bundle axis2-transport-local [33] Error starting file:bundles/axis2-transport-local_1.6.2.jar (org.osgi.framework.BundleException: Unresolved constraint in bundle axis2-transport-local [33]: Unable to resolve 33.0: missing requirement [33.0] osgi.wiring.package; (osgi.wiring.package=org.apache.axis2))org.osgi.framework.BundleException: Unresolved constraint in bundle axis2-transport-local [33]: Unable to resolve 33.0: missing requirement [33.0] osgi.wiring.package; (osgi.wiring.package=org.apache.axis2)
Has anyone experienced something good with Axis2, OSGi, and Maven? ;-)
Is this axis2 jar already a osgi bundle? If not you need to create one, or find one already transformed. How about CXF? It's known to be working great with OSGi.
Since your using Pax provisioning you might alos try to use the wrap command for wrapping the axis jar as a osgi bundle.

Resources