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

ui-selenium-webdriver: The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom' #89

Open
kwin opened this issue Feb 20, 2024 · 5 comments

Comments

@kwin
Copy link

kwin commented Feb 20, 2024

When executing the first step from https://github.com/adobe/aem-test-samples/blob/aem-cloud/ui-selenium-webdriver/README.md#all-in-one with Maven 3.9.6 you run into the following error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:3.1.1:install (default-install) on project com.adobe.cq.cloud.testing.ui.java.ui.tests: The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom'. -> [Help 1]

This is a new error in introduced with maven-install-plugin 3.0 (https://issues.apache.org/jira/browse/MINSTALL-118). The fix is to convert the packaging to pom.

In addition it is probably never useful to deploy anything for this project to a Maven repository therefore it would be useful to disable it with

<build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-install-plugin</artifactId>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
.....
@kwin kwin changed the title The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom' ui-selenium-webdriver: The packaging plugin for this project did not assign a main file to the project but it has attachments. Change packaging to 'pom' Feb 20, 2024
@bisswanger
Copy link
Contributor

@kwin , thanks, I can replicate that locally.
From the README, rather a mvn package might be better than the current mvn install.

I will have a check when I have time to adjust it

@kwin
Copy link
Author

kwin commented Feb 21, 2024

For me the packaging with maven-assembly-plugin as tar.gz is unclear (

<groupId>org.apache.maven.plugins</groupId>
) as that artifact is neither used at all for the docker build/execution nor for the standalone execution. Can you explain, why this is generated at all?

@bisswanger
Copy link
Contributor

@kwin: this is needed to build the actual UI test image within the Cloud Service Pipeline.
So this is indeed needed by Cloud Manager as else the tests won't be run.

Details are in the UI testing documentation: https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/implementing/using-cloud-manager/test-results/functional-testing/ui-testing.html?lang=en#generate-docker-build-context

@kwin
Copy link
Author

kwin commented Feb 21, 2024

I would strongly suggest then to put something which is only necessary for Cloud Manager in a dedicated profile only activated on Cloud Manager then. Otherwise every local build takes longer than necessary (due to building this unused archive).

@bisswanger
Copy link
Contributor

Addressed in #92

I went the "easy" way and used allowIncompleteProjects for now.
This would still build the archive locally, though I removed an unnecessary dependency.
With that, the local build for that module takes less than 1 second, so shall not impact the overall build time much

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