You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by Apache Wiki <wi...@apache.org> on 2009/04/16 17:10:25 UTC
[Db-derby Wiki] Trivial Update of "DerbyOnTomcatWithSpringHibernate" by
JoonasKoivunen
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.
The following page has been changed by JoonasKoivunen:
http://wiki.apache.org/db-derby/DerbyOnTomcatWithSpringHibernate
The comment on the change is:
Removed generic maven javac mumble, replaced with link to more covering article.
------------------------------------------------------------------------------
* Artifact id: '''exproject'''
* Packaging: '''pom'''
- After a while you'll got yourself a new project; quickly add the two modules (exproject-core, exproject-webapp) to it by selecting the "exproject" in Project Explorer, selecting "Maven > New Maven Module Project" from the context menu. Fill the wizard as mentioned above but use packaging "jar" for exproject-core and packaging "war" for exproject-webapp.
+ After a while you'll got yourself a new project; quickly add the two modules (exproject-core, exproject-webapp) to it by selecting the "exproject" in Project Explorer, selecting "Maven > New Maven Module Project" from the context menu. Fill the wizard as mentioned above but use packaging '''jar''' for exproject-core and packaging '''war''' for exproject-webapp.
==== Post processing ====
By default the pom -files have explicit versions on each; however I've found it easier to have the modules inherit the version numbers. You can accomplish this by removing version -elements straight under the project -element (not under the parent -element!).
+ If you want to use generics in your project you need to configure the java compiler plugin used by maven. One example can be found at near bottom of [http://www.javaworld.com/javaworld/jw-12-2005/jw-1205-maven.html?page=3 page three of JavaWorld's Maven 2 Introduction] article.
- If you want to use generics in your project you should add this snippet into your exproject/pom.xml file:
- {{{
- <project ...>
- <!-- omitted for clarity, snip here -->
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <inherited>true</inherited>
- <configuration>
- <!-- set the output classfiles to require Java6 runtime, you can also use 1.5 here -->
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </project>
- }}}
==== Adding dependencies ====