Skip to content

swingset pom restricts usage in gradle projects #163

@errael

Description

@errael

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions