saiddfhi / gwt-maven

Automatically exported from code.google.com/p/gwt-maven
0 stars 0 forks source link

Plugin tries to link non-Mac libraries during Mac build on SoyLatte 1.0.3 #205

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Is this Maven 1 or Maven 2? 2

What steps will reproduce the problem?
1. Checkout the source code from trunk
2. Remove all the 'GwtTest*' files and the src/test/java directory from 
the simplesample project, and change its POM so the Mac profile is active
by default and the Windows and Linux profiles aren't (see attached pom.xml.1)
3. Build it with the command:

mvn com.totsp.gwt:maven-googlewebtoolkit2-plugin:gwt

What is the expected output? What do you see instead?

Even though the Mac artifacts are configured okay, it tries to link a gtk
library:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building maven-gwt-sample
[INFO]    task-segment: [clean,
com.totsp.gwt:maven-googlewebtoolkit2-plugin:gwt]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/tar
get
[INFO] Preparing gwt-maven:gwt
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [gwt-maven:mergewebxml {execution: default}]
[INFO] copy source web.xml -
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/src
/main/webapp/WEB-INF/web.xml
to build dir (source web.xml required if mergewebxml execution is enabled)
[INFO] establishing classpath list (buildClaspathList - scope = COMPILE)
[INFO] google.webtoolkit.home (gwtHome) *not* set, using project POM for
GWT dependencies
[INFO] Module file:
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/src
/main/java/com/totsp/sample/Application.gwt.xml
[INFO] [gwt-maven:i18n {execution: default}]
[INFO] establishing classpath list (buildClaspathList - scope = COMPILE)
[INFO] google.webtoolkit.home (gwtHome) *not* set, using project POM for
GWT dependencies
[INFO] [compiler:compile]
[INFO] Compiling 6 source files to
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/tar
get/classes
[INFO] [dependency:unpack {execution: unpack}]
[INFO] Configured Artifact: com.google.gwt:gwt-dev:mac-libs:1.5.3:zip
[INFO] Unpacking
/Users/andrew/.m2/repository/com/google/gwt/gwt-dev/1.5.3/gwt-dev-1.5.3-mac-libs
.zipto
 /Users/andrew/.m2/repository/com/google/gwt/gwt-dev/1.5.3
with Includes null and excludes:null
[INFO] [gwt-maven:compile {execution: default}]
[INFO] establishing classpath list (buildClaspathList - scope = COMPILE)
[INFO] google.webtoolkit.home (gwtHome) *not* set, using project POM for
GWT dependencies
Compiling module com.totsp.sample.Application
Compilation succeeded
Linking compilation into
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/tar
get/maven-gwt-sample-1.0-SNAPSHOT/com.totsp.sample.Application
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] No tests to run.
[INFO] [gwt-maven:test {execution: default}]
[INFO] source web.xml present -
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/src
/main/webapp/WEB-INF/web.xml
- using it with embedded Tomcat
[INFO] running GWTTestCase tests (using test name filter -  GwtTest*)
[INFO] all tests completed - ran 0 tests - see results in target/gwtTest
[INFO] [war:war]
[INFO] Packaging webapp
[INFO] Assembling webapp[maven-gwt-sample] in
[/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/ta
rget/maven-gwt-sample-1.0-SNAPSHOT]
[INFO] Processing war project
[INFO] Webapp assembled in[103 msecs]
[INFO] Building war:
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/tar
get/maven-gwt-sample-1.0-SNAPSHOT.war
[INFO] [install:install]
[INFO] Installing
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/tar
get/maven-gwt-sample-1.0-SNAPSHOT.war
to
/Users/andrew/.m2/repository/com/totsp/gwt/maven-gwt-sample/1.0-SNAPSHOT/maven-g
wt-sample-1.0-SNAPSHOT.war
[INFO] [gwt-maven:gwt]
[INFO] source web.xml present -
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/src
/main/webapp/WEB-INF/web.xml
- using it with embedded Tomcat
[INFO] establishing classpath list (buildClaspathList - scope = RUNTIME)
[INFO] google.webtoolkit.home (gwtHome) *not* set, using project POM for
GWT dependencies
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load
library:
/Users/andrew/.m2/repository/com/google/gwt/gwt-dev/1.5.3/libswt-pi-gtk-3235.dyl
ib
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1651)
        at java.lang.Runtime.load0(Runtime.java:770)
        at java.lang.System.load(System.java:1005)
        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132)
        at org.eclipse.swt.internal.gtk.OS.<clinit>(OS.java:22)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
        at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:126)
        at com.google.gwt.dev.GWTShell.<clinit>(GWTShell.java:301)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Exception attempting to run script - run.sh

Embedded error: run.sh script exited abnormally with code - 1
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40 seconds
[INFO] Finished at: Mon Apr 06 17:18:00 BST 2009
[INFO] Final Memory: 19M/1012M
[INFO] ------------------------------------------------------------------------

If you copy pom.xml.2 over pom.xml and try it again, you get win32
libraries instead:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building maven-gwt-sample
[INFO]    task-segment: [clean,
com.totsp.gwt:maven-googlewebtoolkit2-plugin:gwt]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/tar
get
[INFO] Preparing gwt:gwt
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Compiling 6 source files to
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/tar
get/classes
[INFO] [dependency:unpack {execution: unpack}]
[INFO] Configured Artifact: com.google.gwt:gwt-dev:mac-libs:1.5.3:zip
[INFO] Unpacking
/Users/andrew/.m2/repository/com/google/gwt/gwt-dev/1.5.3/gwt-dev-1.5.3-mac-libs
.zipto
 /Users/andrew/.m2/repository/com/google/gwt/gwt-dev/1.5.3
with Includes null and excludes:null
[INFO] [gwt:gwt]
[INFO] source web.xml present -
/private/tmp/gwt-maven-read-only/maven-googlewebtoolkit2-plugin/simplesample/src
/main/webapp/WEB-INF/web.xml
- using it with embedded Tomcat
[INFO] establishing classpath list (buildClaspathList - scope = RUNTIME)
[INFO] google.webtoolkit.home (gwtHome) *not* set, using project POM for
GWT dependencies
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load
library:
/Users/andrew/.m2/repository/com/google/gwt/gwt-dev/1.5.3/libswt-win32-3235.dyli
b
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1651)
        at java.lang.Runtime.load0(Runtime.java:770)
        at java.lang.System.load(System.java:1005)
        at org.eclipse.swt.internal.Library.loadLibrary(Library.java:132)
        at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:18)
        at org.eclipse.swt.widgets.Display.<clinit>(Display.java:125)
        at com.google.gwt.dev.GWTShell.<clinit>(GWTShell.java:301)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Exception attempting to run script - run.sh

Embedded error: run.sh script exited abnormally with code - 1
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Mon Apr 06 17:19:53 BST 2009
[INFO] Final Memory: 15M/1012M
[INFO] ------------------------------------------------------------------------

What version of the product are you using? On what operating system?

Source checked out from trunk r1020, Mac OS X 10.4, SoyLatte 1.0.3 (i.e.
port of BSD JDK 6) soylatte16-i386-1.0.3, Maven 2.0.9

Please provide any additional information below.

I tried activating the Mac profile manually using mvn's -P option, no
difference.

Original issue reported on code.google.com by andrew.c...@gmail.com on 6 Apr 2009 at 4:26

Attachments:

GoogleCodeExporter commented 9 years ago
Forgive me if this is an ignorant question, but does GWT run outside of Maven 
using
Soy Latte?  I haven't tried it, just asking.  

Original comment by charlie....@gmail.com on 1 May 2009 at 3:16

GoogleCodeExporter commented 9 years ago
http://gavintech.blogspot.com/2008/02/mac-gwt-soylatte-java-16-unhappiness.html

I am not sure that's up to date, but everything I can find shows issues with 
SoyLatte
and GWT. If it works OUTSIDE of Maven, please let us know.  (But it seems like 
it
would not be related to Maven at all.)

Original comment by charlie....@gmail.com on 1 May 2009 at 3:31

GoogleCodeExporter commented 9 years ago
Actually we've gone back to using JDK 5 on that project as it's pretty 
self-contained
anyway. Sorry, I should have closed the issue but I completely forgot about it. 
We
only have one Mac-based developer and hopefully we'll get him upgraded to 
Leopard (or
Snow Leopard) soon and the problem will disappear.

Still vaguely curious why it tried to link GTK and/or Windows libs though, but 
it's
not important really :-) Thanks for your time and hard work!

Original comment by andrew.c...@gmail.com on 2 May 2009 at 11:37

GoogleCodeExporter commented 9 years ago
Ok, glad to hear it's not a stopper.  I have an old 32 bit Intel Mac as my main
traveling dev machine (so I use it once in a while, but not all the time, 
regular dev
machine is Linux desktop), and on that I was fortunate enough to have gotten 
Java 1.6
beta from Apple, and have just never "upgraded" every time it tells me to 
through the
installer (it wants to install an official Java 1.5 update).  Apple DID HAVE an
official Java 1.6 there for a few months, then they pulled it. In my case I 
haven't
tried Soy Latte, because I still have Apple 1.6 and it works fine for me, but 
Java
support on the 32 bit Intel macs sure is annoying. Venting now ;). 

Closing this issue too, not a priority for user, and trying to freeze this 
project.

Original comment by charlie....@gmail.com on 4 May 2009 at 7:47