Skip to content

Commit e526bbc

Browse files
committed
Add CI build properties, add pom.xml plugins to tweak build process
1 parent a72cfc3 commit e526bbc

File tree

6 files changed

+213
-93
lines changed

6 files changed

+213
-93
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,5 @@ replay_pid8684.log
5454
mvnw.cmd
5555
replay_pid15072.log
5656
/logs
57-
5857
# Properties
59-
src/main/environment/common_local.properties
58+
src/main/environment/common_local.properties

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,12 @@ To install the MMU module, please follow these steps:
4242

4343
1. Clone the repository to your local machine.
4444
2. Install the dependencies and build the module:
45-
- Run the command `mvn clean install`.
46-
3. Run the development server:
45+
- Run the command `mvn clean install`.
46+
3. You can copy `common_example.properties` to `common_local.properties` and edit the file accordingly. The file is under `src/main/environment` folder.
47+
4. Run the development server:
4748
- Start the Redis server.
48-
- Run the command `mvn spring-boot:run`.
49-
4. Open your browser and access `http://localhost:8080/swagger-ui.html#!/` to view the Swagger API documentation.
49+
- Run the command `mvn spring-boot:run -DENV_VAR=local`.
50+
5. Open your browser and access `http://localhost:8080/swagger-ui.html#!/` to view the Swagger API documentation.
5051

5152
## Usage
5253

pom.xml

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
<environment>${ENV_VAR}</environment>
3232
<target-properties>target/classes/application.properties</target-properties>
33-
<source-properties>src/main/environment/common_${environment}.properties</source-properties>
33+
<source-properties>target/classes/common_${environment}.properties</source-properties>
3434
</properties>
3535

3636
<dependencies>
@@ -254,33 +254,70 @@
254254
</annotationProcessorPaths>
255255
</configuration>
256256
</plugin>
257+
<plugin>
258+
<groupId>org.apache.maven.plugins</groupId>
259+
<artifactId>maven-resources-plugin</artifactId>
260+
<executions>
261+
<execution>
262+
<id>filter-resources</id>
263+
<phase>process-resources</phase>
264+
<goals>
265+
<goal>resources</goal>
266+
</goals>
267+
<configuration>
268+
<delimiters>@</delimiters>
269+
<useDefaultDelimiters>false</useDefaultDelimiters>
270+
<resources>
271+
<resource>
272+
<directory>src/main/environment</directory>
273+
<filtering>true</filtering>
274+
<includes>
275+
<include>common_${environment}.properties</include>
276+
</includes>
277+
</resource>
278+
</resources>
279+
</configuration>
280+
</execution>
281+
</executions>
282+
</plugin>
257283
<plugin>
258284
<groupId>org.apache.maven.plugins</groupId>
259285
<artifactId>maven-antrun-plugin</artifactId>
260-
<version>1.8</version><!--$NO-MVN-MAN-VER$ -->
261286
<executions>
262287
<execution>
263288
<phase>process-resources</phase>
264289
<goals>
265290
<goal>run</goal>
266291
</goals>
267-
<id>properties-updated</id>
292+
<id>merge-properties</id>
268293
<configuration>
269294
<target>
270295
<echo>
271-
concatinating properties file ${target-properties} and
296+
concatenating properties file ${target-properties} and
272297
${source-properties}
273-
<!-- $${server-hostname} $${server-port} ${server-id} $${server-username}
274-
$${server-password} -->
275298
</echo>
276299
<concat destfile="${target-properties}" append="yes"
277-
force="yes">
300+
force="yes">
278301
<fileset file="${source-properties}">
279302
</fileset>
280303
</concat>
281304
</target>
282305
</configuration>
283306
</execution>
307+
<execution>
308+
<phase>process-resources</phase>
309+
<goals>
310+
<goal>run</goal>
311+
</goals>
312+
<id>clean-property-files</id>
313+
<configuration>
314+
<tasks>
315+
<delete>
316+
<file file="${source-properties}"/>
317+
</delete>
318+
</tasks>
319+
</configuration>
320+
</execution>
284321
</executions>
285322
</plugin>
286323
<plugin>
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# local env
2+
# DB Connections
3+
spring.datasource.url=@env.DATABASE_URL@
4+
spring.datasource.username=@env.DATABASE_USERNAME@
5+
spring.datasource.password=@env.DATABASE_PASSWORD@
6+
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
7+
8+
## Carestream URLs, local
9+
carestreamOrderCreateURL=@env.COMMON_API_BASE_URL@//carestream/createOrder
10+
11+
## Identity - Common URLs
12+
# Registration
13+
registrationUrl =@env.COMMON_API_BASE_URL@//beneficiary/create
14+
15+
registrarQuickSearchByIdUrl =@env.COMMON_API_BASE_URL@//beneficiary/searchUserByID
16+
17+
registrarQuickSearchByPhoneNoUrl =@env.COMMON_API_BASE_URL@//beneficiary/searchUserByPhone
18+
19+
getBenImageFromIdentity =@env.IDENTITY_API_BASE_URL@/id/benImageByBenRegID
20+
21+
beneficiaryEditUrl =@env.COMMON_API_BASE_URL@/beneficiary/update
22+
23+
registrarAdvanceSearchUrl =@env.COMMON_API_BASE_URL@/beneficiary/searchBeneficiary
24+
25+
## Data Sync API, central
26+
dataSyncUploadUrl=@env.MMU_API_BASE_URL@/dataSync/van-to-server
27+
28+
## Data download API, central
29+
dataSyncDownloadUrl=@env.MMU_API_BASE_URL@/dataSync/server-to-van
30+
31+
## TC specialist slot booking, # not required
32+
tcSpecialistSlotBook=@env.TM_API_BASE_URL@/schedule/bookSlot
33+
34+
## TC specialist slot cancelling, # not required
35+
tcSpecialistSlotCancel=@env.TM_API_BASE_URL@/schedule/cancelBookedSlot
36+
37+
## benGenUrl, common, central
38+
benGenUrlCentral=@env.COMMON_API_BASE_URL@/beneficiary/generateBeneficiaryIDs
39+
40+
## benImportUrl, identity, local
41+
benImportUrlLocal=@env.IDENTITY_API_BASE_URL@/id/saveGeneratedBenIDToLocalServer
42+
43+
## inventory transaction download URL, central, mmu
44+
dataSyncTransactionDownloadUrl=@env.MMU_API_BASE_URL@/dataSync/server-to-van-transactional
45+
46+
## inventory transaction processed flag update URL, central, mmu
47+
dataSyncProcessedFlagUpdate=@env.MMU_API_BASE_URL@/dataSync/updateProcessedFlagPostDownload
48+
49+
50+
fileBasePath =@env.MMU_FILE_BASE_PATH@
51+
52+
## data sync batch size
53+
BATCH_SIZE=30
54+
snomedCTPageSize=10
55+
nurseWL=7
56+
docWL=7
57+
pharmaWL=7
58+
labWL=7
59+
radioWL=7
60+
oncoWL=7
61+
62+
## For File Sync
63+
serverIP=@env.FILE_SYNC_SERVER_IP@
64+
serverDomain=@env.FILE_SYNC_SERVER_DOMAIN@
65+
serverUserName=@env.FILE_SYNC_SERVER_USERNAME@
66+
serverPassword=@env.FILE_SYNC_SERVER_PASSWORD@
67+
localFolderToSync=@env.LOCAL_FOLDER_TO_SYNC@
68+
serverFolder=MMUSync
69+
getServerCredentialURL=@env.MMU_API_BASE_URL@/fileSyncController/getServerCredential
70+
71+
### Redis IP
72+
spring.redis.host=localhost
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# local env
2+
# DB Connections
3+
spring.datasource.url=<Enter AMRIT DB URL here>
4+
spring.datasource.username=<Enter your AMRIT DB username>
5+
spring.datasource.password=<Enter your AMRIT DB password>
6+
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
7+
8+
9+
10+
11+
## Carestream URLs, local
12+
#carestreamOrderCreateURL =http://localhost:1040/carestream/createOrder
13+
carestreamOrderCreateURL =http://10.208.122.38:8080/commonapi-v1.0/carestream/createOrder
14+
15+
## Identity - Common URLs
16+
# Registration, local
17+
#registrationUrl =http://localhost:1040/commonapi-v1.0/beneficiary/create
18+
registrationUrl =http://localhost:8080/commonapi-v1.0/beneficiary/create
19+
20+
## local
21+
#registrarQuickSearchByIdUrl =http://localhost:1040/commonapi-v1.0/beneficiary/searchUserByID
22+
registrarQuickSearchByIdUrl =http://localhost:8080/commonapi-v1.0/beneficiary/searchUserByID
23+
24+
## local
25+
#registrarQuickSearchByPhoneNoUrl =http://localhost:1040/beneficiary/searchUserByPhone
26+
registrarQuickSearchByPhoneNoUrl =http://localhost:8080/commonapi-v1.0/beneficiary/searchUserByPhone
27+
28+
## local
29+
#getBenImageFromIdentity =http://localhost:8082/id/benImageByBenRegID
30+
getBenImageFromIdentity =http://localhost:8080/identity-0.0.1/id/benImageByBenRegID
31+
32+
##beneficiary edit
33+
#beneficiaryEditUrl =http://localhost:1040/commonapi-v1.0/beneficiary/update
34+
beneficiaryEditUrl =http://localhost:8080/commonapi-v1.0/beneficiary/update
35+
36+
## Advance Search, ## local
37+
#registrarAdvanceSearchUrl =http://localhost:1040/beneficiary/searchBeneficiary
38+
registrarAdvanceSearchUrl =http://localhost:8080/commonapi-v1.0/beneficiary/searchBeneficiary
39+
40+
## Data Sync API, central
41+
#dataSyncUploadUrl=http://localhost:82/dataSync/van-to-server
42+
dataSyncUploadUrl=http://10.208.122.38:8080/mmuapi-v1.0/dataSync/van-to-server
43+
44+
## Data download API, central
45+
#dataSyncDownloadUrl=http://localhost:82/dataSync/server-to-van
46+
dataSyncDownloadUrl=http://10.208.122.38:8080/mmuapi-v1.0/dataSync/server-to-van
47+
48+
## TC specialist slot booking, # not required
49+
#tcSpecialistSlotBook=http://localhost:8080/schedule/bookSlot
50+
tcSpecialistSlotBook=http://10.208.122.38:8080/telemedicineapi-v1.0/schedule/bookSlot
51+
52+
## TC specialist slot cancelling, # not required
53+
#tcSpecialistSlotCancel=http://localhost:8080/schedule/cancelBookedSlot
54+
tcSpecialistSlotCancel=http://10.208.122.38:8080/telemedicineapi-v1.0/schedule/cancelBookedSlot
55+
56+
## benGenUrl, common, central
57+
benGenUrlCentral=http://10.208.122.38:8080/commonapi-v1.0/beneficiary/generateBeneficiaryIDs
58+
59+
## benImportUrl, identity, local
60+
benImportUrlLocal=http://localhost:8080/identity-0.0.1/id/saveGeneratedBenIDToLocalServer
61+
62+
## inventory transaction download URL, central, mmu
63+
dataSyncTransactionDownloadUrl=http://10.208.122.38:8080/mmuapi-v1.0/dataSync/server-to-van-transactional
64+
65+
## inventory transaction processed flag update URL, central, mmu
66+
dataSyncProcessedFlagUpdate=http://10.208.122.38:8080/mmuapi-v1.0/dataSync/updateProcessedFlagPostDownload
67+
68+
69+
fileBasePath =C:/apps/Neeraj/mmuDoc
70+
71+
## data sync batch size
72+
BATCH_SIZE=30
73+
snomedCTPageSize=10
74+
nurseWL=7
75+
docWL=7
76+
pharmaWL=7
77+
labWL=7
78+
radioWL=7
79+
oncoWL=7
80+
81+
## For File Sync
82+
serverIP=10.208.122.34
83+
serverDomain=piramalrsync
84+
serverUserName=kmuser
85+
serverPassword=OPENKM@123
86+
localFolderToSync=C://RoboDemo
87+
serverFolder=MMUSync
88+
getServerCredentialURL=http://10.208.122.34:1040/mmuapi-v1.0/fileSyncController/getServerCredential
89+
90+
### Redis IP
91+
spring.redis.host=localhost

src/main/environment/common_local.properties

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)