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

Update grails-app/conf/BuildConfig.groovy to declare dependencies #6

Merged
merged 1 commit into from Jan 13, 2012

Conversation

rbramley
Copy link
Contributor

Patch for issue 4 (also need to remove the 6 jar files from lib).

Have tried this locally on a clone of the repo, compiled, packaged the plugin and then installed into an application and smoke tested it.

limcheekin added a commit that referenced this pull request Jan 13, 2012
Update grails-app/conf/BuildConfig.groovy to declare dependencies
@limcheekin limcheekin merged commit 4bd8f54 into limcheekin:master Jan 13, 2012
@limcheekin
Copy link
Owner

Great! I will release it in 0.5.2.

@limcheekin
Copy link
Owner

I face this error when I run the package-plugin, any idea how to solve it:

| Downloading: commons-pool-1.4.jar.sha1
:: problems summary ::
:::: WARNINGS
problem while downloading module descriptor: http://repo1.maven.org/maven2/com/google/guava/guava-parent/r03/guava-parent-r03.pom: invalid sha1: expected=3853400652152af4ec2973cd5eb355fb311d477d computed=79354ca8e73923f79529ec475e4803e605b168e7 (1004ms)
io problem while parsing ivy file: http://repo.grails.org/grails/core/com/google/guava/guava/r03/guava-r03.pom: Impossible to load parent for file:/root/.grails/ivy-cache/com.google.guava/guava/ivy-r03.xml.original. Parent=com.google.guava#guava-parent;r03
problem while downloading module descriptor: http://repo1.maven.org/maven2/com/google/guava/guava/r03/guava-r03.pom: invalid sha1: expected=1cbd6fab2460050ff7147b6d8536f39c8f535067 computed=7a37041386ee39a1fbb3efd3c4c6932809cb5887 (1503ms)
module not found: com.google.guava#guava;r03
==== grailsPlugins: tried
-- artifact com.google.guava#guava-parent;r03!guava-parent.jar:
/opt/dev/ws/mahout/mahout-recommender/lib/guava-parent-r03.jar
==== grailsHome: tried
/opt/dev/lib/grails/2.0.0/lib/com.google.guava/guava-parent/ivy-r03.xml
-- artifact com.google.guava#guava-parent;r03!guava-parent.jar:
/opt/dev/lib/grails/2.0.0/lib/com.google.guava/guava-parent/jars/guava-parent-r03.jar
/opt/dev/lib/grails/2.0.0/lib/com.google.guava/guava-parent/bundles/guava-parent-r03.jar
==== grailsHome: tried
/opt/dev/lib/grails/2.0.0/src/libs/guava-parent-r03.xml
-- artifact com.google.guava#guava-parent;r03!guava-parent.jar:
/opt/dev/lib/grails/2.0.0/src/libs/guava-parent-r03.jar
==== grailsHome: tried
/opt/dev/lib/grails/2.0.0/dist/guava-parent-r03.xml
-- artifact com.google.guava#guava-parent;r03!guava-parent.jar:
/opt/dev/lib/grails/2.0.0/dist/guava-parent-r03.jar
==== grailsHome: tried
/root/.grails/2.0.0/cached-installed-plugins/guava-parent-r03.xml
-- artifact com.google.guava#guava-parent;r03!guava-parent.jar:
/root/.grails/2.0.0/cached-installed-plugins/guava-parent-r03.jar
==== grailsHome: tried
-- artifact com.google.guava#guava-parent;r03!guava-parent.jar:
/opt/dev/lib/grails/2.0.0/plugins/guava-parent-r03.jar
==== grailsCentral: tried
http://plugins.grails.org/grails-guava-parent/tags/RELEASE_r03/guava-parent-r03.pom
-- artifact com.google.guava#guava-parent;r03!guava-parent.jar:
http://plugins.grails.org/grails-guava-parent/tags/RELEASE_r03/grails-guava-parent-r03.jar
==== http://repo.grails.org/grails/plugins: tried
http://repo.grails.org/grails/plugins/com/google/guava/guava-parent/r03/guava-parent-r03.pom
-- artifact com.google.guava#guava-parent;r03!guava-parent.jar:
http://repo.grails.org/grails/plugins/com/google/guava/guava-parent/r03/guava-parent-r03.jar
==== http://repo.grails.org/grails/core: tried
http://repo.grails.org/grails/core/com/google/guava/guava-parent/r03/guava-parent-r03.pom
-- artifact com.google.guava#guava-parent;r03!guava-parent.jar:
http://repo.grails.org/grails/core/com/google/guava/guava-parent/r03/guava-parent-r03.jar
==== grailsCore: tried
http://svn.codehaus.org/grails/trunk/grails-plugins/grails-guava/tags/RELEASE_r03/guava-r03.pom
-- artifact com.google.guava#guava;r03!guava.jar:
http://svn.codehaus.org/grails/trunk/grails-plugins/grails-guava/tags/RELEASE_r03/grails-guava-r03.jar
==== mavenCentral: tried
http://repo1.maven.org/maven2/com/google/guava/guava/r03/guava-r03.pom
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: com.google.guava#guava;r03: not found
::::::::::::::::::::::::::::::::::::::::::::::

| Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

  • com.google.guava:guava:r03

@limcheekin
Copy link
Owner

The error happened after I pull your changes to my local repo, also I remove the relevant jar files in lib directory

@rbramley
Copy link
Contributor Author

I saw that once before I'd uncommented mavenCentral() in the plugin BuildConfig.groovy (my application that uses the plugin already has mavenCentral() in the repositories section).

Note that http://repo1.maven.org/maven2/com/google/guava/guava/r03/guava-r03.pom does actually exist

@limcheekin
Copy link
Owner

hm... I will try to look for solution. It is blocking issue on my side at the moment. Please let's me know if you have any idea how to fix it.

Thanks.

@rbramley
Copy link
Contributor Author

Just spotted that you were getting a SHA digest mis-match - what happens if you clear out that portion of the Grails ivy cache, do a clean and then try again?

What does the grail dependency-report show?

@limcheekin
Copy link
Owner

I did remove the ivy-cache and 2.0.0 directory in .grails directory and
grails clean and try the grails package-plugin again, the result still the
same, similar error happened.

Please see the dependency report screen at
http://grails-activiti-plugin.googlecode.com/files/Ivy-report.png

Cheers,
Chee Kin

On Fri, Jan 13, 2012 at 6:09 PM, Robin Bramley <
reply@reply.github.com

wrote:

Just spotted that you were getting a SHA digest mis-match - what happens
if you clear out that portion of the Grails ivy cache, do a clean and then
try again?

What does the grail dependency-report show?


Reply to this email directly or view it on GitHub:

#6 (comment)

@rbramley
Copy link
Contributor Author

Just spotted from running the dependency report that it should also exclude slf4j-api (which gets evicted).

My report for guava r03 has:
Status release
Publication 20120113000403
Resolver cache
Configurations default, master(), compile(), runtime(*)
Artifacts size 828 kB (0 kB downloaded, 828 kB in cache)

But the guava-parent that was causing your issue isn't included in my ivy report - maybe transitive dependencies of guava should be disabled?

If that doesn't work, could always leave guava in lib for the meantime unless someone on the mailing list has some better ideas...

@rbramley
Copy link
Contributor Author

Rather than replicating the libs that were included, I've simplified the dependencies to:

        compile ('org.apache.mahout:mahout-utils:0.5',
                 'org.apache.mahout:mahout-core:0.5') {
            excludes "slf4j-jcl", "slf4j-api"
        }
        runtime  ('org.apache.mahout:mahout-utils:0.5',
                  'org.apache.mahout:mahout-core:0.5') {
            excludes "slf4j-jcl", "slf4j-api"
        }

This also works in my test app...

@limcheekin
Copy link
Owner

Great! I will try it out tomorrow morning. It is 1:10am on my side now.

@Markitox
Copy link

I had to exclude the guava dependency in my BuildConfig

plugins {
  runtime ("org.grails.plugins:mahout-recommender:0.5.2"){
    exclude "guava"
  }
}

My dependency report it's similar to the @limcheekin

It's necessary the dependency?

@limcheekin
Copy link
Owner

you can try to test out all the commands especially recommender at http://limcheekin.github.com/mahout-recommender/docs/manual/ref/Command%20Line/recommender.html

If everything work fine, you should on the go.

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

Successfully merging this pull request may close these issues.

None yet

3 participants