You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Muhammad Gelbana <m....@gmail.com> on 2012/10/11 12:40:43 UTC

Adjusting tapestry archtype for java 6

Since I don't know much about maven and how it works, I;m not sure if this
is something I can handle from my side.

I create a new tapestry project\module using this command:

> mvn archetype:generate -DarchetypeCatalog=http://tapestry.apache.org-DgroupId=com.mypackage -DartifactId=Project-Directory
> -DarchetypeVersion=5.3.5 -Dversion=1.0


Then I convert the project to an eclipse project using this command:

> mvn eclipse:eclipse


But then I face this warning which indicates that I have to manually
reconfigure the project settings from using java5 to java6 !

> [WARNING] Workspace defines a VM that does not contain a valid
> jre/lib/rt.jar: C:\Java\jre6
> [INFO] Adding default classpath container:
> org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5


First I had one issue which was that eclipse is pointing to java's jre
instead of the jdk, and then I had to edit the pom to force maven to create
the .classpath file in way that it points to java6:

> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
>  <source>1.6</source>

 <target>1.6</target>
> </configuration>
> </plugin>


Would someone please add that to the archtype's pom ?

Re: Adjusting tapestry archtype for java 6

Posted by Thiago H de Paula Figueiredo <th...@gmail.com>.
On Thu, 11 Oct 2012 07:50:40 -0300, Lance Java <la...@googlemail.com>  
wrote:

> Try the m2eclipse eclipse plugin http://www.sonatype.org/m2eclipse
> It keeps your eclipse project in sync with your pom.xml so no need for  
> "mvn eclipse:eclipse"

Agreed. m2eclipse (now called m2e) is now provided as out-of-the-box in  
Eclipse and works very well, having improved an awful lot from the past.

Answering the original question, see the documentation of the maven  
compiler plugin. In its configuration in your pom.xml, you can specify  
which Java compiler version should be used.

-- 
Thiago H. de Paula Figueiredo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Adjusting tapestry archtype for java 6

Posted by Lance Java <la...@googlemail.com>.
Try the m2eclipse eclipse plugin http://www.sonatype.org/m2eclipse
It keeps your eclipse project in sync with your pom.xml so no need for "mvn
eclipse:eclipse"



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Adjusting-tapestry-archtype-for-java-6-tp5716776p5716777.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org