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

Build script: restlet not found #337

Closed
gallardo opened this issue Aug 24, 2015 · 3 comments
Closed

Build script: restlet not found #337

gallardo opened this issue Aug 24, 2015 · 3 comments

Comments

@gallardo
Copy link
Contributor

For the record:

The configurations default, gwtRuntime, modulesRuntime, runtime, setupRuntime are (implicitly) declared as transitive. All of them declare the dependency org.apache.solr:solr-core:4.3.0. This depends on org.restlet.jee:org.restlet:2.1.1 and org.apache.solr:solr-parent:4.3.0, and this last one in turn declares in its pom the "Public online Restlet repository" http://maven.restlet.org.

But Gradle doesn't honor repositories declared in POMs, so gradle -q dependencies warns about failing to fetch org.restlet.jee:org.restlet:2.1.1

I'm not sure how relevant all of this is, as it seems I still can compile and build a working webapp, but my IDE complains and throws and exception upon opening the project.

@gallardo
Copy link
Contributor Author

This could be fixed in build.gradle by adding the missing repository:

repositories {
    mavenLocal()
    if (project.hasProperty('additional_repositories')){
        additional_repositories.split(';').each{ repo ->
            maven { url repo }
        }
    }
    mavenCentral()

    // Workaround for org.netbeans.gradle.model.util.TransferableExceptionWrapper:
    // org.gradle.internal.resolve.ModuleVersionNotFoundException: 
    // Could not find org.restlet.jee:org.restlet:2.1.1.
    maven {
        url "http://maven.restlet.org/" 
    }
}

or by declaring these configurations as non-transitive (for example, I will declare all configurations as non-transitive):

configurations.each {
    it.transitive = false;
}

I'm not filing a PR because I'm not sure that this doesn't have collateral unwanted effects. I'm testing it and will report if nothing breaks.

@gallardo
Copy link
Contributor Author

gallardo commented Sep 1, 2015

I think that it suffices that solr-core is declared in dependencies.gradle as distribution dependency.

Apparently, the distributables will be built using this dependency, so we can safely ignore all *Runtime configurations. As for the default configuration, it is only relevant for gradle projects depending on this gradle build. If this were a problem, it should be reported.

@tHerrmann
Copy link

This has not been an issue with our IDE (Eclipse) and all gradle task required to build any OpenCms artefacts work without any problems. So in my view, the gradle integration of your IDE is at fault here.

Having said that, in branch 10.0.x we have added restlet as a direct dependency to OpenCms and also added the additional repository to the build script. So this issue will be resolved for the upcoming releases.

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