java - How to update gwt-maven-plugin Archetype? -


i create maven managed gwt project eclipse ide.

i using gwt 2.7. when create project file > new > maven project , choose gwt archetype , please find image below -

enter image description here

the version 2.1.0-1 , generated pom.xml gwt version 2.1. how can update org.codehaus.mojo archetype ? or can setup generate gwt version ?

edit: generated pom.xml below using gwt 2.7

<?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"   xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">    <!-- pom file generated gwt webappcreator -->   <modelversion>4.0.0</modelversion>   <groupid>com.my.test</groupid>   <artifactid>testinggwt</artifactid>   <packaging>war</packaging>   <version>0.0.1-snapshot</version>   <name>gwt maven archetype</name>    <properties>     <!-- convenience property set gwt version -->     <gwtversion>2.1.0</gwtversion>     <!-- gwt needs @ least java 1.5 -->     <maven.compiler.source>1.5</maven.compiler.source>     <maven.compiler.target>1.5</maven.compiler.target>     <webappdirectory>${project.build.directory}/${project.build.finalname}</webappdirectory>   </properties>    <dependencies>     <dependency>       <groupid>com.google.gwt</groupid>       <artifactid>gwt-servlet</artifactid>       <version>2.1.0</version>       <scope>runtime</scope>     </dependency>     <dependency>       <groupid>com.google.gwt</groupid>       <artifactid>gwt-user</artifactid>       <version>2.1.0</version>       <scope>provided</scope>     </dependency>       <dependency>       <groupid>junit</groupid>       <artifactid>junit</artifactid>       <version>4.7</version>       <scope>test</scope>     </dependency>   </dependencies>    <build>     <!-- generate compiled stuff in folder used developing mode -->     <outputdirectory>${webappdirectory}/web-inf/classes</outputdirectory>      <plugins>        <!-- gwt maven plugin -->       <plugin>         <groupid>org.codehaus.mojo</groupid>         <artifactid>gwt-maven-plugin</artifactid>         <version>2.1.0-1</version>         <executions>           <execution>             <goals>               <goal>compile</goal>               <goal>test</goal>               <goal>i18n</goal>               <goal>generateasync</goal>             </goals>           </execution>         </executions>         <!-- plugin configuration. there many available options, see gwt-maven-plugin            documentation @ codehaus.org -->         <configuration>           <runtarget>testinggwt.html</runtarget>           <hostedwebapp>${webappdirectory}</hostedwebapp>           <i18nmessagesbundle>com.my.test.testinggwt.client.messages</i18nmessagesbundle>         </configuration>       </plugin>        <!-- copy static web files before executing gwt:run -->       <plugin>         <groupid>org.apache.maven.plugins</groupid>         <artifactid>maven-war-plugin</artifactid>         <version>2.1.1</version>         <executions>           <execution>             <phase>compile</phase>             <goals>               <goal>exploded</goal>             </goals>           </execution>         </executions>         <configuration>           <webappdirectory>${webappdirectory}</webappdirectory>         </configuration>       </plugin>      </plugins>   </build>  </project> 

ps : please don't suggest edit pom.xml file after generated.

it looks archetype catalog out of date in eclipse. don't know how update (i don't know how maven outside of eclipse), easy workaround use add archetype… button add org.codehaus.mojo:gwt-maven-plugin:2.7.0.


that being said, despite 2.7.0 archetype being better 2.1.0 one, don't recommend using except small one-off experiments or bug repro cases.
project expect maintain , grow in medium/long term, advise use separate maven modules client-side , server-side code. built archetypes multi-module setup: https://github.com/tbroyer/gwt-maven-archetypes; see announcement here. note don't use org.codehaus.mojo plugin.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -