Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with aemanalyser-maven-plugin Artifact Resolution With AEM as cloud services and Azure #305

Open
v-fnuab opened this issue Sep 11, 2024 · 1 comment

Comments

@v-fnuab
Copy link

v-fnuab commented Sep 11, 2024

I am facing an issue with the aemanalyser-maven-plugin artifact. According to our security team, we need to use the central repository ID. However, during the build process, we receive the following error:

Failed to execute goal com.adobe.aem:aemanalyser-maven-plugin:1.5.8:project-analyse (aem-analyser) on project aem-quantumhub-project.all: Failed to resolve version for com.adobe.aem:aem-sdk-api:jar:RELEASE: Could not find metadata com.adobe.aem:aem-sdk-api/maven-metadata.xml in local (/root/.m2/repository) -> [Help 1]

Platform and Version

AEM as cloud service and Azure

Sample Code that illustrates the problem

Example POM Structure:

<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>example-project</artifactId>
    <version>1.0-SNAPSHOT</version>

    <build>
        <plugins>
            <plugin>
                <groupId>com.adobe.aem</groupId>
                <artifactId>aemanalyser-maven-plugin</artifactId>
                <version>1.6.0</version> <!-- Make sure to use the latest release -->
                <extensions>true</extensions>
                <repositories>
                    <repository>
                        **<id>central</id>**
                        <url>https://my-company-maven-pkg</url>
                    </repository>
                </repositories>
            </plugin>
        </plugins>
    </build>
</project>

The build fails to resolve the version for com.adobe.aem:aem-sdk-api due to missing metadata in the local repository.
We need assistance in resolving this issue. Specifically, we are looking to understand if there is any restriction on using the central repository ID for this plugin. If I am using any other ID then build is working fine.

Seems AEM Analyser Maven Plugin is open-source and not part of the official AEM product. Can someone provide guidance on how to address this issue or suggest any alternatives?

@kwin
Copy link
Contributor

kwin commented Sep 12, 2024

central is a reserved id (https://maven.apache.org/ref/3.9.9/maven-model-builder/super-pom.html) and should be used only for Maven Central. Overriding is basically similar to mirroring and in your case obviously not intended as https://my-company-maven-pkg doesn't seem to be a fully compliant Maven repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants