Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagenone
# build epsos-ws-serverwith no implementation
mvn clean install
 
# build epsos-ws-server with mock implementations
mvn clean install -P national-connector-mock-impl
 
# build epsos-ws-server with real implementations
mvn clean install -P national-connector-impl

Example National build script

Here is the Maven pom that Sweden uses to download OpenNCP from Joinup Nexus repository and then bundle in the jar containing the National implementations.

Code Block
languagehtml/xml
<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>
	<parent>
		<artifactId>epsos</artifactId>
		<groupId>se.apotekensservice</groupId>
		<version>1.0-SNAPSHOT</version>
	</parent>
	<groupId>se.apotekensservice</groupId>
	<artifactId>epsos-ncp</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>war</packaging>
	<name>Package OpenNCP</name>
	<description>This project fetches the OpenNCP epsos-ws-server.war.  It then unpacks it, adds the shelob.jar dependency and creates a new web archive</description>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>2.5.1</version>
				<executions>
					<execution>
						<id>unpack</id>
						<phase>package</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>${project.openNcpGroupId}</groupId>
									<artifactId>${project.openNcpArtifactId}</artifactId>
									<version>${project.openNcpVersion}</version>
									<type>war</type>
									<overWrite>true</overWrite>
									<outputDirectory>${project.build.directory}/epsos-ws-server</outputDirectory>
									<includes></includes>
									<excludes>epsos-ws-server-mock*.jar</excludes>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>${project.shelobGroupId}</groupId>
			<artifactId>${project.shelobArtifactId}</artifactId>
			<version>${project.shelobVersion}</version>
		</dependency>
		<dependency>
			<groupId>${project.openNcpGroupId}</groupId>
			<artifactId>${project.openNcpArtifactId}</artifactId>
			<version>${project.openNcpVersion}</version>
			<type>war</type>
		</dependency>
	</dependencies>
	<properties>
		<!-- OpenNCP war -->
		<project.openNcpGroupId>eu.europa.ec.joinup.ecc.epsos-protocol-terminators.epsos-ncp-server</project.openNcpGroupId>
		<project.openNcpArtifactId>epsos-ws-server</project.openNcpArtifactId>
		<project.openNcpVersion>0.2.1-SNAPSHOT</project.openNcpVersion>
		<!-- Shelob jar -->
		<project.shelobGroupId>se.apotekensservice</project.shelobGroupId>
		<project.shelobArtifactId>epsos-shelob</project.shelobArtifactId>
		<project.shelobVersion>0.0.1-SNAPSHOT</project.shelobVersion>
	</properties>
</project>

References

Java SE6 ServiceLoader

...