Skip to content

Commit

Permalink
Added build profile
Browse files Browse the repository at this point in the history
  • Loading branch information
qtsathish committed Dec 1, 2021
1 parent 032b6e8 commit 9572371
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 15 deletions.
1 change: 1 addition & 0 deletions sample1/.gitignore
@@ -0,0 +1 @@
target/**
53 changes: 38 additions & 15 deletions sample1/pom.xml
@@ -1,15 +1,38 @@
<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.qt.devops</groupId>
<artifactId>sample1-app</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<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.qt.devops</groupId>
<artifactId>sample1-app</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
</properties>
<profiles>
<profile>
<id>test</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>Using env.test.properties</echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
1 change: 1 addition & 0 deletions sample1/src/main/resources/env.properties
@@ -0,0 +1 @@
user=developer
1 change: 1 addition & 0 deletions sample1/src/main/resources/env.test.properties
@@ -0,0 +1 @@
user=tester

0 comments on commit 9572371

Please sign in to comment.