gradle-jaxb-plugin icon indicating copy to clipboard operation
gradle-jaxb-plugin copied to clipboard

Version 1.3.6 not in plugin repository

Open MichaelKunze opened this issue 9 years ago • 12 comments

If i use the recomended method to include the plugin in my build script i get the following error:

Error:(5, 0) Plugin [id: 'com.github.jacobono.jaxb', version: '1.3.6'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Gradle Central Plugin Repository (plugin 'com.github.jacobono.jaxb' has no version '1.3.6' - see https://plugins.gradle.org/plugin/com.github.jacobono.jaxb for available versions)

https://plugins.gradle.org/plugin/com.github.jacobono.jaxb 1.3.5 seems to be the latest there.

MichaelKunze avatar Dec 28 '15 16:12 MichaelKunze

try running the examples folder in this project. It uses the 1.3.6 version. I ran that on a new machine a few weeks ago and didn't have any problems. hopefully that works and if not we can go from there.

scubacabra avatar Dec 28 '15 16:12 scubacabra

Examples use the buildscript notation. I'm talking this one:

plugins {
    id 'com.github.jacobono.jaxb' version '1.3.6'
}

MichaelKunze avatar Dec 28 '15 17:12 MichaelKunze

ah i see.

Everything is linked in bintray properly. Both jcenter and the gradle plugins portal show that 1.3.6 is linked.

https://bintray.com/gradle/gradle-plugins?filterByPkgName=gradle-jaxb-plugin

after some correspondence with the gradle guys during the 1.3.5 version change I was told nothing has to happen on version changes because

The plugin portal is more or less stateless. that's why the metadata is reparsed regulary. I guess they should just show up with the new meta data provided.

this all worked for 1.3.5 pretty seamlessly so perhaps someone on their team can be of assistance?

scubacabra avatar Dec 28 '15 17:12 scubacabra

If i compare both versions on bintray the "gradle-plugin"-property? is missing in 1.3.6. See screenshot:

image

MichaelKunze avatar Dec 28 '15 19:12 MichaelKunze

See for yourself:

https://bintray.com/djmijares/gradle-plugins/gradle-jaxb-plugin/1.3.5/view https://bintray.com/djmijares/gradle-plugins/gradle-jaxb-plugin/1.3.6/view

MichaelKunze avatar Dec 28 '15 19:12 MichaelKunze

I have the same problem here. I can't use version 1.3.6 and I get the same error as @MichaelKunze.

MateuszRasinski avatar Jan 28 '16 12:01 MateuszRasinski

Same problem here. 1.3.5 works, 1.3.6 is not found.

Error:

   > Could not find com.github.jacobono.plugins:gradle-jaxb-plugin:1.3.6.
     Searched in the following locations:
         https://repo.grails.org/grails/core/com/github/jacobono/plugins/gradle-jaxb-plugin/1.3.6/gradle-jaxb-plugin-1.3.6.pom
         https://repo.grails.org/grails/core/com/github/jacobono/plugins/gradle-jaxb-plugin/1.3.6/gradle-jaxb-plugin-1.3.6.jar
         https://jcenter.bintray.com/com/github/jacobono/plugins/gradle-jaxb-plugin/1.3.6/gradle-jaxb-plugin-1.3.6.pom
         https://jcenter.bintray.com/com/github/jacobono/plugins/gradle-jaxb-plugin/1.3.6/gradle-jaxb-plugin-1.3.6.jar
         file:/Users/me/.m2/repository/com/github/jacobono/plugins/gradle-jaxb-plugin/1.3.6/gradle-jaxb-plugin-1.3.6.pom
         file:/Users/me/.m2/repository/com/github/jacobono/plugins/gradle-jaxb-plugin/1.3.6/gradle-jaxb-plugin-1.3.6.jar
         https://plugins.gradle.org/m2/com/github/jacobono/plugins/gradle-jaxb-plugin/1.3.6/gradle-jaxb-plugin-1.3.6.pom
         https://plugins.gradle.org/m2/com/github/jacobono/plugins/gradle-jaxb-plugin/1.3.6/gradle-jaxb-plugin-1.3.6.jar

robertoschwald avatar Feb 03 '16 11:02 robertoschwald

When you specify the script block for the plugin in your build, you can use the JCenter approach to use version 1.3.6 like this:

buildscript {
  repositories {
    jcenter()
    mavenCentral()
  }
  dependencies {
    classpath 'com.github.jacobono:gradle-jaxb-plugin:1.3.6'
  }
}

If you are happy with version 1.3.5 then use the gradle plugin like this instead:

plugins {
    id 'com.github.jacobono.jaxb' version '1.3.5'
}

Both approaches work fine for me, although I agree it would be nice if the plugin would work with release 1.3.6

warrengsmith avatar Feb 05 '16 00:02 warrengsmith

If I follow your 1.3.6 approach I get the error message: Could not find method jaxb() for arguments [com.sun.xml.bind:jaxb-core:2.2.11] on root project Do I miss something?`

MichaelT64 avatar Feb 05 '16 08:02 MichaelT64

If you are are trying to use JAXB 2.2.11, you might want to try different JARs (I know it took me a while to figure this out myself):

// Define JAXB2 dependencies
dependencies {
    /*
     * IMPORTANT:
     * You have to select the correct dependency group depending on your version of JAXB
     * The three dependencies I commented out below will work for all RI versions of JAXB up to 2.2.8
     * 
     * If you see java.lang.NoClassDefFoundError: com/sun/xml/bind/api/ErrorListener
         * when running the build then use the dependencies for 2.2.10 and higher.
     */ 
//   jaxb 'com.sun.xml.bind:jaxb-xjc:2.2.4'
//   jaxb 'com.sun.xml.bind:jaxb-impl:2.2.4'
//   jaxb 'javax.xml.bind:jaxb-api:2.2.4'

    /*  
     * The two dependencies below work for RI versions of JAXB after 2.2.8
     */
    jaxb 'org.glassfish.jaxb:jaxb-xjc:2.2.11'
    jaxb 'org.glassfish.jaxb:jaxb-runtime:2.2.11'
}

A full working example is on my Github repo https://github.com/warrengsmith/Blog-Examples/tree/master/JAXB_Gradle_Jacobono_XJC which uses 2.2.10

warrengsmith avatar Feb 08 '16 16:02 warrengsmith

(thanks @warrengsmith that was just what I needed)

michaelsproul avatar Mar 15 '16 03:03 michaelsproul

The OpenRepose.org updated version of this plugin is now available in the Gradle Plugins repository and is compatible with JSE7.

wdschei avatar Sep 09 '16 19:09 wdschei