TrigonicSolutions / gradle-rpm-plugin

Gradle plugin for constructing RPM packages.
Apache License 2.0
38 stars 19 forks source link

Plugin broken on Gradle 1.8: NoClassDefFoundError: org.gradle.api.internal.file.copy.CopySpecImpl #50

Open david-resnick opened 10 years ago

david-resnick commented 10 years ago

Checked with gradle-1.8-rc-1.

This is the stack trace:

Caused by: java.lang.NoClassDefFoundError: org.gradle.api.internal.file.copy.CopySpecImpl
        at com.trigonic.gradle.plugins.rpm.RpmPlugin.class$(RpmPlugin.groovy)
        at com.trigonic.gradle.plugins.rpm.RpmPlugin.$get$$class$org$gradle$api$internal$file$copy$CopySpecImpl(RpmPlugin.groovy)
        at com.trigonic.gradle.plugins.rpm.RpmPlugin.apply(RpmPlugin.groovy:34)
        at com.trigonic.gradle.plugins.rpm.RpmPlugin.apply(RpmPlugin.groovy)
        at org.gradle.api.internal.plugins.DefaultPluginContainer.providePlugin(DefaultPluginContainer.java:104)
        at org.gradle.api.internal.plugins.DefaultPluginContainer.addPluginInternal(DefaultPluginContainer.java:68)
        at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:34)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction.java:101)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.java:32)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:72)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:114)
        at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:39)
        at org.gradle.api.Project$apply.call(Unknown Source)
        at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
        at org.gradle.api.Script$apply.callCurrent(Unknown Source)
merscwog commented 10 years ago

Same failure (as expected) with gradle-1.8-rc-2.

This looks like it might be as simple as replacing org.gradle.api.internal.file.copy.CopySpecImpl with org.gradle.api.internal.file.copy.DefaultCopySpec.

This unfortunately, means an updated plugin will only work with Gradle 1.8 and above.

-Spencer

merscwog commented 10 years ago

Definitely more work to be done than my naive suggestion. There is no direct replacement for EmptyCopySpecVisitor that I can see.

I may see if I can refactor the functionality using just public interfaces and classes, aside from abusing DefaultCopySpec to create the additional meta fields.

-Spencer

quidryan commented 10 years ago

Work to support 1.8 was done as part of pull request #51

camechis commented 10 years ago

Any idea when this will be fixed?

quidryan commented 10 years ago

I have a working copy on my branch, https://github.com/quidryan/gradle-rpm-plugin/tree/add-debian-support-with-1.8

It's a pull request waiting to be tested, so any help you can give in testing would be helpful.

mushkoor commented 10 years ago

Now gradle 1.10 is available. Do you have any plan to work on compatibility of this plugin with latest version of gradle?

camechis commented 10 years ago

You could use the one from netfix which works on 1.10. Os-package-plugin. It is a fork so hardly any changes required to use it. On Jan 9, 2014 3:36 AM, "mushkoor" notifications@github.com wrote:

Now gradle 1.10 is available. Do you have any plan to work on compatibility of this plugin with latest version of gradle?

— Reply to this email directly or view it on GitHubhttps://github.com/TrigonicSolutions/gradle-rpm-plugin/issues/50#issuecomment-31911759 .

quidryan commented 10 years ago

The branch called gradle-1.10 in the gradle-ospackage-plugin project was never released because I did it last with 1.10-rc-2 and was wanted to wait till the final came out. But it was working with that, so it shouldn't be much to test and release it. I'll try it today, and if it passes the tests, I'll release it.

On Thu, Jan 9, 2014 at 5:30 AM, Travis Camechis notifications@github.comwrote:

You could use the one from netfix which works on 1.10. Os-package-plugin. It is a fork so hardly any changes required to use it. On Jan 9, 2014 3:36 AM, "mushkoor" notifications@github.com wrote:

Now gradle 1.10 is available. Do you have any plan to work on compatibility of this plugin with latest version of gradle?

— Reply to this email directly or view it on GitHub< https://github.com/TrigonicSolutions/gradle-rpm-plugin/issues/50#issuecomment-31911759>

.

— Reply to this email directly or view it on GitHubhttps://github.com/TrigonicSolutions/gradle-rpm-plugin/issues/50#issuecomment-31930653 .

camechis commented 10 years ago

I am currently using gradle-ospackage-plugin version 1.9.1 on gradle 1.10 without issues.

On Thu, Jan 9, 2014 at 11:12 AM, Justin Ryan notifications@github.comwrote:

The branch called gradle-1.10 in the gradle-ospackage-plugin project was never released because I did it last with 1.10-rc-2 and was wanted to wait till the final came out. But it was working with that, so it shouldn't be much to test and release it. I'll try it today, and if it passes the tests, I'll release it.

On Thu, Jan 9, 2014 at 5:30 AM, Travis Camechis notifications@github.comwrote:

You could use the one from netfix which works on 1.10. Os-package-plugin. It is a fork so hardly any changes required to use it. On Jan 9, 2014 3:36 AM, "mushkoor" notifications@github.com wrote:

Now gradle 1.10 is available. Do you have any plan to work on compatibility of this plugin with latest version of gradle?

— Reply to this email directly or view it on GitHub<

https://github.com/TrigonicSolutions/gradle-rpm-plugin/issues/50#issuecomment-31911759>

.

— Reply to this email directly or view it on GitHub< https://github.com/TrigonicSolutions/gradle-rpm-plugin/issues/50#issuecomment-31930653>

.

— Reply to this email directly or view it on GitHubhttps://github.com/TrigonicSolutions/gradle-rpm-plugin/issues/50#issuecomment-31947494 .

quidryan commented 10 years ago

Things did look good for 1.10, so I released com.netflix.nebula:gradle-ospackage-plugin:1.10.0 to jcenter and made gradle-1.10 the new default. It's exactly the same as 1.9.1, except with a version that makes it clear what Gradle version it's meant for.

On Thu, Jan 9, 2014 at 8:14 AM, Travis Camechis notifications@github.comwrote:

I am currently using gradle-ospackage-plugin version 1.9.1 on gradle 1.10 without issues.

On Thu, Jan 9, 2014 at 11:12 AM, Justin Ryan notifications@github.comwrote:

The branch called gradle-1.10 in the gradle-ospackage-plugin project was never released because I did it last with 1.10-rc-2 and was wanted to wait till the final came out. But it was working with that, so it shouldn't be much to test and release it. I'll try it today, and if it passes the tests, I'll release it.

On Thu, Jan 9, 2014 at 5:30 AM, Travis Camechis < notifications@github.com>wrote:

You could use the one from netfix which works on 1.10. Os-package-plugin. It is a fork so hardly any changes required to use it. On Jan 9, 2014 3:36 AM, "mushkoor" notifications@github.com wrote:

Now gradle 1.10 is available. Do you have any plan to work on compatibility of this plugin with latest version of gradle?

— Reply to this email directly or view it on GitHub<

https://github.com/TrigonicSolutions/gradle-rpm-plugin/issues/50#issuecomment-31911759>

.

— Reply to this email directly or view it on GitHub<

https://github.com/TrigonicSolutions/gradle-rpm-plugin/issues/50#issuecomment-31930653>

.

— Reply to this email directly or view it on GitHub< https://github.com/TrigonicSolutions/gradle-rpm-plugin/issues/50#issuecomment-31947494>

.

— Reply to this email directly or view it on GitHubhttps://github.com/TrigonicSolutions/gradle-rpm-plugin/issues/50#issuecomment-31947781 .