Using Maven to create EJB project on Weblogic 12.2.1

Datetime:2016-08-23 01:57:24          Topic: EJB           Share

First setup Maven for Oracle Weblogic plugin - http://danielveselka.blogspot.com/2016/01/using-maven-on-weblogic-1221-with-java.html 

Building Java EE Projects for WebLogic Server with Maven

http://docs.oracle.com/middleware/1221/core/MAVEN/weblogic_maven.htm#MAVEN8803

Create project from archetype

[dave@localhost weblogic]$ mvn archetype:generate -DarchetypeGroupId=com.oracle.weblogic.archetype -DarchetypeArtifactId=basic-webapp-ejb -DarchetypeVersion=12.2.1-0-0 -DgroupId=dave -DartifactId=dave-basic-webapp-ejb-project -Dversion=1.0-SNAPSHOT
[INFO] Generating project in Interactive mode
[INFO] Archetype repository missing. Using the one from [com.oracle.weblogic.archetype:basic-webapp-ejb:12.2.1-0-0] found in catalog local
[INFO] Using property: groupId = dave
[INFO] Using property: artifactId = dave-basic-webapp-ejb-project
[INFO] Using property: version = 1.0-SNAPSHOT
[INFO] Using property: package = dave
Confirm properties configuration:
groupId: dave
artifactId: dave-basic-webapp-ejb-project
version: 1.0-SNAPSHOT
package: dave
 Y: : 
[INFO] ----------------------------------------------------------------------------
[INFO] Using following parameters for creating project from Archetype: basic-webapp-ejb:12.2.1-0-0
[INFO] ----------------------------------------------------------------------------
[INFO] Parameter: groupId, Value: dave
[INFO] Parameter: artifactId, Value: dave-basic-webapp-ejb-project
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: package, Value: dave
[INFO] Parameter: packageInPathFormat, Value: dave
[INFO] Parameter: package, Value: dave
[INFO] Parameter: version, Value: 1.0-SNAPSHOT
[INFO] Parameter: groupId, Value: dave
[INFO] Parameter: artifactId, Value: dave-basic-webapp-ejb-project
[INFO] project created from Archetype in dir: /home/dave/git/weblogic/dave-basic-webapp-ejb-project
[dave@localhost weblogic]$ find
.
./dave-basic-webapp-ejb-project
./dave-basic-webapp-ejb-project/pom.xml
./dave-basic-webapp-ejb-project/src
./dave-basic-webapp-ejb-project/src/main
./dave-basic-webapp-ejb-project/src/main/webapp
./dave-basic-webapp-ejb-project/src/main/webapp/css
./dave-basic-webapp-ejb-project/src/main/webapp/css/bootstrap.css
./dave-basic-webapp-ejb-project/src/main/webapp/index.xhtml
./dave-basic-webapp-ejb-project/src/main/webapp/WEB-INF
./dave-basic-webapp-ejb-project/src/main/webapp/WEB-INF/web.xml
./dave-basic-webapp-ejb-project/src/main/webapp/WEB-INF/beans.xml
./dave-basic-webapp-ejb-project/src/main/webapp/template.xhtml
./dave-basic-webapp-ejb-project/src/main/resources
./dave-basic-webapp-ejb-project/src/main/resources/META-INF
./dave-basic-webapp-ejb-project/src/main/resources/META-INF/persistence.xml
./dave-basic-webapp-ejb-project/src/main/java
./dave-basic-webapp-ejb-project/src/main/java/dave
./dave-basic-webapp-ejb-project/src/main/java/dave/entity
./dave-basic-webapp-ejb-project/src/main/java/dave/entity/Account.java
./dave-basic-webapp-ejb-project/src/main/java/dave/service
./dave-basic-webapp-ejb-project/src/main/java/dave/service/AccountManagerImpl.java
./dave-basic-webapp-ejb-project/src/main/java/dave/service/AccountManager.java
./dave-basic-webapp-ejb-project/src/main/java/dave/service/AccountBean.java
./dave-basic-webapp-ejb-project/src/main/java/dave/interceptor
./dave-basic-webapp-ejb-project/src/main/java/dave/interceptor/OnDeposit.java
./dave-basic-webapp-ejb-project/src/main/java/dave/interceptor/LogInterceptor.java
./dave-basic-webapp-ejb-project/src/main/scripts
./dave-basic-webapp-project
./dave-basic-webapp-project/pom.xml
./dave-basic-webapp-project/src
./dave-basic-webapp-project/src/main
./dave-basic-webapp-project/src/main/webapp
./dave-basic-webapp-project/src/main/webapp/css
./dave-basic-webapp-project/src/main/webapp/css/bootstrap.css
./dave-basic-webapp-project/src/main/webapp/index.xhtml
./dave-basic-webapp-project/src/main/webapp/WEB-INF
./dave-basic-webapp-project/src/main/webapp/WEB-INF/web.xml
./dave-basic-webapp-project/src/main/webapp/WEB-INF/beans.xml
./dave-basic-webapp-project/src/main/webapp/template.xhtml
./dave-basic-webapp-project/src/main/java
./dave-basic-webapp-project/src/main/java/dave
./dave-basic-webapp-project/src/main/java/dave/AccountBean.java

Start Weblogic console using http://localhost:7001/console/

Check what is the Context Root in Deployments section:  /basicWebappEjb

Connect to application using http://localhost:7001/basicWebappEjb/





About List