diff --git a/Jenkinsfile b/Jenkinsfile index 445611cb7..d0565a3af 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,6 +7,12 @@ pipeline{ } stages{ + stage('Clean Workspace') { + steps { + deleteDir() + } + } + stage('checkout'){ steps{ checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 'github access', url: 'https://github.com/sreenivas449/java-hello-world-with-maven.git']]]) @@ -14,8 +20,8 @@ pipeline{ } stage('build'){ steps{ - bat 'mvn package' + sh 'mvn package' } } } -} \ No newline at end of file +} diff --git a/README.md b/README.md index 6dcfe4465..5fc1075a3 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,10 @@ This guide walks you through using Maven to build a simple Java project. ## What you’ll build You’ll create an application that provides the time of day and then build it with Maven. + ## What you’ll need + A favorite text editor or IDE ++ + JDK 6 or later + Install Maven diff --git a/abc.txt b/abc.txt new file mode 100644 index 000000000..1c4f1fdb7 --- /dev/null +++ b/abc.txt @@ -0,0 +1 @@ +bvjbjbdchjdcbnvjcnvcdcdjncdndjj diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 000000000..10f60c96e --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,26 @@ +version: 0.2 + +phases: + install: + runtime-versions: + java: corretto17 + commands: + - echo "Installing dependencies" + + pre_build: + commands: + - echo "Starting Maven build" + - mvn clean + + build: + commands: + - mvn package + + post_build: + commands: + - echo "Build completed successfully" + +artifacts: + files: + - target/*.jar + diff --git a/pom.xml b/pom.xml index 263eb8be6..3906b1612 100644 --- a/pom.xml +++ b/pom.xml @@ -8,11 +8,11 @@ 0.2.0 - - 1.8 - 1.8 - 1.8 - + + 11 + 11 + + @@ -25,6 +25,15 @@ + + org.apache.maven.plugins + maven-compiler-plugin + 3.13.0 + + 11 + 11 + + org.apache.maven.plugins maven-shade-plugin diff --git a/test.txt b/test.txt new file mode 100644 index 000000000..c0680ad21 --- /dev/null +++ b/test.txt @@ -0,0 +1,2 @@ +New change +New change