-
Notifications
You must be signed in to change notification settings - Fork 0
/
maven-notes
51 lines (40 loc) · 1.75 KB
/
maven-notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Create a new Java project
$ mvn archetype:generate
Generate maven project archetype for webapp:
$ mvn archetype:generate -DgroupId=com.oss \
-DartifactId=name-of-project \
-Dversion=1.0-SNAPSHOT \
-DarchetypeArtifactId=maven-archetype-webapp \
-DinteractiveMode=false
web.xml skeleton for Servlet 2.5 web application
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<display-name>Archetype Created Web Application</display-name>
</web-app>
How To Setup Tomcat:
(http://www.mkyong.com/maven/how-to-deploy-maven-based-war-file-to-tomcat/)
tomcat path: /usr/share/tomcat
maven path: /usr/share/maven
How to Start Tomcat on Fedora:
sudo systemctl enable tomcat.service
sudo systemctl start tomcat.service
How to Make Tomcat listen on Port 8089:
1. Edit /usr/share/tomcat/conf/server.xml
- edit "port" field in connector tag
<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1"
redirectPort="8443"/>
Install Tomcat manually following this guide:
http://www.davidghedini.com/pg/entry/install_tomcat_7_on_centos
- Location of java jdk:
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.31-3.b13.fc21.x86_64/jre/bin
Tomcat Service Commands:
sudo service tomcat start
sudo service tomcat stop
sudo service tomcat restart
URL for where Tomcat serves project:
http://localhost:8080/OAuth2v1
Maven command to run tomcat + deploy war package:
mvn tomcat:run