Comments (28)
OK, I'll have a look.
from wuff.
I looked through my code, result: config for Linux and Windows implemented, for OSX - not. Will try to fix it tomorrow.
from wuff.
I'm afraid the problem persists with version 0.0.7
gradle dependencies
Download http://dl.bintray.com/akhikhl/maven/org/akhikhl/wuff/wuff-plugin/0.0.7/wuff-plugin-0.0.7.pom
Download http://dl.bintray.com/akhikhl/maven/org/akhikhl/unpuzzle/unpuzzle-plugin/0.0.12/unpuzzle-plugin-0.0.12.pom
Download http://dl.bintray.com/akhikhl/maven/org/akhikhl/unpuzzle/unpuzzle-eclipse2maven/0.0.12/unpuzzle-eclipse2maven-0.0.12.pom
Download http://dl.bintray.com/akhikhl/maven/org/akhikhl/unpuzzle/unpuzzle-utils/0.0.12/unpuzzle-utils-0.0.12.pom
Download http://dl.bintray.com/akhikhl/maven/org/akhikhl/unpuzzle/unpuzzle-osgi2maven/0.0.12/unpuzzle-osgi2maven-0.0.12.pom
Download http://dl.bintray.com/akhikhl/maven/org/akhikhl/wuff/wuff-plugin/0.0.7/wuff-plugin-0.0.7.jar
Download http://dl.bintray.com/akhikhl/maven/org/akhikhl/unpuzzle/unpuzzle-plugin/0.0.12/unpuzzle-plugin-0.0.12.jar
Download http://dl.bintray.com/akhikhl/maven/org/akhikhl/unpuzzle/unpuzzle-eclipse2maven/0.0.12/unpuzzle-eclipse2maven-0.0.12.jar
Download http://dl.bintray.com/akhikhl/maven/org/akhikhl/unpuzzle/unpuzzle-utils/0.0.12/unpuzzle-utils-0.0.12.jar
Download http://dl.bintray.com/akhikhl/maven/org/akhikhl/unpuzzle/unpuzzle-osgi2maven/0.0.12/unpuzzle-osgi2maven-0.0.12.jar
Downloading file: http://mirror.netcologne.de/eclipse//technology/epp/downloads/release/kepler/SR2/eclipse-jee-kepler-SR2-null-x86_64.null
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'test'.
> Failed to notify project evaluation listener.
> http://mirror.netcologne.de/eclipse//technology/epp/downloads/release/kepler/SR2/eclipse-jee-kepler-SR2-null-x86_64.null
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 12.02 secs
Perhaps it would be a good idea to collaborate on a branch before pushing another release? ;-)
from wuff.
You are right. I was over-confident it just works π. I created a branch "macosx".
The heart of the beast is here:
https://github.com/akhikhl/wuff/blob/macosx/libs/wuff-plugin/src/main/resources/org/akhikhl/wuff/defaultConfig.groovy
This file contains all configurations for all eclipse versions.
from wuff.
This part deals with detecting current OS and current architecture:
https://github.com/akhikhl/wuff/blob/macosx/libs/wuff-plugin/src/main/groovy/org/akhikhl/wuff/PlatformConfig.groovy#L46-L56
I forgot to update this part.
Could you, please, have a look and give advice what should be there for Mac OS?
from wuff.
Evaluating those properties on Groovy Console results in
groovy> println System.getProperty('os.name')
groovy> println System.getProperty('os.arch')
Mac OS X
x86_64
from wuff.
I added these two lines:
https://github.com/akhikhl/wuff/blob/macosx/libs/wuff-plugin/src/main/groovy/org/akhikhl/wuff/PlatformConfig.groovy#L51-L52
Could you, please, try it?
git clone [email protected]:akhikhl/wuff.git
cd wuff
git checkout macosx
gradle build
cd examples/RcpApp-1
gradle build
from wuff.
Looks like you may need to tweak the build files in order to locate locally built components
* Where:
Build file '/Users/aalmiray/dev/github/wuff/libs/unpuzzle/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':libs:unpuzzle'.
> Could not resolve all dependencies for configuration 'classpath'.
> Could not find org.akhikhl.unpuzzle:unpuzzle-plugin:0.0.12.
Searched in the following locations:
file:/Users/aalmiray/.m2/repository/org/akhikhl/unpuzzle/unpuzzle-plugin/0.0.12/unpuzzle-plugin-0.0.12.pom
file:/Users/aalmiray/.m2/repository/org/akhikhl/unpuzzle/unpuzzle-plugin/0.0.12/unpuzzle-plugin-0.0.12.jar
http://jcenter.bintray.com/org/akhikhl/unpuzzle/unpuzzle-plugin/0.0.12/unpuzzle-plugin-0.0.12.pom
http://jcenter.bintray.com/org/akhikhl/unpuzzle/unpuzzle-plugin/0.0.12/unpuzzle-plugin-0.0.12.jar
http://repo1.maven.org/maven2/org/akhikhl/unpuzzle/unpuzzle-plugin/0.0.12/unpuzzle-plugin-0.0.12.pom
http://repo1.maven.org/maven2/org/akhikhl/unpuzzle/unpuzzle-plugin/0.0.12/unpuzzle-plugin-0.0.12.jar
Required by:
unspecified:unspecified:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.421 secs
from wuff.
Ah, this is the same as with Wuff: Unpuzzle repo is not included at jcenter yet.
Temp solution:
git clone [email protected]:akhikhl/unpuzzle.git
cd unpuzzle
gradle build
then build Wuff.
from wuff.
Or just add:
buildscript {
repositories {
maven { url 'http://dl.bintray.com/akhikhl/maven' }
}
}
to wuff/build.gradle, then it should compile.
from wuff.
When scaffolding, you might see messages saying that Wuff cannot create extension points. These should be treated as warnings, not errors (scaffolding works despite of these messages).
I already fixed it on Wuff master.
from wuff.
I'm afraid the error persists, even after building and installing unpuzzle (0.0.13 is the version I've got from cloning the repo)
:libs:unpuzzle:downloadEclipse
Downloading file: http://mirror.netcologne.de/eclipse//technology/epp/downloads/release/kepler/SR2/eclipse-jee-kepler-SR2-null-x86_64.null
from wuff.
Hold on, together we will fix it π.
The error message means - architecture is chosen correctly, but OS is still not detected. Could you, please, insert two lines at line 53 of PlatformConfig:
println "System.getProperty('os.name') -> ${System.getProperty('os.name')}"
println "System.getProperty('os.name').equalsIgnoreCase('Mac OS X') -> ${System.getProperty('os.name').equalsIgnoreCase('Mac OS X')}"
then do gradle build
on Wuff and on app? What's the message?
from wuff.
I've got the following result
System.getProperty('os.name') -> Mac OS X
System.getProperty('os.name').equalsIgnoreCase('Mac OS X') -> true
from wuff.
Good, I look further into sources.
from wuff.
I just simulated your environment by forcibly setting current_os = 'Mac OS X'
at line 46 of PlatformConfig.groovy and things are working fine. The program downloads, unpacks and installs eclipse-jee-kepler-SR2-macosx-cocoa-x86_64.tar.gz.
You are on gradle 2.0-rc-1, aren't you? I'll try switching to it to see if problem is related to gradle version.
from wuff.
The bug does not depend on gradle version. I tried it, Wuff works just fine with gradle 2.0-rc-1 (in my environment).
Could you, please, insert the line:
println "suffix_os=${suffix_os}, current_os=${current_os}, suffix_os[current_os]=${suffix_os[current_os]}"
at line 333 of file wuff/libs/wuff-plugin/src/main/resources/org/akhikhl/wuff/defaultConfig.groovy?
Check: the next line must be:
source "$eclipseMirror/eclipse//technology/epp/downloads/release/kepler/SR2/eclipse-jee-kepler-SR2-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_os]}"
then do gradle build on Wuff and your app and tell me, what's the output?
from wuff.
I don't know what to tell you. The change doesn't go through. For some reason the build continues to point to the old binaries, the println statements never get executed :-(
from wuff.
Ah, that's good news π
Means: there's discrepancy in dependency include somewhere. We include old code and it gets executed. Let's look at the example app you were compiling:
- does it use wuff version 0.0.7 or older version? Or is it "+" for version number?
- what's the sequence of repositories? Is mavenLocal() included before jcenter() in buildscript.repositories?
from wuff.
I'm not even able to compile wuff at all :-( Here's the current diff based on the macosx
branch
diff --git a/libs/unpuzzle/unpuzzle.plugin b/libs/unpuzzle/unpuzzle.plugin
index 98f5721..3cc9b57 100644
--- a/libs/unpuzzle/unpuzzle.plugin
+++ b/libs/unpuzzle/unpuzzle.plugin
@@ -6,7 +6,7 @@ buildscript {
}
dependencies {
- classpath 'org.akhikhl.unpuzzle:unpuzzle-plugin:0.0.12'
+ classpath 'org.akhikhl.unpuzzle:unpuzzle-plugin:0.0.13'
}
}
diff --git a/libs/wuff-plugin/build.gradle b/libs/wuff-plugin/build.gradle
index 71ef57d..68cf89c 100644
--- a/libs/wuff-plugin/build.gradle
+++ b/libs/wuff-plugin/build.gradle
@@ -1,6 +1,11 @@
apply from: rootProject.file('libs/common.gradle')
apply from: rootProject.file('libs/publish.gradle')
+repositories {
+ mavenLocal()
+ jcenter()
+ maven { url 'http://dl.bintray.com/akhikhl/maven' }
+}
dependencies {
compile gradleApi()
compile 'org.akhikhl.gradle-onejar:gradle-onejar:0.0.11'
diff --git a/libs/wuff-plugin/src/main/resources/org/akhikhl/wuff/defaultConfig.groovy b/libs/wuff-plugin/src/main/resources/org/akhikhl/wuff/defaultConfig.groovy
index 6276fe1..a629dec 100644
--- a/libs/wuff-plugin/src/main/resources/org/akhikhl/wuff/defaultConfig.groovy
+++ b/libs/wuff-plugin/src/main/resources/org/akhikhl/wuff/defaultConfig.groovy
@@ -330,6 +330,9 @@ wuff {
sources {
+ println "suffix_os=${suffix_os}, current_os=${current_os}, suffix_os[current_os]=${suffix_os[current_os]}"
+
+
source "$eclipseMirror/eclipse//technology/epp/downloads/release/kepler/SR2/eclipse-jee-kepler-SR2-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[curren source "$eclipseMirror/eclipse//eclipse/downloads/drops4/R-4.3.2-201402211700/eclipse-SDK-4.3.2-${suffix_os[current_os]}${suffix_arch[current_arch]}.${fileExt_os[current_o source "$eclipseMirror/eclipse//eclipse/downloads/drops4/R-4.3.2-201402211700/eclipse-4.3.2-delta-pack.zip"
from wuff.
diff look fine, thank you.
There are two reasons, why it doen't compile for you:
- there are unit-tests in wuff-plugin, that rely on eclipse being downloaded and installed, if not, they attempt to download and install eclipse.
- The project "libs/unpuzzle" downloads and installs eclipse plugins. If there are errors in this process, Wuff compilation stops.
Could you, please, try the following:
cd libs/wuff-plugin
gradle install
This way we skip unit-tests and "libs/unpuzzle" and just compile and install Wuff to local maven repo.
When it works, try running tasks on sample application.
from wuff.
I was able to reproduce the last error you described. The source is the following: unpuzzle contains duplicate class PlatformConfig and another configuration of repositories, that is used by wuff/libs/unpuzzle.
I am now fixing it now. I'll update when fixed code is available at github.
This is exactly the case when code duplication gets nasty and costs time. Sorry.
from wuff.
Now the error seems to be solved. Unpuzzle and Wuff compile smoothly in simulated Mac OS X environment (current_os set to "Mac OS X" instead of system property).
Could you, please, try once more? Your help is very much appretiated. Many people on Mac OS X will surely enjoy compiling Eclipse plugins and apps with gradle.
- please do
git pull
on unpuzzle and switch to "macosx" branch - do
git pull
on wuff, stay at "macosx" branch - do
gradle build
on unpuzzle - do
gradle build
on wuff - try scaffolding/building/running an example program from tutorial
important: unpuzzle stays on version 0.0.13. Wuff version is now 0.0.8. If your sample app uses explicit version number, please upgrade to 0.0.8.
from wuff.
That did it. I was able to invoke gradle tasks --all
and gradle run
on the sample RPCapp project, however there was a problem with thread access
gradle run
suffix_os=[linux:linux-gtk, macosx:macosx-cocoa, windows:win32], current_os=macosx, suffix_os[current_os]=macosx-cocoa
:compileJava
:createExtraFiles
:processResources
:classes
:createOsgiManifest
:jar
:wrapLibs
:prepareRunConfig
:run
***WARNING: Display must be created on main thread due to Cocoa restrictions.
!SESSION 2014-06-23 17:47:50.192 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Command-line arguments: -data /Users/aalmiray/dev/github/wuff/examples/RcpApp-1/MyRcpApp/build/run -consoleLog
!ENTRY org.eclipse.osgi 4 0 2014-06-23 17:47:50.993
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4397)
at org.eclipse.swt.SWT.error(SWT.java:4312)
at org.eclipse.swt.SWT.error(SWT.java:4283)
at org.eclipse.swt.widgets.Display.error(Display.java:1076)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:833)
at org.eclipse.swt.widgets.Display.create(Display.java:816)
at org.eclipse.swt.graphics.Device.<init>(Device.java:130)
at org.eclipse.swt.widgets.Display.<init>(Display.java:707)
at org.eclipse.swt.widgets.Display.<init>(Display.java:698)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162)
at myrcpapp.Application.start(Application.java:20)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
An error has occurred. See the log file
/Users/aalmiray/dev/github/wuff/examples/RcpApp-1/MyRcpApp/build/run/.metadata/.log.
:run FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':run'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java'' finished with non-zero exit value 13
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I believe this is a well know problem when running SWT on OSX. You must specify an additional JVM flag -XstartOnFirstThread
.
see http://stackoverflow.com/questions/8194838/how-to-execute-jar-in-mac-os-x-using-swt-eclipse
from wuff.
Great that it compiles :) could you, please, do 'build gradle' on example
program, open 'build/output/appname' and add jvmarg to corresponding .sh
script? Will modified script run?
23 ΠΈΡΠ½Ρ 2014 Π³. 17:47 ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ "Andres Almiray" <
[email protected]> Π½Π°ΠΏΠΈΡΠ°Π»:
That did it. I was able to invoke gradle tasks --all and gradle run on
the sample RPCapp project, however there was a problem with thread accessgradle run
suffix_os=[linux:linux-gtk, macosx:macosx-cocoa, windows:win32], current_os=macosx, suffix_os[current_os]=macosx-cocoa
:compileJava
:createExtraFiles
:processResources
:classes
:createOsgiManifest
:jar
:wrapLibs
:prepareRunConfig
:run
***WARNING: Display must be created on main thread due to Cocoa restrictions.
!SESSION 2014-06-23 17:47:50.192 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_05
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Command-line arguments: -data /Users/aalmiray/dev/github/wuff/examples/RcpApp-1/MyRcpApp/build/run -consoleLog!ENTRY org.eclipse.osgi 4 0 2014-06-23 17:47:50.993
!MESSAGE Application error
!STACK 1
org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4397)
at org.eclipse.swt.SWT.error(SWT.java:4312)
at org.eclipse.swt.SWT.error(SWT.java:4283)
at org.eclipse.swt.widgets.Display.error(Display.java:1076)
at org.eclipse.swt.widgets.Display.createDisplay(Display.java:833)
at org.eclipse.swt.widgets.Display.create(Display.java:816)
at org.eclipse.swt.graphics.Device.(Device.java:130)
at org.eclipse.swt.widgets.Display.(Display.java:707)
at org.eclipse.swt.widgets.Display.(Display.java:698)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:695)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:162)
at myrcpapp.Application.start(Application.java:20)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
An error has occurred. See the log file
/Users/aalmiray/dev/github/wuff/examples/RcpApp-1/MyRcpApp/build/run/.metadata/.log.
:run FAILEDFAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':run'.Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/bin/java'' finished with non-zero exit value 13
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.BUILD FAILED
I believe this is a well know problem when running SWT on OSX. You must
specify an additional JVM flag -XstartOnFirstThread.see
http://stackoverflow.com/questions/8194838/how-to-execute-jar-in-mac-os-x-using-swt-eclipseβ
Reply to this email directly or view it on GitHub
#7 (comment).
from wuff.
Hi Andres,
Sorry, was busy with other things in the mean time.
News: I added -XstartOnFirstThread parameter to macosx-specific products, as well as to "run" and "debug" tasks, when current OS is Mac OS X.
Could you, please, pull changes from github to wuff, "gradle build", then try example project?
I would be rather thankful for the results π
from wuff.
Holy Smokes! It's alive! no additional configuration was needed. I was able to run examples/RcpApp-1/MyRcpApp
with just gradle run
. Thank you! π
from wuff.
I'm happy to hear that it works on Mac OS X as well π
So I do new release? Hopefully sooner than later, with growing user base and improved documentation on all features, it can get out of beta status.
from wuff.
Related Issues (20)
- "Create first IDE app" tutorial: Application.e4xmi not found HOT 1
- Use existing manifest.mf HOT 1
- Use Update Sites as Bundle Source HOT 3
- How to use Wuff to build Eclipse plugin? HOT 1
- build succeeds, even if createOsgiManifest Task failed
- Still maintained? HOT 3
- How to nest jar's into bundle lib folder? HOT 1
- Add entry at http://bnd.bndtools.org/chapters/700-tools.html
- Problem with customize the icon of a windows native launcher exe HOT 1
- Eclipse sdk download fails for mac, luna, mars. HOT 3
- Errror with Convert existing Eclipse plugins and apps to Gradle HOT 9
- wuff with eclipse-neon - SWT parts not available at compile time HOT 2
- Eclipse neon: Cannot get property 'name' on null object HOT 2
- NetCologne Eclipse mirror is not available HOT 1
- Integrating SBT project in an Eclipse application: Can Wuff rescue me?
- gradle scaffold: Cannot cast object '[configuration ':publicLib']' with class 'java.util.ArrayList' to class FileCollection HOT 12
- No such property: Base64 for class: org.akhikhl.unpuzzle.utils.Downloader
- Wuff failing with Cannot get property 'name' on null object
- A new p2 engine along with Gradle and Maven plugins is available
- No such property: Base64 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wuff.