forked from LandmarkTechnology/maven-web-application
-
Notifications
You must be signed in to change notification settings - Fork 568
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
0 parents
commit 61ab8f8
Showing
10 changed files
with
332 additions
and
0 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,3 @@ | ||
FROM tomcat:8.0.20-jre8 | ||
# Dummy text to test | ||
COPY target/maven-web-application*.war /usr/local/tomcat/webapps/maven-web-application.war |
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,54 @@ | ||
node | ||
{ | ||
|
||
def mavenHome = tool name: "maven3.6.2" | ||
|
||
echo "GitHub BranhName ${env.BRANCH_NAME}" | ||
echo "Jenkins Job Number ${env.BUILD_NUMBER}" | ||
echo "Jenkins Node Name ${env.NODE_NAME}" | ||
|
||
echo "Jenkins Home ${env.JENKINS_HOME}" | ||
echo "Jenkins URL ${env.JENKINS_URL}" | ||
echo "JOB Name ${env.JOB_NAME}" | ||
|
||
properties([[$class: 'JiraProjectProperty'], buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '2', daysToKeepStr: '', numToKeepStr: '2')), pipelineTriggers([pollSCM('* * * * *')])]) | ||
|
||
stage("CheckOutCodeGit") | ||
{ | ||
git branch: 'development', credentialsId: '65fb834f-a83b-4fe7-8e11-686245c47a65', url: 'https://github.com/MithunTechnologiesDevOps/maven-web-application.git' | ||
} | ||
|
||
stage("Build") | ||
{ | ||
sh "${mavenHome}/bin/mvn clean package" | ||
} | ||
|
||
/* | ||
stage("ExecuteSonarQubeReport") | ||
{ | ||
sh "${mavenHome}/bin/mvn sonar:sonar" | ||
} | ||
stage("UploadArtifactsintoNexus") | ||
{ | ||
sh "${mavenHome}/bin/mvn deploy" | ||
} | ||
stage("DeployAppTomcat") | ||
{ | ||
sshagent(['423b5b58-c0a3-42aa-af6e-f0affe1bad0c']) { | ||
sh "scp -o StrictHostKeyChecking=no target/maven-web-application.war [email protected]:/opt/apache-tomcat-9.0.34/webapps/" | ||
} | ||
} | ||
stage('EmailNotification') | ||
{ | ||
mail bcc: '[email protected]', body: '''Build is over | ||
Thanks, | ||
Mithun Technologies, | ||
9980923226.''', cc: '[email protected]', from: '', replyTo: '', subject: 'Build is over!!', to: '[email protected]' | ||
} | ||
*/ | ||
|
||
} |
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,154 @@ | ||
<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.mt</groupId> | ||
<artifactId>maven-web-application</artifactId> | ||
<packaging>war</packaging> | ||
<version>0.0.1-SNAPSHOT</version> | ||
|
||
<name>maven-web-application</name> | ||
|
||
<description>Maven Web Project for Java Project</description> | ||
|
||
<organization> | ||
<name>Mithun Technologies</name> | ||
<url>http://mithuntechnologies.com/</url> | ||
</organization> | ||
|
||
<properties> | ||
<jdk.version>1.8</jdk.version> | ||
<spring.version>5.1.2.RELEASE</spring.version> | ||
<junit.version>4.11</junit.version> | ||
<log4j.version>1.2.17</log4j.version> | ||
<sonar.host.url>http:18.224.51.200:9000/</sonar.host.url> | ||
<sonar.login>admin</sonar.login> | ||
<sonar.password>land</sonar.password> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
|
||
</properties> | ||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>org.json</groupId> | ||
<artifactId>json</artifactId> | ||
<version>20160212</version> | ||
</dependency> | ||
|
||
<!-- test dependencies --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>3.8.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<version>3.1.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.mockito</groupId> | ||
<artifactId>mockito-core</artifactId> | ||
<version>1.9.5</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<!-- compile dependencies --> | ||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-core</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-web</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-webmvc</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-context</artifactId> | ||
<version>${spring.version}</version> | ||
</dependency> | ||
|
||
<!-- provided dependencies --> | ||
|
||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<version>3.1.0</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<distributionManagement> | ||
|
||
<repository> | ||
<id>nexus</id> | ||
<name>Mithun Technologies Releases Nexus Repository</name> | ||
<url>http://18.191.219.149:8088/landmarktech/repository/walmart-releases/</url> | ||
</repository> | ||
|
||
<snapshotRepository> | ||
<id>nexus</id> | ||
<name>Mithun Technologies Snapshot Nexus Repository </name> | ||
<url>http://18.191.219.149:8088/landmarktech/repository/walmart-snapshot/</url> | ||
</snapshotRepository> | ||
|
||
</distributionManagement> | ||
|
||
<build> | ||
<finalName>maven-web-application</finalName> | ||
|
||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.3</version> | ||
<configuration> | ||
<source>${jdk.version}</source> | ||
<target>${jdk.version}</target> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.eclipse.jetty</groupId> | ||
<artifactId>jetty-maven-plugin</artifactId> | ||
<version>9.2.11.v20150529</version> | ||
<configuration> | ||
<scanIntervalSeconds>10</scanIntervalSeconds> | ||
<webApp> | ||
<contextPath>/maven-web-application</contextPath> | ||
</webApp> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-eclipse-plugin</artifactId> | ||
<version>2.9</version> | ||
<configuration> | ||
<downloadSources>true</downloadSources> | ||
<downloadJavadocs>true</downloadJavadocs> | ||
<wtpversion>2.0</wtpversion> | ||
<wtpContextName>maven-web-application</wtpContextName> | ||
</configuration> | ||
</plugin> | ||
|
||
</plugins> | ||
</build> | ||
|
||
|
||
</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,32 @@ | ||
package com.mt.services; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
import javax.servlet.http.HttpSession; | ||
|
||
import org.json.JSONException; | ||
import org.json.JSONObject; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
import org.springframework.web.bind.annotation.ResponseBody; | ||
|
||
@Controller | ||
@RequestMapping("/employee") | ||
public class EmployeeService { | ||
|
||
|
||
@RequestMapping(value = "/getEmployeeDetails", method = RequestMethod.GET) | ||
@ResponseBody | ||
String uploadImage(HttpServletRequest request, HttpServletResponse response, HttpSession httpSession) | ||
throws JSONException { | ||
|
||
JSONObject js = new JSONObject(); | ||
js.put("Name", "Landmark Technologies"); | ||
js.put("Calling Name", "mylandmark"); | ||
js.put("DOB", "May 1, 2005"); | ||
js.put("Hobbies", "Praying, Singing, Reading Technical Blogs,Teaching, Helping to Poor People.."); | ||
js.put("Places he like", "Africa, NA, Bali"); | ||
return js.toString(); | ||
} | ||
} |
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,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:context="http://www.springframework.org/schema/context" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc" | ||
xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" | ||
xmlns:task="http://www.springframework.org/schema/task" | ||
xsi:schemaLocation=" | ||
http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://www.springframework.org/schema/context | ||
http://www.springframework.org/schema/context/spring-context-3.0.xsd | ||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd | ||
http://www.springframework.org/schema/jee | ||
http://www.springframework.org/schema/jee/spring-jee-3.0.xsd | ||
http://www.springframework.org/schema/tx | ||
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd | ||
http://www.springframework.org/schema/task | ||
http://www.springframework.org/schema/task/spring-task.xsd"> | ||
|
||
<context:component-scan base-package="com.mt.*"></context:component-scan> | ||
|
||
<mvc:annotation-driven></mvc:annotation-driven> | ||
|
||
|
||
</beans> |
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,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> | ||
<display-name>maven-web-application</display-name> | ||
<context-param> | ||
<param-name>contextConfigLocation</param-name> | ||
<param-value>/WEB-INF/mt-servlet.xml</param-value> | ||
</context-param> | ||
<servlet> | ||
<servlet-name>mt</servlet-name> | ||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> | ||
<load-on-startup>1</load-on-startup> | ||
</servlet> | ||
<servlet-mapping> | ||
<servlet-name>mt</servlet-name> | ||
<url-pattern>/services/*</url-pattern> | ||
</servlet-mapping> | ||
<listener> | ||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> | ||
</listener> | ||
<welcome-file-list> | ||
<welcome-file>/jsps/home.jsp</welcome-file> | ||
</welcome-file-list> | ||
</web-app> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,40 @@ | ||
<%@ page language="java" contentType="text/html; charset=UTF-8" | ||
pageEncoding="UTF-8"%> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | ||
<title>Mylandmark.Tech- Home Page</title> | ||
<link href="images/landmarklogo.jpg" rel="icon"> | ||
</head> | ||
</head> | ||
<body> | ||
<h1 align="center">myLandmark.Tech --> Your Technology Company</h1> | ||
<h1 align="center"> Welcome to Landmark Technology.......We have a demo on DevOps with Linux and AWS on Saturday August 1 at 8pm EST for our new batch. | ||
MyLandmark.Tech is a very Good Training center for DevOps with AWS in NA. The King is in our midst. JESUS IS OUR SUCCESS KEY. | ||
We offer interview preparations and job assitance. | ||
Please give your reviews in facebook, youtube and Google and help a friend</h1> | ||
<hr> | ||
<div style="text-align: center;"> | ||
<span> | ||
<img src="images/mylandmarklogo.jpg" alt="" width="100"> | ||
</span> | ||
<span style="font-weight: bold;"> | ||
Mylandmark.tech, | ||
Toronto, Ontario, Canada | ||
Dallas, TX USA, Buea Cameroon | ||
+1 437 215 2483, | ||
[email protected] | ||
<br> | ||
<a href="mailto:[email protected]">Mail to Landmark Technologies</a> | ||
</span> | ||
</div> | ||
<hr> | ||
<p> Service : <a href="services/employee/getEmployeeDetails">Get Employee Details </p> | ||
<hr> | ||
<hr> | ||
<p align=center>Landmark Technologies - Consultant, Training, Development Center.</p> | ||
<p align=center><small>Copyrights 2019 by <a href="http://mylandmark.tech/">Landmark Technologies</a> </small></p> | ||
|
||
</body> | ||
</html> |