Main Content

Magnolia Community Forums: Get help with Magnolia: Gradle dependencies for Magnolia not found


  • razvanv01
    razvanv01
    Full name: Razvan
    Posts: 9
    Last post: Jan 13, 2017 6:22:00 PM
    Registered on: Dec 25, 2016
    Gradle dependencies for Magnolia not found
    #1 by razvanv01 on Dec 25, 2016 10:07:28 AM

    Hi,

    I'm trying to create a new project with Magnolia and the Gradle dependencies are not found.

    Tried this
    https://mvnrepository.com/artifact/info.magnolia.blossom/magnolia-module-blossom

    Gradle build returns
    > Could not find info.magnolia.blossom:magnolia-module-blossom:3.1.3.

    Are there other repositories I can use?

    Best Regards,
    Razvan

  • fgrilli
    fgrilli
    Full name: federico grilli
    Posts: 207
    Last post: Jan 2, 2017 11:57:16 AM
    Registered on: Sep 15, 2010
    Re: Gradle dependencies for Magnolia not found
    #2 by fgrilli on Dec 26, 2016 12:08:44 PM

    Hi Razvan,

    you may try Magnolia Nexus repository https://nexus.magnolia-cms.com/content/repositories/magnolia.public.releases/

    HTH,

    Federico

  • razvanv01
    razvanv01
    Full name: Razvan
    Posts: 9
    Last post: Jan 13, 2017 6:22:00 PM
    Registered on: Dec 25, 2016
    Re: Gradle dependencies for Magnolia not found
    #3 by razvanv01 on Dec 28, 2016 1:38:01 PM

    Thanks, now it goes further and I get

    Could not find com.thoughtworks.proxytoys:proxytoys:1.01-MAGNOLIA-5317-patched.
    Searched in the following locations:
    https://repo1.maven.org/maven2/com/thoughtworks/proxytoys/proxytoys/1.01-MAGNOLIA-5317-patched/proxytoys-1.01-MAGNOLIA-5317-patched.pom
    https://repo1.maven.org/maven2/com/thoughtworks/proxytoys/proxytoys/1.01-MAGNOLIA-5317-patched/proxytoys-1.01-MAGNOLIA-5317-patched.jar
    https://nexus.magnolia-cms.com/content/repositories/magnolia.public.releases/com/thoughtworks/proxytoys/proxytoys/1.01-MAGNOLIA-5317-patched/proxytoys-1.01-MAGNOLIA-5317-patched.pom
    https://nexus.magnolia-cms.com/content/repositories/magnolia.public.releases/com/thoughtworks/proxytoys/proxytoys/1.01-MAGNOLIA-5317-patched/proxytoys-1.01-MAGNOLIA-5317-patched.jar
    http://maven.vaadin.com/vaadin-addons/com/thoughtworks/proxytoys/proxytoys/1.01-MAGNOLIA-5317-patched/proxytoys-1.01-MAGNOLIA-5317-patched.pom
    http://maven.vaadin.com/vaadin-addons/com/thoughtworks/proxytoys/proxytoys/1.01-MAGNOLIA-5317-patched/proxytoys-1.01-MAGNOLIA-5317-patched.jar
    https://mvnrepository.com/artifact/com.thoughtworks.proxytoys/proxytoys/com/thoughtworks/proxytoys/proxytoys/1.01-MAGNOLIA-5317-patched/proxytoys-1.01-MAGNOLIA-5317-patched.pom
    https://mvnrepository.com/artifact/com.thoughtworks.proxytoys/proxytoys/com/thoughtworks/proxytoys/proxytoys/1.01-MAGNOLIA-5317-patched/proxytoys-1.01-MAGNOLIA-5317-patched.jar
    Required by:
    :Test:1.0 > info.magnolia.blossom:magnolia-module-blossom:3.1.3 > info.magnolia.ui:magnolia-ui-framework:5.4 > info.magnolia.core:magnolia-configuration:5.4
    :Test:1.0 > info.magnolia.blossom:magnolia-module-blossom:3.1.3 > info.magnolia.ui:magnolia-ui-framework:5.4 > info.magnolia.ui:magnolia-ui-dialog:5.4 > info.magnolia:magnolia-i18n:5.4
    Could not execute build using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.2.1-bin.zip'.

    Best Regards,
    Razvan

  • mgeljic
    mgeljic
    Full name: Mikaël Geljić
    Posts: 64
    Last post: Dec 29, 2016 12:25:31 PM
    Re: Gradle dependencies for Magnolia not found
    #4 by mgeljic on Dec 28, 2016 2:13:51 PM

    Hi, indeed public releases are not sufficient; we have other repositories for patched artifacts, forge modules etc.
    All public repositories are aggregated under the following group: https://nexus.magnolia-cms.com/content/groups/public/

    Note however that we provide maven settings ready for download; see the following page https://wiki.magnolia-cms.com/display/DEV/Maven+setup
    In particular sub-section "Community Edition (CE) Template":


    To set up Maven with the CE template, simply execute the following command:

    mvn org.sonatype.plugins:nexus-m2settings-maven-plugin:1.6.5:download -DnexusUrl=https://nexus.magnolia-cms.com -Dusername=anonymous -Dpassword=anonymous -DtemplateId=magnolia-community-public

    Maven will download the resources from Nexus and set up the settings file. That's all.


    Cheers,
    Mika

  • razvanv01
    razvanv01
    Full name: Razvan
    Posts: 9
    Last post: Jan 13, 2017 6:22:00 PM
    Registered on: Dec 25, 2016
    Re: Gradle dependencies for Magnolia not found
    #5 by razvanv01 on Dec 29, 2016 10:33:40 AM

    Thank you Mikael but I need to make it work with Gradle. Do you know something equivalent for that? Would be really helpful.

    Best Regards,
    Razvan

  • breun
    breun
    Full name: Nils Breunese
    Posts: 416
    Last post: Feb 24, 2017 2:54:06 PM
    Registered on: Sep 16, 2010
    Re: Gradle dependencies for Magnolia not found
    #6 by breun on Dec 29, 2016 11:18:27 AM

    You could run that Maven command and look at the repository configuration in the resulting pom.xml and adapt that for use with Gradle.

  • mgeljic
    mgeljic
    Full name: Mikaël Geljić
    Posts: 64
    Last post: Dec 29, 2016 12:25:31 PM
    Re: Gradle dependencies for Magnolia not found
    #7 by mgeljic on Dec 29, 2016 12:25:31 PM

    Hmm, I was assuming you had mavenLocal() declared under repositories—which should be using maven settings; though I'm not 100% sure how far that support goes (we typically have that mirror set up).

    Nonetheless, I agree we probably want to provide a more Gradle-ish solution and describe it in the wiki. That would make sense.
    Do tell us if you successfully convert those settings to the Gradle world too, I might give it a shot as well :)

    Cheers,
    Mika

  • razvanv01
    razvanv01
    Full name: Razvan
    Posts: 9
    Last post: Jan 13, 2017 6:22:00 PM
    Registered on: Dec 25, 2016
    Re: Gradle dependencies for Magnolia not found
    #8 by razvanv01 on Dec 30, 2016 12:50:38 PM

    Hi everyone,

    Finally managed to make it work w gradle. Below relevant snippet from the build file:

    repositories {
    mavenCentral()

    maven{
    url "https://nexus.magnolia-cms.com/content/repositories/magnolia.public.releases/"
    }

    maven{
    url "http://maven.vaadin.com/vaadin-addons"
    }

    maven{
    url "https://nexus.magnolia-cms.com/content/groups/public/"
    }

    }

    dependencies {
    compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
    compile group: 'info.magnolia', name: 'magnolia-core', version: '5.5'
    compile group: 'info.magnolia.blossom', name: 'magnolia-module-blossom', version: '3.1.3'
    testCompile group: 'junit', name: 'junit', version: '4.+'
    }

    2 questions I still have for you:

    1) Couldn't find the above vaadin addon on the magnolia cms. Could you provide a link to it? I used a different repository to make it work.
    2) I got a recommendation to document these findings as you can see here (bottom of page). Is it okay for you if I do this? (Would you mind reviewing it once it's finished?)

    Thank you all!

    Best Regards,
    Razvan

  • breun
    breun
    Full name: Nils Breunese
    Posts: 416
    Last post: Feb 24, 2017 2:54:06 PM
    Registered on: Sep 16, 2010
    Re: Gradle dependencies for Magnolia not found
    #9 by breun on Dec 30, 2016 1:57:31 PM

    I believe the public repository group at https://nexus.magnolia-cms.com/content/groups/public/ contains everything from the magnolia.public.releases repository (and more), so I don't believe there is any benefit to specifying that repository separately.

    It seems vaadin addon is also included in the public repository group (it's from the thirdparty repository): https://nexus.magnolia-cms.com/content/groups/public/com/vaadin/

    That public repository group *should* contain everything for the Magnolia Community Edition AFAIK. (There's also a separate group for enterprise users, which requires authentication.)

  • razvanv01
    razvanv01
    Full name: Razvan
    Posts: 9
    Last post: Jan 13, 2017 6:22:00 PM
    Registered on: Dec 25, 2016
    Re: Gradle dependencies for Magnolia not found
    #10 by razvanv01 on Dec 30, 2016 6:53:08 PM

    Hi,

    The issue is if I replace the external repository with the links you provided it doesn't find the addon.
    I uploaded the project in case you want to try it out. http://www.file-upload.net/download-12207417/MagnoliaTestProject.tar.gz.html


    Best Regards,
    Razvan

You don't have the permission to post on this thread

Sign in

To login on this forum, you can use your Magnolia Forge, Support or Partner account, or, below, your Google, Yahoo! or OpenID account. If you have trouble logging in, or any other sort of issue, please let us know in the Meta forum, on the user-list, or simply by email at forum-admin at magnolia-cms dot com.

* Required

... or sign in with:

  • icon http://{your-openid-url}
  • icon
  • icon https://me.yahoo.com/