On Jan 11, 2009, at 3:54 PM, Marius Dumitru Florea wrote:
Vincent Massol wrote:
On Jan 11, 2009, at 12:52 PM, Anca Paula Luca wrote:
Marius Dumitru Florea wrote:
Hi Vincent,
vmassol (SVN) wrote:
Author: vmassol Date: 2009-01-10 20:34:28 +0100 (Sat, 10 Jan 2009) New Revision: 15295
Modified: platform/web/trunk/wysiwyg/pom.xml Log: Removing what seems to be unneeded stuff... On what basis?.. Both gwt-dev and gwt-dev-libs are needed, first because they contain the GWT compiler and second because they are required by the hosted browser when running and debugging the WYSIWYG in hosted mode. Then gwt-dev-libs needs to be unpacked. Have you tried to build the WYSIWYG with a fresh m2 repo after this change? Fresh repo build passes, I deleted all the gwt-dev related entries in the repo and ran it. The hosted mode run will not work any longer since it needs some libraries unpacked from the zip (that is debug + tests, if we ran any).
Since we don't do any hosted mode runs at build time, it's arguable if we need this setup in the pom in the default profile or not, but since debug is needed quite often and all debug related files and setups are committed, I'd say we keep this one too, and use maven magic to remove it from the default build.
Note also that it wasn't working under Eclipse.
It has nothing to do with Eclipse.
It has to do with m2eclipse (The maven embedder to be precise). settings.localRepository is not resolved so whenever I use Eclipse (with m2eclipse) I get a ${settings.localRepository} created. Since I kept getting this and since it was still working I assumed there was a problem in the build and removed it.
The hosted browser provided by GWT looks for needed libraries in m2 repo where gwt-dev-libs was unpacked. Now I can't run the WYSIWYG in hosted mode on a fresh repo:
marius@midnight:~/work/eclipse/enterprise/distribution/jetty/hsqldb/ target/xwiki-enterprise-jetty-hsqldb-1.8-SNAPSHOT$ ./start_wysiwyg_noserver.sh Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /home/marius/.m2/repository/com/google/gwt/gwt-dev/1.5.3/libswt-pi- gtk-3235.so at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1650) at java.lang.Runtime.load0(Runtime.java:769) at java.lang.System.load(System.java:968) 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)
Was the previous pom causing any problems? If so, were those problems blocking you that you couldn't wait till Monday to ask the person who wrote the pom?
Cool down Marius. We're all in the same boat. I was trying to fix something for you and do your work so I was doing you a favor. In my free time and during my weekend! :) Now I have no idea what hosted mode is. I only verified that the build kept working and it did so I was happy. Till I received your email this morning. If it's needed for that hosted mode then it needs to be added back for that hosted mode. As Anca said, this should be done in a profile since we probably don't want to lengthen the build (the download + the unzip every time) for all people not using that hosted mode. Note that it's a bad practice to unpack something in the local repository as it was done. The local repo should never be corrupted. I see it's in the instructions you gave but it doesn't make it better. Do you know why they're doing it this way? I guess what they want to do is unzip and install locally the files in the repo so that they can be used as dependencies of the maven gwt plugin is that it? If so we should probably use the install plugin (http://maven.apache.org/plugins/maven-install-plugin/install-file-mojo.html ). In any case I'm +1 to revert what I did (since I know now it's used for that hosted mode) but to put it in a hosted mode profile. Is that ok? Can you give more info on how you run that hosted mode? Also how do we currently differentiate hosted mode and not hosted mode when we run XE? Does that hosted mode means we get some jars or source files in XE's WEB-INF/lib that shouldn't be there? If so we need to use a profile so that they don't get there by error. Thanks -Vincent
See http://gwt-maven.googlecode.com/svn/docs/maven-googlewebtoolkit2-plugin/setu...
We have to revert.
Modified: platform/web/trunk/wysiwyg/pom.xml = ================================================================== --- platform/web/trunk/wysiwyg/pom.xml 2009-01-10 18:53:52 UTC (rev 15294) +++ platform/web/trunk/wysiwyg/pom.xml 2009-01-10 19:34:28 UTC (rev 15295) @@ -8,7 +8,7 @@ <artifactId>xwiki-web-wysiwyg</artifactId> <name>XWiki Platform - Web - WYSIWYG</name> <packaging>war</packaging> - <description>XWiki's What You See Is What You Get editor</ description> + <description>XWiki's GWT WYSIWYG editor</description> <dependencies> <dependency> <groupId>com.google.gwt</groupId> @@ -27,21 +27,8 @@ <groupId>com.google.gwt</groupId> <artifactId>gwt-dev</artifactId> <version>${gwtVersion}</version> - <classifier>${platform}-libs</classifier> - <type>zip</type> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-dev</artifactId> - <version>${gwtVersion}</version> <classifier>${platform}</classifier> <scope>provided</scope> - <!-- We load this library this way because GWT looks for SWT libraries in the same folder --> - <!-- - <scope>system</scope> - <systemPath>${settings.localRepository}/com/google/gwt/ gwt-dev/${gwtVersion}/gwt-dev-${platform}.jar</systemPath> - --> </dependency> <dependency> <groupId>com.google.gwt</groupId> @@ -116,35 +103,8 @@ </dependencies> <build> <plugins> - <!-- Download and unpack the GWT libs --> <plugin> <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>unzip-gwt-libs</id> - <phase>compile</phase> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-dev</artifactId> - <version>${gwtVersion}</version> - <classifier>${platform}-libs</classifier> - <type>zip</type> - <overWrite>false</overWrite> - </artifactItem> - </artifactItems> - <outputDirectory>${settings.localRepository}/com/ google/gwt/gwt-dev/${gwtVersion}</outputDirectory> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <executions> <execution> @@ -287,12 +247,6 @@ </properties> </profile> </profiles> - <repositories> - <repository> - <id>ibiblio</id> - <url>http://mirrors.ibiblio.org/pub/mirrors/maven2</url> - </repository> - </repositories> <pluginRepositories> <pluginRepository> <id>gwt-maven</id>