This commit is contained in:
Nathanial-1300 2017-09-29 20:55:55 +00:00 committed by GitHub
commit 296e2b4a4e
6 changed files with 52 additions and 4 deletions

1
foo.txt Normal file
View file

@ -0,0 +1 @@
asdkfjk

15
joespipeline Normal file
View file

@ -0,0 +1,15 @@
echo 'Hello from Pipeline Demo'
stage 'Compile'
node {
git url: 'https://github.com/nachofree/spring-petclinic.git'
sh "/usr/bin/mvn -B compile war:war"
}
stage 'Test'
node{
git url: 'https://github.com/nachofree/spring-petclinic.git'
sh "/usr/bin/mvn -B verify"
step([$class: 'ArtifactArchiver', artifacts: '**/target/*.war', fingerprint: true])
step([$class: 'JUnitResultArchiver', testResults: '**/target/surefire-reports/TEST-*.xml'])
}

27
pom.xml
View file

@ -6,7 +6,7 @@
<groupId>org.springframework.samples</groupId> <groupId>org.springframework.samples</groupId>
<artifactId>spring-petclinic</artifactId> <artifactId>spring-petclinic</artifactId>
<version>1.5.1</version> <version>1.5.1</version>
<packaging>war</packaging>
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
@ -50,6 +50,11 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-el</artifactId>
<scope>provided</scope>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId> <artifactId>spring-boot-starter-thymeleaf</artifactId>
@ -65,6 +70,11 @@
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<!-- Databases - Uses HSQL by default --> <!-- Databases - Uses HSQL by default -->
<dependency> <dependency>
@ -140,6 +150,21 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<server>tomcat-development-server</server>
<url>http://144.38.196.18:8080/manager/text</url>
<warFile>target\spring-petclinic-1.5.1.war</warFile>
<path>/petclinic</path>
<username>joe</username>
<password>1francom$</password>
</configuration>
</plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId> <artifactId>cobertura-maven-plugin</artifactId>

View file

@ -100,6 +100,6 @@ The [issue tracker](https://github.com/spring-projects/spring-petclinic/issues)
For pull requests, editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>. For pull requests, editor preferences are available in the [editor config](.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.
# foo

View file

@ -5,6 +5,7 @@ sonar.projectVersion=1.0
# Comma-separated paths to directories with sources (required) # Comma-separated paths to directories with sources (required)
sonar.sources=src sonar.sources=src
sonar.java.binaries=src
# Language # Language
sonar.language=java sonar.language=java

View file

@ -18,6 +18,8 @@ package org.springframework.samples.petclinic;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
/** /**
* PetClinic Spring Boot Application. * PetClinic Spring Boot Application.
@ -26,7 +28,11 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
* *
*/ */
@SpringBootApplication @SpringBootApplication
public class PetClinicApplication { public class PetClinicApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(PetClinicApplication.class);
}
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
SpringApplication.run(PetClinicApplication.class, args); SpringApplication.run(PetClinicApplication.class, args);