General Actions:
<module> ... <servlet path="/WysiwygService" class="com.xpn.xwiki.wysiwyg.server.WysiwygServiceImpl" /> <entry-point class="com.xpn.xwiki.wysiwyg.client.Wysiwyg" /> ... </module>
<body> <script language="javascript" src="com.xpn.xwiki.wysiwyg.Wysiwyg.nocache.js"></script> <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe> ... </body>
<web-app> ... <servlet> <servlet-name>WysiwygService</servlet-name> <servlet-class>com.xpn.xwiki.wysiwyg.server.WysiwygServiceImpl</servlet-class> </servlet> ... <servlet-mapping> <servlet-name>WysiwygService</servlet-name> <url-pattern>/WysiwygService</url-pattern> </servlet-mapping> ... </web-app>
<project> ... <packaging>war</packaging> ... <properties> <gwtVersion>1.4.62</gwtVersion> <!-- update gwtHome or use the setup profile --> <gwtHome>/home/marius/apps/${gwtArtifactId}-${gwtVersion}</gwtHome> </properties> ... <dependencies> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-servlet</artifactId> <version>${gwtVersion}</version> </dependency> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-user</artifactId> <version>${gwtVersion}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-dev</artifactId> <version>${gwtVersion}</version> <classifier>${os}</classifier> <scope>provided</scope> </dependency> ... </dependencies> <build> <plugins> ... <plugin> <groupId>com.totsp.gwt</groupId> <artifactId>maven-googlewebtoolkit2-plugin</artifactId> <version>1.5.3-SNAPSHOT</version> <configuration> <runTarget>com.xpn.xwiki.wysiwyg.Wysiwyg/Wysiwyg.html</runTarget> <gwtHome>${gwtHome}</gwtHome> <compileTarget> <value>com.xpn.xwiki.wysiwyg.Wysiwyg</value> </compileTarget> </configuration> <executions> <execution> <goals> <goal>mergewebxml</goal><!-- needed by GWT hosted browser --> <goal>compile</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> <webResources> <resource> <directory>target</directory> <targetPath>WEB-INF</targetPath> <includes> <!-- generated by mergewebxml goal --> <include>web.xml</include> </includes> </resource> <resource> <!-- needed by GWT hosted browser --> <directory>src/main/java</directory> <targetPath>WEB-INF/sources</targetPath> <includes> <!-- we need only client java sources --> <include>com/xpn/xwiki/wysiwyg/client/**/*</include> </includes> </resource> </webResources> </configuration> </plugin> ... </plugins> </build> <profiles> <profile> <id>linux</id> <activation> <os> <name>linux</name> </os> </activation> <properties> <gwtArtifactId>gwt-linux</gwtArtifactId> <os>linux</os> </properties> </profile> ... </profiles> <repositories> <repository> <id>gwt-maven</id> <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>gwt-maven</id> <url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url> </pluginRepository> </pluginRepositories> </project>
$ mvn clean install
<project> ... <packaging>pom</packaging> ... <dependencies> <dependency> <groupId>com.xpn.xwiki.platform</groupId> <artifactId>xwiki-web-wysiwyg</artifactId> <version>${pom.version}</version> <type>war</type> </dependency> ... </dependencies> <build> <plugins> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptors> <descriptor>src/assemble/application-no-database.xml</descriptor> </descriptors> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
<assembly> <formats> <format>dir</format> </formats> ... <dependencySets> ... <dependencySet> <!-- This shouldn't be required but there's a bug in version 2.2-beta-1 of the Assembly plugin where the artifact name will be used instead of / if outputFileNameMapping is not specified --> <outputFileNameMapping></outputFileNameMapping> <includes> <include>com.xpn.xwiki.platform:xwiki-web-wysiwyg</include> </includes> <outputDirectory>webapps/xwiki</outputDirectory> <unpack>true</unpack> </dependencySet> ... </dependencySets> <files> ... <file> <source>${basedir}/src/main/resources/start_gwt_noserver_debug.sh</source> <fileMode>755</fileMode> </file> <file> <source>${basedir}/src/main/resources/start_gwt_noserver.sh</source> <fileMode>755</fileMode> </file> </files> ... </assembly>
#!/bin/bash APP_DIR=`dirname $0`/webapps/xwiki; JAVA32_HOME=/usr/lib/jvm/ia32-java-1.5.0-sun-1.5.0.13/bin; GWT_HOME=/home/marius/apps/gwt-linux-1.4.62; $JAVA32_HOME/java \ -Xmx1024m \ -cp $APP_DIR/WEB-INF/classes:\ $APP_DIR/WEB-INF/sources:\ $APP_DIR/WEB-INF/lib/xwiki-web-gwt-1.5-SNAPSHOT-sources.jar:\ $GWT_HOME/gwt-dev-linux.jar:\ $GWT_HOME/gwt-user.jar \ com.google.gwt.dev.GWTShell \ -logLevel WARN \ -style DETAILED \ -noserver \ -port 8080 \ -out $APP_DIR/com.xpn.xwiki.wysiwyg.Wysiwyg \ xwiki/com.xpn.xwiki.wysiwyg.Wysiwyg/Wysiwyg.html
#!/bin/bash APP_DIR=`dirname $0`/webapps/xwiki; JAVA32_HOME=/usr/lib/jvm/ia32-java-1.5.0-sun-1.5.0.13/bin; GWT_HOME=/home/marius/apps/gwt-linux-1.4.62; $JAVA32_HOME/java \ -Xmx1024m \ -Xdebug \ -Xnoagent \ -Djava.compiler=NONE \ -Xrunjdwp:transport=dt_socket,server=y,address=5006,suspend=y \ -cp $APP_DIR/WEB-INF/classes:\ $APP_DIR/WEB-INF/sources:\ $APP_DIR/WEB-INF/lib/xwiki-web-gwt-1.5-SNAPSHOT-sources.jar:\ $GWT_HOME/gwt-dev-linux.jar:\ $GWT_HOME/gwt-user.jar \ com.google.gwt.dev.GWTShell \ -logLevel WARN \ -style DETAILED \ -noserver \ -port 8080 \ -out $APP_DIR/com.xpn.xwiki.wysiwyg.Wysiwyg \ xwiki/com.xpn.xwiki.wysiwyg.Wysiwyg/Wysiwyg.html
$ mvn clean install -Pmysql
$1 ./start_xwiki.sh $2 ./start_gwt_noserver.sh
$1 ./start_xwiki_debug.sh $2 ./start_gwt_noserver_debug.sh