renatoathaydes / osgi-run

Osgi-Run - A Gradle plugin to make the development of modular applications using OSGi completely painless
Apache License 2.0
54 stars 13 forks source link

build broken with latest grade (3.4.1) #63

Closed patmuk closed 7 years ago

patmuk commented 7 years ago

When using the master brunch of the osgi-run tutorial found in https://sites.google.com/a/athaydes.com/renato-athaydes/posts/osgi-runtutorial-runyourjavakotlinfregecodeinosgi with having grade version 3.4.1. installed the first step fails. This is $ gradle crO The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. :createOsgiRuntime FAILED

FAILURE: Build failed with an exception.

renatoathaydes commented 7 years ago

Gradle broke a lot of stuff in this latest version... not sure I can get this working again as this plugin needs to be able to add configurations dynamically (each dep gets its own config so that Gradle does not try to resolve dependency version conflicts).

Let me know if you have knowledge about this and can help.

patmuk commented 7 years ago

Hey,

ah, that is unfortunate. I am an experienced programmer, how ever I am new to gradle. I am afraid I would need too much time to get familiar with the codebase, so I could suggest solutions :(

Best,

Patrick

On Thu, Mar 23, 2017 at 8:59 PM, Renato Athaydes notifications@github.com wrote:

Gradle broke a lot of stuff in this latest version... not sure I can get this working again as this plugin needs to be able to add configurations dynamically (each dep gets its own config so that Gradle does not try to resolve dependency version conflicts).

Let me know if you have knowledge about this and can help.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/renatoathaydes/osgi-run/issues/63#issuecomment-288842192, or mute the thread https://github.com/notifications/unsubscribe-auth/AB82AOvx3asAqFmAa63wUWJoHbv-ngkYks5ros8FgaJpZM4MnRPh .

renatoathaydes commented 7 years ago

No problem... I am sure there's some work around, someone just needs to put in the time to find out what that is.

I'll try to find time to do it soon.

patmuk commented 7 years ago

Thanks ... highly appreciated. Let me know if I can help, with my limited grade knowledge.

On Fri, Mar 24, 2017 at 10:36 PM, Renato Athaydes notifications@github.com wrote:

No problem... I am sure there's some work around, someone just needs to put in the time to find out what that is.

I'll try to find time to do it soon.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/renatoathaydes/osgi-run/issues/63#issuecomment-289148976, or mute the thread https://github.com/notifications/unsubscribe-auth/AB82ALh1ruEiT_e22c3aDhIvribmUY6Dks5rpDdfgaJpZM4MnRPh .

renatoathaydes commented 7 years ago

@patmuk hi, finally got around to this issue! But I can't reproduce it... I checked out the master branch of the tutorial, upgraded gradlew to version 3.4.1, and the project still works as usual, without even warnings.

Can you give me details steps to reproduce this issue?

renatoathaydes commented 7 years ago

My terminal's output:

➜  osgi-run-tutorial git:(master) ✗ ./gradlew --version

------------------------------------------------------------
Gradle 3.4.1
------------------------------------------------------------

Build time:   2017-03-03 19:45:41 UTC
Revision:     9eb76efdd3d034dc506c719dac2955efb5ff9a93

Groovy:       2.4.7
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_131 (Oracle Corporation 25.131-b11)
OS:           Mac OS X 10.12.4 x86_64

➜  osgi-run-tutorial git:(master) ✗ ./gradlew clean creOsgi
:cleanOsgiRuntime
:createBundlesDir
:createOsgiRuntime
No permission to make file /Users/renato/programming/projects/osgi-run-tutorial/build/osgi/run.sh executable. Please do it manually.
No permission to make file /Users/renato/programming/projects/osgi-run-tutorial/build/osgi/run.bat executable. Please do it manually.

BUILD SUCCESSFUL

Total time: 0.66 secs
➜  osgi-run-tutorial git:(master) ✗ bash build/osgi/run.sh
____________________________
Welcome to Apache Felix Gogo

g! 
renatoathaydes commented 7 years ago

Tested with osgi-run version 1.5.4, by the way.

patmuk commented 7 years ago

Hey,

I could reproduce it with gradle 3.5, but ./gradlew (pointing to 2.9) is working. I will pull the latest changes in the repo and try to reproduce it again.

Here is my output from the old state, where I could reproduce it:

`$ ./gradlew --version


Gradle 2.9

Build time: 2015-11-17 07:02:17 UTC Build number: none Revision: b463d7980c40d44c4657dc80025275b84a29e31f

Groovy: 2.4.4 Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013 JVM: 1.8.0_74 (Oracle Corporation 25.74-b02) OS: Mac OS X 10.12.4 x86_64

(was working fine)

$ gradle --version


Gradle 3.5

Build time: 2017-04-10 13:37:25 UTC Revision: b762622a185d59ce0cfc9cbc6ab5dd22469e18a6

Groovy: 2.4.10 Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015 JVM: 1.8.0_74 (Oracle Corporation 25.74-b02) OS: Mac OS X 10.12.4 x86_64

4dempmukherj:osgi-run-tutorial pmukherj$ gradle clean creOsgi The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. :cleanOsgiRuntime UP-TO-DATE :createOsgiRuntime FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 0.979 secs`

renatoathaydes commented 7 years ago

This doesn't make sense... It works for me:

➜  osgi-run-tutorial git:(master) ✗ ./gradlew --version

------------------------------------------------------------
Gradle 3.5
------------------------------------------------------------

Build time:   2017-04-10 13:37:25 UTC
Revision:     b762622a185d59ce0cfc9cbc6ab5dd22469e18a6

Groovy:       2.4.10
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_131 (Oracle Corporation 25.131-b11)
OS:           Mac OS X 10.12.4 x86_64

➜  osgi-run-tutorial git:(master) ✗ ./gradlew clean creOsgi
:cleanOsgiRuntime
:createBundlesDir
:createOsgiRuntime
No permission to make file /Users/renato/programming/projects/osgi-run-tutorial/build/osgi/run.sh executable. Please do it manually.
No permission to make file /Users/renato/programming/projects/osgi-run-tutorial/build/osgi/run.bat executable. Please do it manually.

BUILD SUCCESSFUL

Total time: 0.703 secs
➜  osgi-run-tutorial git:(master) ✗ bash build/osgi/run.sh
____________________________
Welcome to Apache Felix Gogo

g! 
renatoathaydes commented 7 years ago

Here's the build file I am using:


buildscript {
    repositories {
        mavenLocal()
        jcenter()
    }
    dependencies {
        classpath group: 'com.athaydes.gradle.osgi', name: 'osgi-run-core', version: '1.5.4'
        classpath group: 'com.athaydes.gradle.osgi', name: 'ipojo-plugin', version: '1.2.0'
    }
}

apply plugin: 'com.athaydes.osgi-run'

group 'osgi-run-tutorial'
version '1.0'

repositories {
    jcenter()
}
patmuk commented 7 years ago

Hmm ... the build file is different for me.

I checked out a new project, still get the error Configuration with name '__osgiRuntime0' not found. Should I have configured something before?

I am on MacOS 10.12.4, $ bash --version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16) Copyright (C) 2007 Free Software Foundation, Inc.

Here are the commands I issued:

`$ git clone https://github.com/renatoathaydes/osgi-run-tutorial Cloning into 'osgi-run-tutorial'... remote: Counting objects: 72, done. remote: Total 72 (delta 0), reused 0 (delta 0), pack-reused 72 Unpacking objects: 100% (72/72), done.

$ gradle wrapper --gradle-version 3.4.1 (...) $ ./gradlew --version


Gradle 3.4.1

Build time: 2017-03-03 19:45:41 UTC Revision: 9eb76efdd3d034dc506c719dac2955efb5ff9a93

Groovy: 2.4.7 Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015 JVM: 1.8.0_74 (Oracle Corporation 25.74-b02) OS: Mac OS X 10.12.4 x86_64

$ ./gradlew clean creOsgi Starting a Gradle Daemon (subsequent builds will be faster) The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. :cleanOsgiRuntime UP-TO-DATE :createOsgiRuntime FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 10.92 secs

$ cat build.gradle

plugins { id "com.athaydes.osgi-run" version "1.5.0" }

group 'osgi-run-tutorial' version '1.0'

repositories { jcenter() } `

patmuk commented 7 years ago

Ah, works now with your build file!

patmuk commented 7 years ago

It did not download the dependencies before ... now I got: `$ ./gradlew clean creOsgi Download https://jcenter.bintray.com/com/athaydes/gradle/osgi/osgi-run-core/1.5.4/osgi-run-core-1.5.4.pom Download https://jcenter.bintray.com/com/athaydes/gradle/osgi/ipojo-plugin/1.2.0/ipojo-plugin-1.2.0.pom Download https://jcenter.bintray.com/org/apache/felix/org.apache.felix.ipojo.manipulator/1.12.1/org.apache.felix.ipojo.manipulator-1.12.1.pom Download https://jcenter.bintray.com/org/ow2/asm/asm-all/5.0.2/asm-all-5.0.2.pom Download https://jcenter.bintray.com/org/ow2/asm/asm-parent/5.0.2/asm-parent-5.0.2.pom Download https://jcenter.bintray.com/org/apache/felix/org.apache.felix.ipojo.metadata/1.6.0/org.apache.felix.ipojo.metadata-1.6.0.pom Download https://jcenter.bintray.com/org/apache/felix/org.apache.felix.ipojo.annotations/1.12.1/org.apache.felix.ipojo.annotations-1.12.1.pom Download https://jcenter.bintray.com/com/athaydes/gradle/osgi/osgi-run-core/1.5.4/osgi-run-core-1.5.4.jar Download https://jcenter.bintray.com/com/athaydes/gradle/osgi/ipojo-plugin/1.2.0/ipojo-plugin-1.2.0.jar Download https://jcenter.bintray.com/org/apache/felix/org.apache.felix.ipojo.manipulator/1.12.1/org.apache.felix.ipojo.manipulator-1.12.1.jar Download https://jcenter.bintray.com/org/ow2/asm/asm-all/5.0.2/asm-all-5.0.2.jar Download https://jcenter.bintray.com/org/apache/felix/org.apache.felix.ipojo.metadata/1.6.0/org.apache.felix.ipojo.metadata-1.6.0.jar Download https://jcenter.bintray.com/org/apache/felix/org.apache.felix.ipojo.annotations/1.12.1/org.apache.felix.ipojo.annotations-1.12.1.jar :cleanOsgiRuntime UP-TO-DATE :createBundlesDir :createOsgiRuntime No permission to make file /Users/pmukherj/tmp/gradle-osgi-run/osgi-run-tutorial/build/osgi/run.sh executable. Please do it manually. No permission to make file /Users/pmukherj/tmp/gradle-osgi-run/osgi-run-tutorial/build/osgi/run.bat executable. Please do it manually.

BUILD SUCCESSFUL

Total time: 27.034 secs $ ./gradlew --version


Gradle 3.4.1 `

renatoathaydes commented 7 years ago

Great, so this issue can be closed?

renatoathaydes commented 7 years ago

Oh, remove the ipojo-plugin from the build file as we are not using it in the tutorial!

patmuk commented 7 years ago

Yes, thanks a lot! I guess the build file in the tutorial: https://github.com/renatoathaydes/osgi-run-tutorial/blob/master/build.gradle should be updated - I missed to install the osgi-run-core dependency ...

Thanks again :)

renatoathaydes commented 7 years ago

That file is also correct, you just needed to upgrade to version 1.5.4.

patmuk commented 7 years ago

Aha, thanks!