File tree Expand file tree Collapse file tree 3 files changed +13
-10
lines changed
redhat/roles/configure/tasks
manual/definitions/apm/java/linux Expand file tree Collapse file tree 3 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 13
13
<artifactId >junit</artifactId >
14
14
<version >3.8.1</version >
15
15
<scope >test</scope >
16
- </dependency >
16
+ </dependency >
17
+ <!-- Add-the-newrelic-java-dependency-plugin-->
17
18
</dependencies >
18
19
<build >
19
20
<finalName >javaApp</finalName >
20
21
<plugins >
21
- <!-- Add the exec-maven-plugin below -->
22
+ <!-- Add- the- exec-maven-plugin- below-->
22
23
<plugin >
23
24
<groupId >org.codehaus.mojo</groupId >
24
25
<artifactId >exec-maven-plugin</artifactId >
Original file line number Diff line number Diff line change 17
17
shell : chmod -R 777 /opt/tomcat/latest/bin
18
18
become : true
19
19
20
+ - name : Change the permissions and ownership of javaApp & tomcat directories
21
+ shell : chown -R ec2-user:ec2-user /home/ec2-user/javaApp/ &&
22
+ chmod -R 755 /home/ec2-user/javaApp &&
23
+ chown -R ec2-user:ec2-user /opt/tomcat/ &&
24
+ chmod -R 755 /opt/tomcat/
25
+ become : true
26
+
20
27
- name : Build Java App with Maven
21
28
ansible.builtin.command :
22
29
cmd : mvn clean package -f /home/ec2-user/javaApp/pom.xml
25
32
PATH : " {{ ansible_env.PATH }}:/opt/jdk-14.0.1/bin:/opt/apache-maven/bin"
26
33
JRE_HOME : " /opt/jdk-14.0.1"
27
34
become : true
28
-
29
- - name : Change the permissions and ownership of javaApp directory
30
- shell : chown -R ec2-user:ec2-user /home/ec2-user/javaApp/ &&
31
- chmod -R 755 /home/ec2-user/javaApp
32
- become : true
33
35
34
36
- name : Move the package
35
37
shell : mv /home/ec2-user/javaApp/target/javaApp.war /opt/tomcat/latest/webapps
Original file line number Diff line number Diff line change 7
7
},
8
8
"resources" : [
9
9
{
10
- "id" : " dummyApp " ,
10
+ "id" : " java-mav-tom-testapp " ,
11
11
"provider" : " aws" ,
12
12
"type" : " ec2" ,
13
13
"size" : " t3.small" ,
20
20
"source_repository" : " https://github.com/newrelic/open-install-library.git" ,
21
21
"deploy_script_path" : " test/deploy/linux/tomcat/systemd/shScript/catalina/install/linux/roles" ,
22
22
"port" : 6001 ,
23
- "destinations" : [" dummyApp " ]
23
+ "destinations" : [" java-mav-tom-testapp " ]
24
24
},
25
25
{
26
26
"id" : " javaApp" ,
27
27
"source_repository" : " https://github.com/newrelic/open-install-library.git" ,
28
28
"deploy_script_path" : " test/deploy/linux/java/redhat/roles" ,
29
29
"port" : 80 ,
30
- "destinations" : [" dummyApp " ]
30
+ "destinations" : [" java-mav-tom-testapp " ]
31
31
}
32
32
]
33
33
}
You can’t perform that action at this time.
0 commit comments