...
Mock implementations of the DocumentSubmitImpl, DocumentSearchImpl and PatientSearchImpl are provided in the project epsos-ws-server-mock-impl. These classes simply return dummy responses (not implemented yet). The mock implementations are packaged as a jar file epsos-ws-server-mock-impl-0.1.0.jar.
Packaging
Code Block | ||
---|---|---|
| ||
<profiles>
<profile>
<!-- This profile bundles a mock National Connector interface -->
<id>national-connector-mock-impl</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>eu.epsos.protocolterminators.ws.server</groupId>
<artifactId>epsos-ws-server-mock-impl</artifactId>
<version>0.1.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
<profile>
<!-- This profile bundles the country-specifig National Connector interface -->
<id>national-connector-impl</id>
<dependencies>
<dependency>
<groupId>${national-connector-interface.groupid}</groupId>
<artifactId>${national-connector-interface.artifactid}</artifactId>
<version>${national-connector-interface.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
</profiles> |
Each country must build their own jar file containing their own implementations, dependencies and supporting files. This jar file is bundled into the epsos-ws-server.war. The pom.xml for the epsos-ws-server project uses profiles to achieve this goal. Maven profiles enable portable build scripts that can be run with with different configurations.
The first profile (activated by default) bundles the mock implementations into the war file. The second profile will bundle the National implementation. For this to work it is necessary to configure the local environment with properties. The properties are defined here:
Code Block | ||
---|---|---|
| ||
# build server with mock implementation
mvn clean install
# build server with real implementation
mvn clean install -P national-connector-impl |
- Per User
- Defined in the Maven-settings (%USER_HOME%/.m2/settings.xml).
- Global
- Defined in the global Maven-settings (%M2_HOME%/conf/settings.xml).
- Profile descriptor
- a descriptor located in project basedir (profiles.xml) (unsupported in Maven 3.x)
...
language | none |
---|
...
References
...