paulwong

用MAVEN搭建JAVAEE5项目架构

Installation

Step 1 (download):

Download the file javaee5-maven-archetype-1.0.jar

Step 2 (install in local repo):

Run:

mvn install:install-file -Dfile=javaee5-maven-archetype-1.0.jar -DgroupId=pl.piotrsorobka.maven -DartifactId=javaee5-maven-archetype -Dversion=1.0 -Dpackaging=jar -DgeneratePom=true

Using the archetype

Run:

mvn archetype:create -DarchetypeGroupId=pl.piotrsorobka.maven -DarchetypeArtifactId=javaee5-maven-archetype -DarchetypeVersion=1.0 -DgroupId=your.group.id -DartifactId=project-name

Deploy on Glassfish

Step 1:

Set environment variable GLASSFISH_HOME, pointing to your Glassfish installation folder. Alternatively, point <glassfishDirectory></glassfishDirectory> in your main pom.xml to your Glassfish installation folder.

Step 2:

Inside your project main folder run:

mvn clean install

and after:

mvn -f ear/pom.xml glassfish:deploy

If your Glassfish settings are default it will deploy the ear.

posted on 2011-11-25 00:34 paulwong 阅读(1337) 评论(0)  编辑  收藏 所属分类: EJB3


只有注册用户登录后才能发表评论。


网站导航: