Without Dependencies to GWT-Custom Classes How to use this template:
<?xml version="1.0" encoding="UTF-8"?> <!-- Template: https://sites.google.com/site/eclipsemaven/gwt-logic (without GWT custom classes) --> <project> <groupId>[XXX]</groupId> <artifactId>[XXX]</artifactId> <version>[XXX]</version> <properties> <gwtVersion>2.2.0</gwtVersion> <module.draftCompile>true</module.draftCompile> <module.importedPackages> * </module.importedPackages> <module.exportedPackages>![XXX].internal*,[XXX]* </module.exportedPackages> <module.serviceDefinitions> </module.serviceDefinitions> </properties> <!-- Dependent Modules --> <dependencies> <!-- Add your dependencies - they must be defined in the same eclipse workspace as this project --> <!-- only for gwt maven plugin!!! --> <dependency> <groupId>com.google.gwt</groupId> <artifactId>gwt-user</artifactId> <version>${gwtVersion}</version> <scope>provided</scope> </dependency> </dependencies> <!-- XXXXXXXXXXXXXX Maven declarations XXXXXXXXXXXXXXXXXX --> <modelVersion>4.0.0</modelVersion> <name>${project.artifactId}</name> <packaging>bundle</packaging> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <!-- FOR BUNDLE MANAGEMENT --> <!-- The Maven bundle plugin generates Meta-data required for OSGi --> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <extensions>true</extensions> <version>2.2.0</version> <configuration> <instructions> <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName> <Bundle-Version>${project.version}</Bundle-Version> <Import-Package>${module.importedPackages}</Import-Package> <Export-Package>${module.exportedPackages}</Export-Package> <Service-Component>${module.serviceDefinitions} </Service-Component> <Bundle-RequiredExecutionEnvironment>JavaSE-1.6 </Bundle-RequiredExecutionEnvironment> </instructions> </configuration> </plugin> <!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXX --> <!-- For GWT --> <!-- XXXXXXXXXXXXXXXXXXXXXXXXXXXXX --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> <version>2.2.0</version> <configuration> <draftCompile>${module.draftCompile}</draftCompile> <logLevel>INFO</logLevel> <validateOnly>true</validateOnly> <gwtVersion>${gwtVersion}</gwtVersion> <webappDirectory>${basedir}/src/main/webapp</webappDirectory> </configuration> <executions> <execution> <id>gwtcompile</id> <phase>prepare-package</phase> <goals> <goal>compile</goal> </goals> </execution> </executions> </plugin> <!-- FOR MAVEN ECLIPSE PLUGIN --> <!-- Dependency Plugin used to copy the dependency JARs into the root project folder. There the Maven eclipse plugin will add them to the classpath of PDE projects. --> <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>copy-dependencies</id> <phase>process-sources</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${basedir}</outputDirectory> <overWriteReleases>false</overWriteReleases> <overWriteSnapshots>false</overWriteSnapshots> <overWriteIfNewer>true</overWriteIfNewer> </configuration> </execution> </executions> </plugin> <!-- Cleanup necessary because of PDE tweaks, clear the project directory --> <plugin> <artifactId>maven-clean-plugin</artifactId> <version>2.3</version> <configuration> <filesets> <fileset> <directory>${basedir}</directory> <includes> <include>*.jar</include> </includes> <followSymlinks>false</followSymlinks> </fileset> </filesets> </configuration> </plugin> <!-- Keep the MANIFEST.MF used by eclipse in sync with the MANIFEST.MF created by the maven bundle plugin --> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <delete file="${basedir}/META-INF/MANIFEST.MF" /> <copy file="target/classes/META-INF/MANIFEST.MF" tofile="${basedir}/META-INF/MANIFEST.MF" /> </tasks> </configuration> </execution> </executions> </plugin> </plugins> <!-- RESOURCES --> <resources> <!-- Required to be valid GWT Library (requires *.java files in jar) --> <resource> <directory>src/main/java</directory> <includes> <include>**/*.java</include> <include>**/*.gwt.xml</include> </includes> </resource> <!-- This entry makes sure that resources, which lie in the same package as Java classes, are copied into the target. Often external libraries require resources, which are loaded using Class.getResource or Class.getResourceAsStream and which are in a subpackage of the class. For instance, the NetBeans template for the Swing Application Framework does so. --> <resource> <filtering>false</filtering> <directory>src/main/java</directory> <includes> <include>**</include> </includes> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> <!-- This entry makes sure component definitions for OSGi declarative services are copied into the destination --> <resource> <targetPath>OSGI-INF</targetPath> <filtering>false</filtering> <directory>OSGI-INF</directory> <includes> <include>**</include> </includes> </resource> <!-- I really do not know why know a manual entry for src/main/resources is necessary? It should be included following the Maven convention. --> <resource> <filtering>false</filtering> <directory>src/main/resources</directory> <includes> <include>**</include> </includes> </resource> </resources> </build> </project> DummyEntryPoint.java public class DummyEntryPoint { public void onModuleLoad() { } } [YourModuleName].gwt.xml <?xml version="1.0" encoding="UTF-8"?> <module rename-to='[XXX eg mymodulename]'> <!-- Inherit the core Web Toolkit stuff. --> <inherits name='com.google.gwt.user.User' /> <!-- Other module inherits --> <!-- <inherits name='com.yourproject.DependentModule'></inherits> --> <!-- Specify the app entry point class. --> <entry-point class='[XXX].internal.DummyEntryPoint' /> <!-- Specify the paths for translatable code --> <source path='' /> </module> |