Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
pipeline {
agent any
environment {
PATH = "/opt/maven/bin:$PATH"
}
stages {
stage('Build') {
steps {
sh 'mvn clean install'
}
}
stage('SonarQube analysis') {
steps {
withSonarQubeEnv('sonarqube'){
sh "mvn sonar:sonar"
}
}
}
}

}
75 changes: 49 additions & 26 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,29 +1,52 @@
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.efsavage</groupId>
<artifactId>hello-world-war</artifactId>
<version>1.0.0</version>
<packaging>war</packaging>
<name>Hello World Web Application Repository</name>
<description>Simplest possible Java Webapp</description>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.efsavage</groupId>
<artifactId>loginpage</artifactId>
<version>1.0.0</version>
<packaging>war</packaging>
<name>Hello World Web Application Repository</name>
<description>Simplest possible Java Webapp</description>

<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.5.v20120716</version>
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
</plugin>
</plugins>
</build>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.4.43.v20210629</version> <!-- Updated version -->
<configuration>
<scanIntervalSeconds>0</scanIntervalSeconds>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>3.3.1</version> <!-- Updated version -->
</plugin>
</plugins>
</build>

</project>
<distributionManagement>
<repository>
<id>loginpage</id>
<url>http://13.233.8.54:8081/repository/loginpage/</url>
</repository>
<snapshotRepository>
<id>maven-snapshots</id>
<url>http://13.233.8.54:8081/repository/loginpage/</url>
</snapshotRepository>
</distributionManagement>

<repositories>
<repository>
<id>loginpage</id>
<name>loginpage</name>
<url>http://13.233.8.54:8081/repository/loginpage/</url>
</repository>
</repositories>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

</project>
69 changes: 57 additions & 12 deletions src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
@@ -1,13 +1,58 @@
<html>
<html>
<head>
<title>Hello World!</title>
</head>
<body>
<h1>Hello World!</h1>
<p>
It is now
<%= new java.util.Date() %></p>
<p>
You are coming from
<%= request.getRemoteAddr() %></p>
</body>
<title> Login Page </title>
<style>
Body {
font-family: Calibri, Helvetica, sans-serif;
background-color: pink;
}
button {
background-color: #4CAF50;
width: 100%;
color: orange;
padding: 15px;
margin: 10px 0px;
border: none;
cursor: pointer;
}
form {
border: 3px solid #f1f1f1;
}
input[type=text], input[type=password] {
width: 100%;
margin: 8px 0;
padding: 12px 20px;
display: inline-block;
border: 2px solid green;
box-sizing: border-box;
}
button:hover {
opacity: 0.7;
}
.cancelbtn {
width: auto;
padding: 10px 18px;
margin: 10px 5px;
}
.container {
padding: 25px;
background-color: lightblue;
}
</style>
</head>
<body>
<center> <h1> Student Login Form </h1> </center>
<form>
<div class="container">
<label>Username : </label>
<input type="text" placeholder="Enter Username" name="username" required>
<label>Password : </label>
<input type="password" placeholder="Enter Password" name="password" required>
<button type="submit">Login</button>
<input type="checkbox" checked="checked"> Remember me
<button type="button" class="cancelbtn"> Cancel</button>
<a href="#">Forgot password? </a>
</div>
</form>
</body>
</html>