scubacabra / gradle-jaxb-plugin

Gradle plugin to ease projects that use xsds and the ant jaxb task
GNU General Public License v2.0
49 stars 44 forks source link

Version 1.3.6 not in plugin repository #45

Open MichaelKunze opened 8 years ago

MichaelKunze commented 8 years ago

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.

scubacabra commented 8 years ago

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.

MichaelKunze commented 8 years ago

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

plugins {
    id 'com.github.jacobono.jaxb' version '1.3.6'
}
scubacabra commented 8 years ago

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?

MichaelKunze commented 8 years ago

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

image

MichaelKunze commented 8 years ago

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

MateuszRasinski commented 8 years ago

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

robertoschwald commented 8 years ago

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
warrengsmith commented 8 years ago

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

MichaelT64 commented 8 years ago

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?`

warrengsmith commented 8 years ago

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

michaelsproul commented 8 years ago

(thanks @warrengsmith that was just what I needed)

wdschei commented 8 years ago

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