Skip to content

Fix Maven issue #14

@BenRomberg

Description

@BenRomberg

jrestless sounds really promising. Unfortunately it's not straightforward to get it running with Maven.

With the following pom.xml:

    <dependencies>
        <dependency>
            <groupId>com.jrestless.aws</groupId>
            <artifactId>jrestless-aws-gateway-handler</artifactId>
            <version>0.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-json-jackson</artifactId>
            <version>2.23</version>
        </dependency>
    </dependencies>
    
    <repositories>
        <repository>
            <id>jcenter</id>
            <url>http://jcenter.bintray.com</url>
        </repository>
    </repositories>

The build results in [ERROR] Failed to execute goal on project ***: Could not resolve dependencies for project ***: Could not find artifact org.glassfish.jersey.containers:project:jar:2.23 in jcenter (http://jcenter.bintray.com) -> [Help 1].

The problem is that org.glassfish.jersey.containers:project is being referenced within com.jrestless.core:jrestless-core-container as a dependency. Maven then thinks this is a dependency of type jar, where in fact it is of type pom. When trying to download the corresponding jar file, it gets a 404 from both jcenter and Maven Central and throws the error above.

The following workaround fixes the issue:

    <dependencies>
        <dependency>
            <groupId>com.jrestless.aws</groupId>
            <artifactId>jrestless-aws-gateway-handler</artifactId>
            <version>0.3.0</version>
            <exclusions>
                <exclusion>
                    <groupId>org.glassfish.jersey.containers</groupId>
                    <artifactId>project</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-server</artifactId>
            <version>2.23</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.media</groupId>
            <artifactId>jersey-media-json-jackson</artifactId>
            <version>2.23</version>
        </dependency>
    </dependencies>

It would be great if you could fix the dependencies to use jersey-server directly instead of relying on the project parent POM, so that the workaround is no longer needed in future versions. Thanks!

Metadata

Metadata

Assignees

Labels

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions