-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Bhallamudi Pratibha
authored and
Bhallamudi Pratibha
committed
May 9, 2024
1 parent
d496c68
commit ec30782
Showing
5 changed files
with
352 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
<?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.iemr.admin-ui-next</groupId> | ||
<artifactId>admin-ui-next</artifactId> | ||
<version>1.0</version> | ||
<name>admin-ui-next</name> | ||
<description>Piramal - admin: Module ui</description> | ||
|
||
<packaging>war</packaging> | ||
<profiles> | ||
<profile> | ||
<id>dev</id> | ||
<properties> | ||
<old-api-url>10.208.122.38</old-api-url> | ||
<new-api-url>10.208.122.38</new-api-url> | ||
<environment>dev</environment> | ||
</properties> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
</profile> | ||
<profile> | ||
<id>uat</id> | ||
<properties> | ||
<old-api-url>10.208.122.38</old-api-url> | ||
<new-api-url>deviemr.piramalswasthya.org</new-api-url> | ||
<environment>uat</environment> | ||
</properties> | ||
</profile> | ||
<profile> | ||
<id>local</id> | ||
<properties> | ||
<old-api-url>10.208.122.38</old-api-url> | ||
<new-api-url>localhost</new-api-url> | ||
<environment>local</environment> | ||
</properties> | ||
</profile> | ||
<profile> | ||
<id>test</id> | ||
<properties> | ||
<old-api-url>10.208.122.38</old-api-url> | ||
<new-api-url>10.208.122.38</new-api-url> | ||
<environment>test</environment> | ||
</properties> | ||
</profile> | ||
<profile> | ||
<id>ci</id> | ||
<properties> | ||
<environment>ci</environment> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
|
||
<!-- we could create individual properties similar to variables --> | ||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<final-name>admin-ui-next-v1.0</final-name> | ||
<hostname-dev>10.208.122.38</hostname-dev> | ||
<port-dev>9990</port-dev> | ||
<hostname-local>localhost</hostname-local> | ||
<port-local>9990</port-local> | ||
<hostname-test>10.208.122.38</hostname-test> | ||
<port-test>9990</port-test> | ||
<hostname-uat>deviemr.piramalswasthya.org</hostname-uat> | ||
<port-uat>9990</port-uat> | ||
<server-id>wildfly-${environment}</server-id> | ||
<server-hostname>{hostname-${environment}}</server-hostname> | ||
<server-port>{port-${environment}}</server-port> | ||
</properties> | ||
|
||
<!-- install the necessary node_modules & compile in prod mode --> | ||
<build> | ||
<finalName>admin-ui-next-v1.0</finalName> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-clean-plugin</artifactId> | ||
<version>3.3.2</version> | ||
<configuration> | ||
<filesets> | ||
<fileset> | ||
<directory>dist</directory> | ||
<followSymlinks>false</followSymlinks> | ||
</fileset> | ||
</filesets> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>exec-maven-plugin</artifactId> | ||
<version>3.1.0</version> | ||
<executions> | ||
<execution> | ||
<id>npm-install</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<executable>npm</executable> | ||
<arguments> | ||
<argument>install</argument> | ||
<argument>--legacy-peer-deps</argument> | ||
<!-- use save-dev or save if you understand the consequences, else --> | ||
<!-- please leave them alone & add appropriate npm dependencies in | ||
package.json --> | ||
</arguments> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>npm-run-build</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>exec</goal> | ||
</goals> | ||
<configuration> | ||
<!-- incase working dir is different use below --> | ||
<executable>npm</executable> | ||
<arguments> | ||
<argument>run</argument> | ||
<argument>build-${environment}</argument> | ||
</arguments> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<!-- use following incase resources from other dirs --> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-resources-plugin</artifactId> | ||
<version>3.3.1</version> | ||
<executions> | ||
<execution> | ||
<id>default-copy-resources</id> | ||
<phase>prepare-package</phase> | ||
<configuration> | ||
<overwrite>true</overwrite> | ||
<outputDirectory>${project.build.directory}/${project.artifactId}-${project.version}/WEB-INF/ | ||
</outputDirectory> | ||
<resources> | ||
<resource> | ||
<directory>${project.basedir}/dist</directory> | ||
</resource> | ||
</resources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-war-plugin</artifactId> | ||
<version>3.4.0</version> | ||
<configuration> | ||
<failOnMissingWebXml>false</failOnMissingWebXml> | ||
<webResources> | ||
<resource> | ||
<!-- this is relative to the pom.xml directory --> | ||
<directory>dist</directory> | ||
</resource> | ||
<resource> | ||
<filtering>true</filtering> | ||
<directory>src/packaging/</directory> | ||
</resource> | ||
</webResources> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-antrun-plugin</artifactId> | ||
<version>3.1.0</version> | ||
<executions> | ||
<execution> | ||
<id>properties-updated</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>run</goal> | ||
</goals> | ||
<configuration> | ||
<target> | ||
<echo>replacing/updating urls ${project.basedir} 2</echo> | ||
<replaceregexp match="${old-api-url}" | ||
replace="${new-api-url}" flags="ig"> | ||
<fileset dir="${project.basedir}/dist" | ||
includes="main.*.bundle.js"/> | ||
</replaceregexp> | ||
</target> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build.version=${project.version} | ||
build.dateTime=${build.timestamp} |