pom.xml 13.7 KB
Newer Older
Romain Bioteau's avatar
Romain Bioteau committed
1 2 3 4 5 6
<?xml version="1.0" encoding="UTF-8"?>
<project
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<modelVersion>4.0.0</modelVersion>
	<parent>
7
		<groupId>org.bonitasoft.studio.bundles</groupId>
Romain Bioteau's avatar
Romain Bioteau committed
8
		<artifactId>plugins</artifactId>
9
        <version>7.2.2</version>
Romain Bioteau's avatar
Romain Bioteau committed
10 11 12 13
	</parent>
	<groupId>org.bonitasoft.studio.plugins</groupId>
	<artifactId>org.bonitasoft.studio.console.libs</artifactId>
	<packaging>eclipse-plugin</packaging>
Romain Bioteau's avatar
Romain Bioteau committed
14

Romain Bioteau's avatar
Romain Bioteau committed
15 16
	<properties>
		<tomcat.bundle.dir>${basedir}/tomcat</tomcat.bundle.dir>
Charles Souillard's avatar
Charles Souillard committed
17
		<bonita.home.dir>${basedir}/bonita-home</bonita.home.dir>
Romain Bioteau's avatar
Romain Bioteau committed
18 19
		<javadoc.dir>${basedir}/javadoc</javadoc.dir>
		<lib.dir>lib</lib.dir>
Romain Bioteau's avatar
Romain Bioteau committed
20
		<tomcat.version>7.0.67</tomcat.version>
Romain Bioteau's avatar
Romain Bioteau committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.bonitasoft.engine</groupId>
			<artifactId>bonita-client</artifactId>
			<version>${engine.version}</version>
		</dependency>
		<dependency>
			<groupId>org.bonitasoft.engine</groupId>
			<artifactId>bonita-common</artifactId>
			<version>${engine.version}</version>
			<exclusions>
				<exclusion>
					<groupId>*</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.bonitasoft.engine</groupId>
			<artifactId>bonita-server</artifactId>
			<version>${engine.version}</version>
			<exclusions>
				<exclusion>
					<groupId>*</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
52
			<groupId>org.bonitasoft.web</groupId>
Romain Bioteau's avatar
Romain Bioteau committed
53
			<artifactId>theme-builder</artifactId>
Romain Bioteau's avatar
Romain Bioteau committed
54
			<version>${theme.builder.version}</version>
Romain Bioteau's avatar
Romain Bioteau committed
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
			<exclusions>
				<exclusion>
					<groupId>*</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.bonitasoft.forms</groupId>
			<artifactId>forms-server</artifactId>
			<version>${bundle.version}</version>
			<exclusions>
				<exclusion>
					<groupId>*</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.bonitasoft.forms</groupId>
			<artifactId>forms-model</artifactId>
			<version>${bundle.version}</version>
			<exclusions>
				<exclusion>
					<groupId>*</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.bonitasoft.forms</groupId>
			<artifactId>forms-rpc</artifactId>
			<version>${bundle.version}</version>
			<exclusions>
				<exclusion>
					<groupId>*</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.bonitasoft.console</groupId>
Romain Bioteau's avatar
Romain Bioteau committed
97
			<artifactId>console-server</artifactId>
Romain Bioteau's avatar
Romain Bioteau committed
98
			<version>${bundle.version}</version>
99
			<classifier>classes</classifier>
Romain Bioteau's avatar
Romain Bioteau committed
100 101 102 103 104 105 106 107 108
			<exclusions>
				<exclusion>
					<groupId>*</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.bonitasoft.console</groupId>
109
			<artifactId>console-common</artifactId>
Romain Bioteau's avatar
Romain Bioteau committed
110
			<version>${bundle.version}</version>
Romain Bioteau's avatar
Romain Bioteau committed
111 112 113 114 115 116 117 118 119
			<exclusions>
				<exclusion>
					<groupId>*</groupId>
					<artifactId>*</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
	</dependencies>
	<build>
Romain Bioteau's avatar
Romain Bioteau committed
120 121 122 123 124 125 126 127 128 129
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>org.apache.felix</groupId>
					<artifactId>maven-bundle-plugin</artifactId>
					<version>2.3.7</version>
				</plugin>
			</plugins>
		</pluginManagement>

Romain Bioteau's avatar
Romain Bioteau committed
130
		<plugins>
Romain Bioteau's avatar
Romain Bioteau committed
131
				<plugin>
Romain Bioteau's avatar
Romain Bioteau committed
132 133 134
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
Romain Bioteau's avatar
Romain Bioteau committed
135
					<execution>
Romain Bioteau's avatar
Romain Bioteau committed
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163
						<id>Retrieve BOS Tomcat Bundle</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.bonitasoft.distrib</groupId>
									<artifactId>bundle-tomcat</artifactId>
									<version>${bundle.version}</version>
									<type>zip</type>
								</artifactItem>
							</artifactItems>
							<outputDirectory>${tomcat.bundle.dir}</outputDirectory>
							<overWriteReleases>true</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
						</configuration>
					</execution>
					<execution>
						<id>Retrieve Studio specific war</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>copy</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
Romain Bioteau's avatar
Romain Bioteau committed
164 165
									<groupId>org.bonitasoft.web.tooling</groupId>
									<artifactId>studio-watchdog</artifactId>
Romain Bioteau's avatar
Romain Bioteau committed
166
									<version>${watchdog.version}</version>
Romain Bioteau's avatar
Romain Bioteau committed
167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
									<type>war</type>
								</artifactItem>
							</artifactItems>
							<outputDirectory>${tomcat.bundle.dir}/webapps</outputDirectory>
							<overWriteReleases>true</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
						</configuration>
					</execution>
					<execution>
						<id>Retrieve Bonita Home</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
									<groupId>org.bonitasoft.console</groupId>
									<artifactId>bonita-home</artifactId>
186
									<classifier>full</classifier>
Romain Bioteau's avatar
Romain Bioteau committed
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204
									<version>${bundle.version}</version>
									<type>zip</type>
								</artifactItem>
							</artifactItems>
							<outputDirectory>${basedir}</outputDirectory>
							<overWriteReleases>true</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
						</configuration>
					</execution>
					<execution>
						<id>Retrieve Javadoc</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<artifactItems>
								<artifactItem>
Romain Bioteau's avatar
Romain Bioteau committed
205 206 207 208 209 210 211 212 213
									<groupId>org.bonitasoft.engine</groupId>
									<artifactId>bonita-common</artifactId>
									<version>${engine.version}</version>
									<classifier>javadoc</classifier>
									<type>jar</type>
								</artifactItem>
								<artifactItem>
									<groupId>org.bonitasoft.engine</groupId>
									<artifactId>bonita-client</artifactId>
Romain Bioteau's avatar
Romain Bioteau committed
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
									<version>${engine.version}</version>
									<classifier>javadoc</classifier>
									<type>jar</type>
								</artifactItem>
								<artifactItem>
									<groupId>org.bonitasoft.forms</groupId>
									<artifactId>forms-server</artifactId>
									<version>${bundle.version}</version>
									<classifier>javadoc</classifier>
									<type>jar</type>
								</artifactItem>
							</artifactItems>
							<outputDirectory>${javadoc.dir}</outputDirectory>
							<overWriteReleases>true</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
						</configuration>
					</execution>
					<execution>
						<id>Retrieve bonita-client dependencies</id>
Romain Bioteau's avatar
Romain Bioteau committed
233
						<phase>process-sources</phase>
Romain Bioteau's avatar
Romain Bioteau committed
234 235 236 237 238
						<goals>
							<goal>copy-dependencies</goal>
						</goals>
						<configuration>
							<stripVersion>true</stripVersion>
239
							<stripClassifier>true</stripClassifier>
Romain Bioteau's avatar
Romain Bioteau committed
240
							<outputDirectory>${lib.dir}</outputDirectory>
Romain Bioteau's avatar
Romain Bioteau committed
241 242
							<overWriteReleases>true</overWriteReleases>
							<overWriteSnapshots>true</overWriteSnapshots>
Romain Bioteau's avatar
Romain Bioteau committed
243
							<overWriteIfNewer>true</overWriteIfNewer>
Romain Bioteau's avatar
Romain Bioteau committed
244 245 246 247
						</configuration>
					</execution>
				</executions>
			</plugin>
Romain Bioteau's avatar
Romain Bioteau committed
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>Clean generated resources</id>
						<phase>clean</phase>
						<configuration>
							<target>
								<delete dir="${tomcat.bundle.dir}" />
								<delete dir="${bonita.home.dir}" />
								<delete file="javadoc.zip" />
								<mkdir dir="${project.build.directory}/classes" />
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
					<execution>
						<id>Resources generation add-on</id>
						<phase>generate-resources</phase>
						<configuration>
							<target>
Romain Bioteau's avatar
Romain Bioteau committed
272 273
							
								<delete file="META-INF/MANIFEST.MF" />
Romain Bioteau's avatar
Romain Bioteau committed
274 275 276
								<!-- Configure tomcat bundle resoruce -->
								<move todir="${tomcat.bundle.dir}">
									<fileset
Aurelien Pupier's avatar
Aurelien Pupier committed
277
										dir="${tomcat.bundle.dir}/BonitaBPMCommunity-${bundle.version}-Tomcat-${tomcat.version}/" />
Romain Bioteau's avatar
Romain Bioteau committed
278 279 280
								</move>
								<concat append="true"
									destfile="${tomcat.bundle.dir}/conf/catalina.properties">java.awt.headless=true</concat>
281 282 283 284 285
								<replace
									file="${tomcat.bundle.dir}/conf/logging.properties"
									token="org.bonitasoft.level = WARNING"
									value="org.bonitasoft.level = INFO"
									failOnNoReplacements="true"/>
Romain Bioteau's avatar
Romain Bioteau committed
286 287
								<delete dir="${tomcat.bundle.dir}/webapps/examples" />
								<!-- Clean bonita-home server part -->
Charles Souillard's avatar
Charles Souillard committed
288
								<delete dir="${bonita.home.dir}/engine-server" />
Romain Bioteau's avatar
Romain Bioteau committed
289 290 291 292 293 294 295 296 297 298 299 300 301 302 303

								<!-- Package javadoc -->
								<zip destfile="${basedir}/javadoc.zip" basedir="${javadoc.dir}"
									encoding="UTF-8" />
								<delete dir="${javadoc.dir}" failonerror="false" />
								<delete dir="${lib.dir}/${project.artifactId}-${lib.dir}" />
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
	
Romain Bioteau's avatar
Romain Bioteau committed
304 305 306 307 308 309 310 311 312 313 314
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<manifestLocation>META-INF/</manifestLocation>
					<supportedProjectTypes>
						<supportedProjectType>eclipse-plugin</supportedProjectType>
					</supportedProjectTypes>
					<instructions>
						<_exportcontents>
315 316 317
							 org.bonitasoft.console.common.server.preferences.constants;version="0.0.0",
							 org.bonitasoft.console.common.server.preferences.properties;version="0.0.0",
							 org.bonitasoft.console.common.server.sso;version="0.0.0",
Romain Bioteau's avatar
BS-7752  
Romain Bioteau committed
318 319
							 !org.bonitasoft.engine.*.impl.db;version="0.0.0",
                             !org.bonitasoft.engine.*.impl.db.archive;version="0.0.0",
Romain Bioteau's avatar
Romain Bioteau committed
320
							 org.bonitasoft.engine.*;version="0.0.0",
321 322 323
							 org.bonitasoft.forms.client.model;version="0.0.0",
							 org.bonitasoft.forms.server.accessor;version="0.0.0",
							 org.bonitasoft.forms.server.accessor.impl.util;version="0.0.0",
azara's avatar
azara committed
324
							 org.bonitasoft.forms.server.api;version="0.0.0",
325 326 327 328
							 org.bonitasoft.forms.server.builder;version="0.0.0",
							 org.bonitasoft.forms.server.builder.impl;version="0.0.0",
							 org.bonitasoft.forms.server.exception;version="0.0.0",
							 org.bonitasoft.forms.server.provider.impl.util;version="0.0.0",
Romain Bioteau's avatar
Romain Bioteau committed
329
							 org.bonitasoft.forms.server.validator;version="0.0.0",
Romain Bioteau's avatar
Romain Bioteau committed
330
							 org.bonitasoft.theme.*;version="0.0.0"
Romain Bioteau's avatar
Romain Bioteau committed
331 332 333 334 335
						</_exportcontents>
						<_nouses>true</_nouses>
						<Bundle-SymbolicName>${project.artifactId};singleton:=true</Bundle-SymbolicName>
						<Bundle-Name>Bonita Console embedded in Studio</Bundle-Name>
						<Bundle-Vendor>BonitaSoft S.A.</Bundle-Vendor>
Bonita CI's avatar
Bonita CI committed
336
						<Bundle-Version>7.2.2.qualifier</Bundle-Version>
Romain Bioteau's avatar
Romain Bioteau committed
337 338 339 340 341 342
						<Embed-Transitive>true</Embed-Transitive>
						<Embed-Directory>${lib.dir}</Embed-Directory>
						<Embed-StripVersion>true</Embed-StripVersion>
						<Eclipse-BundleShape>dir</Eclipse-BundleShape>
						<Include-Resource>
							{maven-resources}, {maven-dependencies},
343
							javadoc.zip,bonita=bonita-home,plugin.xml,tomcat=tomcat
Romain Bioteau's avatar
Romain Bioteau committed
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359
						</Include-Resource>
						<Bundle-ClassPath>.,{maven-dependencies}</Bundle-ClassPath>
						<Import-Package>!*</Import-Package>
						<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
					</instructions>
				</configuration>
				<executions>
					<execution>
						<id>Generate bundle MANIFEST.MF</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383
             <plugin>
                <groupId>com.google.code.maven-replacer-plugin</groupId>
                <artifactId>replacer</artifactId>
                <version>1.5.3</version>
                <executions>
                    <execution>
                        <id>Enable web security files hot reload mode</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>replace</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <file>${security.config.file}</file>
                    <replacements>
                        <replacement>
                            <token>security.rest.api.authorizations.check.debug   false</token>
                            <value>#Debug mode enabled by default in Studio environment
security.rest.api.authorizations.check.debug   true</value>
                        </replacement>
                    </replacements>
                </configuration>
            </plugin>
Romain Bioteau's avatar
Romain Bioteau committed
384 385 386
		</plugins>
	</build>

Romain Bioteau's avatar
Romain Bioteau committed
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417
	<profiles>
		<profile>
			<id>upgrade-trunk-snapshot</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<executions>
							<execution>
								<id>upgrade-trunk-snapshot</id>
								<phase>pre-clean</phase>
								<configuration>
									<tasks>
										<echo>Updating pom version from ${current.version} to ${next.snapshot.version}</echo>
										<replace token="&lt;version&gt;${current.version}&lt;/version&gt;" value="&lt;version&gt;${next.snapshot.version}&lt;/version&gt;"
											file="${basedir}/pom.xml" />
										<replace token="&lt;Bundle-Version&gt;${current.model.version}&lt;/Bundle-Version&gt;" value="&lt;Bundle-Version&gt;${next.snapshot.model.version}&lt;/Bundle-Version&gt;"
											file="${basedir}/pom.xml" />
									</tasks>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
Romain Bioteau's avatar
Romain Bioteau committed
418
</project>