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

swingset pom restricts usage in gradle projects #163

Open
errael opened this issue Feb 9, 2023 · 0 comments
Open

swingset pom restricts usage in gradle projects #163

errael opened this issue Feb 9, 2023 · 0 comments

Comments

@errael
Copy link
Contributor

errael commented Feb 9, 2023

After some online investigatinon, the problem seems to be that maven-surefire-plugin should only have <scope>test</scope>

Following copied from an email thread


I'm experimenting, and I tried including swingset in a project that uses gradle to build, it looked like

dependencies {
    implementation 'com.nqadmin.swingset:swingset:4.0.10'
    implementation 'play.m2g:m2g-maven-lib:1.0-SNAPSHOT'
}

When I built the gradle project I got

cd /junk/play/m2g+ant/gradle-lib-project; ./gradlew --configure-on-demand -x check build
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find org.sonatype.sisu:sisu-guice:3.1.0.
     Searched in the following locations:
       - [file:/junk/Caches/maven_repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0.pom](file:///junk/Caches/maven_repository/org/sonatype/sisu/sisu-guice/3.1.0/sisu-guice-3.1.0.pom)
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project : > com.nqadmin.swingset:swingset:4.0.10 > org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M6 > org.apache.maven.surefire:maven-surefire-common:3.0.0-M6 > org.apache.maven.shared:maven-common-artifact-filters:3.1.1 > org.apache.maven:maven-core:3.1.0 > org.eclipse.sisu:org.eclipse.sisu.plexus:0.0.0.M2a

I modified 4.0.10's pom, by adding a provided scope, built it, then the gradle build worked.

        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>${version.maven-surefire-plugin}</version>
            <scope>provided</scope>
        </dependency>

I'm not sure provided is right, but for my testing it's ok.

Just letting you know there's an issue brewing, before I forget.

-ernie

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

1 participant