pom.xml 6.45 KB
Newer Older
yannick legoc's avatar
yannick legoc committed
1 2 3 4
<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>fr.ill.ics</groupId>
	<artifactId>nomadcommandsystem</artifactId>
Hélène Ortiz's avatar
Hélène Ortiz committed
5
	<version>3.2.2</version>
yannick legoc's avatar
yannick legoc committed
6 7 8
	<name>NomadCommandSystem</name>
	<description>Java bridge for the communication with the Nomad server</description>
	<scm>
9
		<connection>scm:svn:http://forge.ill.fr/svn/nomad/ill/NomadCommandSystem/trunk</connection>
yannick legoc's avatar
yannick legoc committed
10 11
	</scm>

yannick legoc's avatar
yannick legoc committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
	<distributionManagement>
		<repository>
			<id>ill-repo</id>
			<name>The ILL Maven Repository</name>
			<url>https://maven.ill.fr/content/repositories/releases</url>
		</repository>
		<snapshotRepository>
			<id>ill-repo</id>
			<name>The ILL Maven Repository</name>
			<url>https://maven.ill.fr/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

	<repositories>
		<repository>
			<id>ill-repo-thirdparty</id>
			<url>https://maven.ill.fr/content/repositories/thirdparty</url>
		</repository>
		<repository>
			<id>ill-repo-releases</id>
			<url>https://maven.ill.fr/content/repositories/releases</url>
		</repository>
		<repository>
			<id>ill-repo-snapshots</id>
			<url>https://maven.ill.fr/content/repositories/snapshots</url>
		</repository>
	</repositories>

yannick legoc's avatar
yannick legoc committed
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<dependencies>
		<dependency>
			<groupId>avalon-framework</groupId>
			<artifactId>avalon-framework-impl</artifactId>
			<version>4.2.0</version>
		</dependency>
		<dependency>
			<groupId>logkit</groupId>
			<artifactId>logkit</artifactId>
			<version>2.0</version>
		</dependency>
		<dependency>
			<groupId>com.google.protobuf</groupId>
ics's avatar
ics committed
57 58
			<artifactId>protobuf-lite</artifactId>
			<version>3.0.1</version>
59
		</dependency>
ics's avatar
ics committed
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
        <dependency>
            <groupId>fr.ill.ics</groupId>
            <artifactId>cameo-api</artifactId>
            <version>0.1.4</version>
            <exclusions>
                <exclusion>
                    <groupId>fr.ill.ics</groupId>
					<artifactId>cameo-com-jeromq</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>fr.ill.ics</groupId>
            <artifactId>cameo-com-jzmq</artifactId>
            <version>0.0.2</version>
        </dependency>
yannick legoc's avatar
yannick legoc committed
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
	</dependencies>
	<build>
		<plugins>

			<!-- We force the compilation with 1.7 to ensure SUSE and Android execution -->
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.0.2</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
				</configuration>
			</plugin>

			<!-- Plugin to get the SVN revision -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>buildnumber-maven-plugin</artifactId>
				<version>1.3</version>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>create</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<doCheck>false</doCheck>
105
					<doUpdate>false</doUpdate>
yannick legoc's avatar
yannick legoc committed
106 107 108 109 110 111 112 113 114 115
				</configuration>
			</plugin>

			<!-- Incorporate the SVN revision in the Manifest -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<archive>
yannick legoc's avatar
yannick legoc committed
116
						<manifest>
yannick legoc's avatar
yannick legoc committed
117 118 119
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
						</manifest>
yannick legoc's avatar
yannick legoc committed
120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
						<manifestEntries>
							<SCM-Revision>${buildNumber}</SCM-Revision>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>

			<!-- We generate the sources from IDL and proto in process-resources to ensure to have them before the compile phase -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.8</version>
				<executions>
					<execution>
						<phase>process-resources</phase>
						<configuration>
							<target>
								<property name="protoFlags" value="-I${env.NOMAD_HOME}/src/common/protobuf/proto --java_out=src/main/java" />
								<property name="protoDir" value="${env.NOMAD_HOME}/src/common/protobuf/proto" />

								<delete dir="src/main/java/fr/ill/ics/nomadserver" />

								<!-- proto files -->
								<echo message="Generating ServantConfiguration.java" />
								<exec executable="protoc">
									<arg line="${protoFlags} ${protoDir}/ServantConfiguration.proto" />
								</exec>
147 148 149 150 151
								
								<echo message="Generating NotificationMessages.java" />
								<exec executable="protoc">
									<arg line="${protoFlags} ${protoDir}/NotificationMessages.proto" />
								</exec>
152 153 154 155 156 157 158 159 160 161
								
								<echo message="Generating CommonResponses.java" />
								<exec executable="protoc">
									<arg line="${protoFlags} ${protoDir}/CommonResponses.proto" />
								</exec>
								
								<echo message="Generating DatabaseRequests.java" />
								<exec executable="protoc">
									<arg line="${protoFlags} ${protoDir}/DatabaseRequests.proto" />
								</exec>
162 163 164 165 166
								
								<echo message="Generating ServantManagerRequests.java" />
								<exec executable="protoc">
									<arg line="${protoFlags} ${protoDir}/ServantManagerRequests.proto" />
								</exec>
167 168 169 170 171
								
								<echo message="Generating CommandLineRequests.java" />
								<exec executable="protoc">
									<arg line="${protoFlags} ${protoDir}/CommandLineRequests.proto" />
								</exec>
yannick legoc's avatar
yannick legoc committed
172

ics's avatar
ics committed
173 174 175 176 177
								<echo message="Generating VariableManagerRequests.java" />
								<exec executable="protoc">
									<arg line="${protoFlags} ${protoDir}/VariableManagerRequests.proto" />
								</exec>

178 179 180 181
								<echo message="Generating ConditionManagerRequests.java" />
								<exec executable="protoc">
									<arg line="${protoFlags} ${protoDir}/ConditionManagerRequests.proto" />
								</exec>
182
								
183
								<echo message="Generating CommandZoneRequests.java" />
184
								<exec executable="protoc">
185
									<arg line="${protoFlags} ${protoDir}/CommandZoneRequests.proto" />
186
								</exec>
187 188 189 190 191
								
								<echo message="Generating SessionRequests.java" />
								<exec executable="protoc">
									<arg line="${protoFlags} ${protoDir}/SessionRequests.proto" />
								</exec>
192

yannick legoc's avatar
yannick legoc committed
193 194 195 196 197 198 199 200 201 202 203 204
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

</project>