Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 430615

Summary: [GEF4] maven build fails on windows
Product: [Tools] GEF Reporter: Aykut Kilic <battalaykut>
Component: RelEngAssignee: Alexander Nyßen <nyssen>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: nyssen
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 8   
Whiteboard:
Attachments:
Description Flags
maven log file with flags -e -X
none
log file after the first fix.
none
some packages are filled with dummy.class none

Description Aykut Kilic CLA 2014-03-18 11:04:44 EDT
After I clone from git master and run
mvn clean install for org.eclipse.gef4.releng

the build fails and I get the error:
[INFO] org.eclipse.gef4.geometry.convert.fx.tests ........ FAILURE [0.963s]

I run the test in eclipse and it passes.

Also tests below pass in maven:
[INFO] org.eclipse.gef4.releng ........................... SUCCESS [0.595s]
[INFO] org.eclipse.gef4.target ........................... SUCCESS [0.244s]
[INFO] org.eclipse.gef4.geometry ......................... SUCCESS [1.939s]
[INFO] org.eclipse.gef4.geometry.convert.fx .............. SUCCESS [0.255s]
[INFO] org.eclipse.gef4.geometry.convert.fx .............. SUCCESS [0.233s]
[INFO] org.eclipse.gef4.geometry.convert.swt ............. SUCCESS [0.352s]
[INFO] org.eclipse.gef4.geometry.convert.swt ............. SUCCESS [0.167s]
[INFO] org.eclipse.gef4.geometry ......................... SUCCESS [0.184s]
[INFO] org.eclipse.gef4.geometry.tests ................... SUCCESS [6.643s]
[INFO] org.eclipse.gef4.geometry.convert.swt.tests ....... SUCCESS [2.394s]

a log file is attached with flags -e -X.
Comment 1 Aykut Kilic CLA 2014-03-18 11:05:47 EDT
Created attachment 240983 [details]
maven log file with flags -e -X
Comment 2 Aykut Kilic CLA 2014-03-18 19:50:45 EDT
It seems that the build can't find the main class.

[INFO] Command line:
	cmd.exe /X /C "C:\devtools\jdk\7\64bit\jre\bin\java.exe -Dosgi.noShutdown=false -Dosgi.os=win32 -Dosgi.ws=win32 -Dosgi.arch=x86_64 -Xmx512m -XX:MaxPermSize=256m \
						-Dosgi.framework.extensions=org.eclipse.fx.osgi -jar C:\Users\Aykut\.m2\repository\p2\osgi\bundle\org.eclipse.equinox.launcher\1.3.0.v20130327-1440\org.eclipse.equinox.launcher-1.3.0.v20130327-1440.jar -debug -consolelog -data C:\git\org.eclipse.gef4\org.eclipse.gef4.geometry.convert.fx.tests\target\work\data -install C:\git\org.eclipse.gef4\org.eclipse.gef4.geometry.convert.fx.tests\target\work -configuration C:\git\org.eclipse.gef4\org.eclipse.gef4.geometry.convert.fx.tests\target\work\configuration -application org.eclipse.tycho.surefire.osgibooter.headlesstest -testproperties C:\git\org.eclipse.gef4\org.eclipse.gef4.geometry.convert.fx.tests\target\surefire.properties"
Error: Could not find or load main class \
Comment 3 Aykut Kilic CLA 2014-03-18 19:55:53 EDT
Parameters in a readable format:
-Dosgi.noShutdown=false 
-Dosgi.os=win32 
-Dosgi.ws=win32 
-Dosgi.arch=x86_64 
-Xmx512m 
-XX:MaxPermSize=256m
-Dosgi.framework.extensions=org.eclipse.fx.osgi
-jar MAVENREPO\p2\osgi\bundle\org.eclipse.equinox.launcher\1.3.0.v20130327-1440\org.eclipse.equinox.launcher-1.3.0.v20130327-1440.jar 
-debug 
-consolelog 
-data PRJ_ROOT\target\work\data 
-install PRJ_ROOT\target\work 
-configuration PRJ_ROOT\target\work\configuration 
-application org.eclipse.tycho.surefire.osgibooter.headlesstest 
-testproperties PRJ_ROOT\target\surefire.properties
Comment 4 Aykut Kilic CLA 2014-03-19 09:37:19 EDT
The command seems to be ok. I run it and the test passes. But still the same command fails in maven.
Comment 5 Alexander Nyßen CLA 2014-03-19 23:56:02 EDT
(In reply to Aykut K&#305;l&#305;ç from comment #4)
> The command seems to be ok. I run it and the test passes. But still the same
> command fails in maven.

Can you check whether ${java.home}/lib/jfxrt.jar is a valid path on your platform?
Comment 6 Alexander Nyßen CLA 2014-03-19 23:57:46 EDT
(In reply to Alexander Nyssen from comment #5)
> (In reply to Aykut K&#305;l&#305;ç from comment #4)
> > The command seems to be ok. I run it and the test passes. But still the same
> > command fails in maven.
> 
> Can you check whether ${java.home}/lib/jfxrt.jar is a valid path on your
> platform?

I correct: ${project.parent.basedir}/libs/org.eclipse.fx.osgi_0.9.0.201311040702.jar is the one of interest.
Comment 7 Alexander Nyßen CLA 2014-03-20 00:19:17 EDT
Fixed that arg-line split was not understood on windows (which was the cause of the reported problem). However, the build seems to be affected by another problem related to the generation of javadoc on windows, so I will investigate that first before closing this.
Comment 8 Alexander Nyßen CLA 2014-03-20 00:19:49 EDT
Here is the problem:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (generate-doc) on project org.eclipse.gef4.geometry.doc: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] C:\Users\nyssen\git\org.eclipse.gef4\org.eclipse.gef4.geometry.doc\generateDoc.xml:14: The following error occurred while executing this line:
[ERROR] C:\Users\nyssen\git\org.eclipse.gef4\org.eclipse.gef4.geometry.doc\generateDoc.xml:68: Execute failed: java.io.IOException: Cannot run program "${javadoc}" (in directory "C:\Users\nyssen\git\org.eclipse.gef4\org.eclipse.gef4.geometry.doc"): CreateProcess error=2, Das System kann die angegebene Datei nicht finden
[ERROR] -> [Help 1]
Comment 9 Alexander Nyßen CLA 2014-03-20 00:48:00 EDT
It seems I only installed a JRE in my virtual machine, so the problem was actually the missing javadoc executable. 

Aykut, could you please verify the problem is resolved on your machine?
Comment 10 Aykut Kilic CLA 2014-03-20 15:58:41 EDT
Yes, now org.eclipse.gef4.geometry.convert.fx.tests succeeds.
Comment 11 Alexander Nyßen CLA 2014-03-20 16:27:42 EDT
Resolving as fixed then.
Comment 12 Aykut Kilic CLA 2014-03-20 16:56:29 EDT
Created attachment 241072 [details]
log file after the first fix.

log file after the first fix.
Comment 13 Aykut Kilic CLA 2014-03-20 16:59:23 EDT
Current test results.

[INFO] org.eclipse.gef4.releng ........................... SUCCESS [0.429s]
[INFO] org.eclipse.gef4.target ........................... SUCCESS [0.188s]
[INFO] org.eclipse.gef4.geometry ......................... SUCCESS [2.338s]
[INFO] org.eclipse.gef4.geometry.convert.fx .............. SUCCESS [0.339s]
[INFO] org.eclipse.gef4.geometry.convert.fx .............. SUCCESS [0.283s]
[INFO] org.eclipse.gef4.geometry.convert.swt ............. SUCCESS [0.418s]
[INFO] org.eclipse.gef4.geometry.convert.swt ............. SUCCESS [0.255s]
[INFO] org.eclipse.gef4.geometry ......................... SUCCESS [0.237s]
[INFO] org.eclipse.gef4.geometry.tests ................... SUCCESS [8.175s]
[INFO] org.eclipse.gef4.geometry.convert.swt.tests ....... SUCCESS [3.532s]
[INFO] org.eclipse.gef4.geometry.convert.fx.tests ........ SUCCESS [3.429s]
[INFO] org.eclipse.gef4.geometry.doc ..................... FAILURE [2:19.740s]
[INFO] org.eclipse.gef4.geometry.doc ..................... SKIPPED
[INFO] org.eclipse.gef4.geometry.sdk ..................... SKIPPED


[echo] Generating javadoc...
[exec] Current OS is Windows 8
[exec] Output redirected to C:\git\org.eclipse.gef4\org.eclipse.gef4.geometry.doc\doc.bin.log
[exec] Executing 'C:\devtools\java\8\64bit\jre\..\bin\javadoc.exe' with arguments:
[exec] '@C:\git\org.eclipse.gef4\org.eclipse.gef4.geometry.doc/javadocOptions.tmp.txt'
[exec] '-J-Xmx1000M'
[exec] 
[exec] The ' characters around the executable and arguments are
[exec] not part of the command.
Execute:Java13CommandLauncher: Executing 'C:\devtools\java\8\64bit\jre\..\bin\javadoc.exe' with arguments:
'@C:\git\org.eclipse.gef4\org.eclipse.gef4.geometry.doc/javadocOptions.tmp.txt'
'-J-Xmx1000M'

The ' characters around the executable and arguments are
not part of the command.
[antcall] Exiting C:\git\org.eclipse.gef4\org.eclipse.gef4.geometry.doc\generateDoc.xml.
[ant] Exiting C:\git\org.eclipse.gef4\org.eclipse.gef4.geometry.doc\generateDoc.xml.
Comment 14 Aykut Kilic CLA 2014-03-20 17:01:52 EDT
C:\devtools\java\8\64bit\jre\..\bin\javadoc.exe @C:\git\org.eclipse.gef4\org.eclipse.gef4.geometry.doc/javadocOptions.tmp.txt -J-Xmx1000M

results:
....
Generating reference\api\index-files\index-21.html...
Generating reference\api\index-files\index-22.html...
Generating reference\api\index-files\index-23.html...
Generating reference\api\index-files\index-24.html...
Generating reference\api\deprecated-list.html...
Building index for all classes...
Generating reference\api\allclasses-frame.html...
Generating reference\api\allclasses-noframe.html...
Generating reference\api\index.html...
Generating reference\api\overview-summary.html...
Generating reference\api\help-doc.html...
[done in 3581 ms]
8 errors
73 warnings
Comment 15 Aykut Kilic CLA 2014-03-20 17:24:09 EDT
as you probably have already seen, mvn fails because of ant task which calls javadoc. here are some of the errors from javadoc:

..\org.eclipse.gef4.geometry\src\org\eclipse\gef4\geometry\planar\BezierCurve.java:145: error: malformed HTML
                 * parameter ranges require 0 <= a <= b <= 1.
                                              ^
..\org.eclipse.gef4.geometry\src\org\eclipse\gef4\geometry\planar\BezierCurve.java:145: error: malformed HTML
                 * parameter ranges require 0 <= a <= b <= 1.
                                                   ^
..\org.eclipse.gef4.geometry\src\org\eclipse\gef4\geometry\planar\BezierCurve.java:145: error: malformed HTML
                 * parameter ranges require 0 <= a <= b <= 1.
                                                        ^
..\org.eclipse.gef4.geometry\src\org\eclipse\gef4\geometry\planar\BezierCurve.java:151: error: malformed HTML
                 * parameter ranges require 0 <= a <= b <= 1.
                                              ^
..\org.eclipse.gef4.geometry\src\org\eclipse\gef4\geometry\planar\BezierCurve.java:151: error: malformed HTML
                 * parameter ranges require 0 <= a <= b <= 1.
                                                   ^
..\org.eclipse.gef4.geometry\src\org\eclipse\gef4\geometry\planar\BezierCurve.java:151: error: malformed HTML
                 * parameter ranges require 0 <= a <= b <= 1.
Comment 16 Aykut Kilic CLA 2014-03-20 18:16:39 EDT
Created attachment 241074 [details]
some packages are filled with dummy.class
Comment 17 Aykut Kilic CLA 2014-03-20 18:18:18 EDT
I get compilation errors for some packages. Some packages are filled with a dummy class. I've attached a screenshot. 

Is this because of maven or target import?
Comment 18 Alexander Nyßen CLA 2014-03-20 22:12:01 EDT
(In reply to Aykut  Kilic from comment #17)
> I get compilation errors for some packages. Some packages are filled with a
> dummy class. I've attached a screenshot. 
> 
> Is this because of maven or target import?

I think its because of java 8. May that be? They have factored out the javafx-swt-integration into an own jar and it seems our build can not yet handle this. Please open a separate bug for this (and stick to java 7 as a workaround).
Comment 19 Aykut Kilic CLA 2014-03-21 05:45:40 EDT
Yeah, that's the case. Now the build succeeds. Thanks.