diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1c8f4ec --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 Justin Beall + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..cc35950 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +[![Build Status](https://travis-ci.org/DEV3L/mvn-hello-world-web-app.png)](https://travis-ci.org/DEV3L/mvn-hello-world-web-app) + +# mvn-hello-world-web-app +Java Hello World web application created using maven-archetype-webapp + +## Blog Post Reference +https://softwaredev3loper.wordpress.com/2016/02/17/from-zero-to-continuous-delivery/ + +## Dependancies +* git +* maven +* tomcat + +## Eclipse Project setup +* Use git clone to pull project into workspace directory + * git clone https://github.com/DEV3L/mvn-hello-world-web-app.git +* Use maven to resolve Eclipse dependencies + * mvn eclipse:eclipse +* Import 'mvn-hello-world-web-app' as existing project into Eclipse +* Use maven to run integration tests and install + * mvn clean install diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..a67b626 --- /dev/null +++ b/pom.xml @@ -0,0 +1,59 @@ + + + 4.0.0 + com.dev3l.hello_world + rakesh.java.jenkins + war + 1.0-SNAPSHOT + mvn-hello-world Maven Webapp + http://maven.apache.org + + + javax.servlet + servlet-api + 2.5 + + + + junit + junit + 4.12 + test + + + + org.apache.logging.log4j + log4j-api + 2.5 + + + org.apache.logging.log4j + log4j-core + 2.5 + + + + rakesh.java.jenkins + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + + + + + org.apache.maven.plugins + maven-war-plugin + 2.4 + + false + + + + + diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..9f88c1f --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,7 @@ + + + + Archetype Created Web Application + diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp new file mode 100644 index 0000000..30469d9 --- /dev/null +++ b/src/main/webapp/index.jsp @@ -0,0 +1,17 @@ + + + + + Welcome to Jenkins autodeployment + + + +
+

Welcome to

+ Spidertocat +

My first job build sucessful with Jenkins

+

Happy To Learn Devops...

+
+ + diff --git a/src/test/java/com/dev3l/hello_world/test/ExampleTest.java b/src/test/java/com/dev3l/hello_world/test/ExampleTest.java new file mode 100644 index 0000000..6ce989a --- /dev/null +++ b/src/test/java/com/dev3l/hello_world/test/ExampleTest.java @@ -0,0 +1,11 @@ +package com.dev3l.hello_world.test; + +import org.junit.Assert; +import org.junit.Test; + +public class ExampleTest { + @Test + public void exampleTest() { + Assert.assertTrue(true); + } +} diff --git a/src/test/resources/log4j2.xml b/src/test/resources/log4j2.xml new file mode 100644 index 0000000..4094bfc --- /dev/null +++ b/src/test/resources/log4j2.xml @@ -0,0 +1,28 @@ + + + + ./log + WARNING + + + + + + + + + + + + + + + + + + + + + + +