forked from yankils/hello-world
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
393 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Pull base image | ||
From tomcat:8-jre8 | ||
|
||
# Maintainer | ||
MAINTAINER "[email protected]" | ||
COPY ./webapp.war /usr/local/tomcat/webapps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Hello World | ||
# maven-project | ||
|
||
This is a simple java web application to desplay hello world text in the browser | ||
Simple Maven Project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,220 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<groupId>com.example.maven-project</groupId> | ||
<artifactId>maven-project</artifactId> | ||
<packaging>pom</packaging> | ||
<version>1.0-SNAPSHOT</version> | ||
<name>Maven Project</name> | ||
<description>Sample Maven project with a working, deployable site.</description> | ||
<url>http://www.example.com</url> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>utf-8</project.reporting.outputEncoding> | ||
</properties> | ||
|
||
<modules> | ||
<module>server</module> | ||
<module>webapp</module> | ||
</modules> | ||
|
||
<distributionManagement> | ||
<site> | ||
<id>site-server</id> | ||
<name>Test Project Site</name> | ||
<url>file:///tmp/maven-project-site</url> | ||
</site> | ||
</distributionManagement> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-release-plugin</artifactId> | ||
<configuration> | ||
<autoVersionSubmodules>true</autoVersionSubmodules> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-site-plugin</artifactId> | ||
<configuration> | ||
<reportPlugins> | ||
<plugin> | ||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-jxr-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-pmd-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-surefire-report-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>findbugs-maven-plugin</artifactId> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>taglist-maven-plugin</artifactId> | ||
</plugin> | ||
</reportPlugins> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
|
||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-checkstyle-plugin</artifactId> | ||
<version>2.8</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.3.2</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<version>2.8</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-jxr-plugin</artifactId> | ||
<version>2.3</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-pmd-plugin</artifactId> | ||
<version>2.6</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-project-info-reports-plugin</artifactId> | ||
<version>2.4</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-release-plugin</artifactId> | ||
<version>2.2.1</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>2.5</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-site-plugin</artifactId> | ||
<version>3.0</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-surefire-report-plugin</artifactId> | ||
<version>2.11</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>2.11</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>findbugs-maven-plugin</artifactId> | ||
<version>2.3.3</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>taglist-maven-plugin</artifactId> | ||
<version>2.4</version> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.mortbay.jetty</groupId> | ||
<artifactId>jetty-maven-plugin</artifactId> | ||
<version>8.0.0.M1</version> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>servlet-api</artifactId> | ||
<version>2.5</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>javax.servlet.jsp</groupId> | ||
<artifactId>jsp-api</artifactId> | ||
<version>2.2</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit-dep</artifactId> | ||
<version>4.10</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-core</artifactId> | ||
<version>1.2.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-library</artifactId> | ||
<version>1.2.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>1.8.5</version> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<scm> | ||
<connection>scm:git:[email protected]:jleetutorial/maven-project.git</connection> | ||
<developerConnection>scm:git:[email protected]:jleetutorial/maven-project.git</developerConnection> | ||
<tag>HEAD</tag> | ||
<url>http://github.com/jleetutorial/maven-project</url> | ||
</scm> | ||
|
||
<prerequisites> | ||
<maven>3.0.3</maven> | ||
</prerequisites> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.example.maven-project</groupId> | ||
<artifactId>maven-project</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>server</artifactId> | ||
<packaging>jar</packaging> | ||
<name>Server</name> | ||
<description>Logic.</description> | ||
|
||
<build> | ||
<finalName>${project.artifactId}</finalName> | ||
</build> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit-dep</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-library</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.example; | ||
|
||
/** | ||
* This is a class. | ||
*/ | ||
public class Greeter { | ||
|
||
/** | ||
* This is a constructor. | ||
*/ | ||
public Greeter() { | ||
|
||
} | ||
|
||
//TODO: Add javadoc comment | ||
public String greet(String someone) { | ||
return String.format("Hello, %s!", someone); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Headline | ||
|
||
Content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.example; | ||
|
||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
import static org.hamcrest.CoreMatchers.is; | ||
import static org.hamcrest.Matchers.greaterThan; | ||
import static org.junit.Assert.assertThat; | ||
import static org.junit.matchers.JUnitMatchers.containsString; | ||
|
||
public class TestGreeter { | ||
|
||
private Greeter greeter; | ||
|
||
@Before | ||
public void setup() { | ||
greeter = new Greeter(); | ||
} | ||
|
||
@Test | ||
public void greetShouldIncludeTheOneBeingGreeted() { | ||
String someone = "World"; | ||
|
||
assertThat(greeter.greet(someone), containsString(someone)); | ||
} | ||
|
||
@Test | ||
public void greetShouldIncludeGreetingPhrase() { | ||
String someone = "World"; | ||
|
||
assertThat(greeter.greet(someone).length(), is(greaterThan(someone.length()))); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>com.example.maven-project</groupId> | ||
<artifactId>maven-project</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>webapp</artifactId> | ||
<packaging>war</packaging> | ||
<name>Webapp</name> | ||
<description>Webapp.</description> | ||
|
||
<build> | ||
<finalName>${project.artifactId}</finalName> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.mortbay.jetty</groupId> | ||
<artifactId>jetty-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>servlet-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>javax.servlet.jsp</groupId> | ||
<artifactId>jsp-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
Oops, something went wrong.