Hi Guys,
Here I am going to show you the steps to configure J2EE maven project in Eclipse on Linux system:
I hope you are little bit aware of Maven and how to create a simple J2EE project in Maven.
1. Install jdk in your system.
2. Install maven in your system.
3. To configure maven, download maven tar ball and extract it in /usr/local folder.
4. set JAVA_HOME & MAVEN_HOME environment variables in your .bash_profile file.
Steps:
1. login as root user
2. vi ~/.bash_profile
3. add following lines in it:
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0
export PATH=$JAVA_HOME/bin:$PATH
export M2_HOME=/usr/local/apache-maven-3.1.1
export PATH=$M2_HOME/bin:$PATH
4. After adding the .bash_profile file, save and execute it to take it effect.
COMMAND: source ~/.bash_profile
5. Add Maven plugIn in your eclipse IDE.
6. Go to Windows > Preferences > Maven Installation.
7. Add your local maven installation path over there. After that, it will update indexes. Let it finish.
8. Now, you are ready with maven installation.
9. To create new Maven project, Go to File> New> Maven> Maven Project. Create J2EE project with following artifact Id an group Id:
artifact id: webapp-j2ee14
group id: org.codehaus.mojo.archetypes
OR import existing project as maven project.
10. If you are deploying your web application on Tomcat and if you want to debug your project then refer:
http://opensourcetechno.blogspot.in/2013/08/war-file-hot-deployment-issue-with.html
http://opensourcetechno.blogspot.in/2012/11/remote-debug-on-tomcat-server-with-ant.html
11. When you deploy your web application, you may come accross "Permgen Space" exception on Tomcat Console. To resolve this, open your catalina.sh file (location: <tomcat_home>/bin/) and make this entry for JAVA_OPTS.
JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m
-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m
-XX:MaxPermSize=256m -XX:+DisableExplicitGC"
That's it...!!!
Please let me know if you face any issue while following this steps.
Happy Coding..!!
:)
Here I am going to show you the steps to configure J2EE maven project in Eclipse on Linux system:
I hope you are little bit aware of Maven and how to create a simple J2EE project in Maven.
1. Install jdk in your system.
2. Install maven in your system.
3. To configure maven, download maven tar ball and extract it in /usr/local folder.
4. set JAVA_HOME & MAVEN_HOME environment variables in your .bash_profile file.
Steps:
1. login as root user
2. vi ~/.bash_profile
3. add following lines in it:
export JAVA_HOME=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0
export PATH=$JAVA_HOME/bin:$PATH
export M2_HOME=/usr/local/apache-maven-3.1.1
export PATH=$M2_HOME/bin:$PATH
4. After adding the .bash_profile file, save and execute it to take it effect.
COMMAND: source ~/.bash_profile
5. Add Maven plugIn in your eclipse IDE.
6. Go to Windows > Preferences > Maven Installation.
7. Add your local maven installation path over there. After that, it will update indexes. Let it finish.
8. Now, you are ready with maven installation.
9. To create new Maven project, Go to File> New> Maven> Maven Project. Create J2EE project with following artifact Id an group Id:
artifact id: webapp-j2ee14
group id: org.codehaus.mojo.archetypes
OR import existing project as maven project.
10. If you are deploying your web application on Tomcat and if you want to debug your project then refer:
http://opensourcetechno.blogspot.in/2013/08/war-file-hot-deployment-issue-with.html
http://opensourcetechno.blogspot.in/2012/11/remote-debug-on-tomcat-server-with-ant.html
11. When you deploy your web application, you may come accross "Permgen Space" exception on Tomcat Console. To resolve this, open your catalina.sh file (location: <tomcat_home>/bin/) and make this entry for JAVA_OPTS.
JAVA_OPTS="-Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m
-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m
-XX:MaxPermSize=256m -XX:+DisableExplicitGC"
That's it...!!!
Please let me know if you face any issue while following this steps.
Happy Coding..!!
:)
No comments:
Post a Comment