<?xml version="1.0"?>
<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>
		<groupId>org.oiue</groupId>
		<artifactId>oiue</artifactId>
		<version>1.0.0</version>
	</parent>
	<groupId>org.oiue.services</groupId>
	<artifactId>interfaces</artifactId>
	<version>1.0.0</version>
	
	<name>OIUE interfaces </name>
	<description>OIUE service for interfaces </description>
	<url>http://maven.oiue.org</url>
	<packaging>pom</packaging>
	<dependencies>
		<dependency>
    <groupId>ant-contrib</groupId>
    <artifactId>ant-contrib</artifactId>
    <version>1.0b3</version>
</dependency>
	</dependencies>
	<dependencyManagement>
		<dependencies>
		</dependencies>
	</dependencyManagement>

	<distributionManagement>
		<!-- <repository> <id>releases</id> <url>http://10.182.192.212:8081/nexus/content/repositories/releases</url> </repository> <snapshotRepository> <id>snapshots</id> <url>http://10.182.192.212:8081/nexus/content/repositories/snapshots</url> </snapshotRepository> -->
	</distributionManagement>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>
	<build>
		<plugins>
			<!-- 打包bundle文件为bundle.jar文件 -->
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<X-bundle-Version>${project.version}</X-bundle-Version>
						<Bundle-Name>${project.name}</Bundle-Name>
						<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
						<Bundle-Description>${project.description}</Bundle-Description>
						<Bundle-Vendor></Bundle-Vendor>
					</instructions>
				</configuration>
			</plugin>
			<!-- 打包source文件为jar文件 -->
			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1</version>
				<configuration>
					<attach>true</attach>
					<encoding>UTF-8</encoding>
				</configuration>
				<executions>
					<execution>
						<phase>compile</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<!-- 将打包的bundle文件拷贝到项目的bundle目录 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-lib-bundle</id>
						<phase>package</phase>
						<goals>
							<goal>run</goal>
						</goals>
						<configuration>
							<tasks>
								<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.runtime.classpath" />
								<if>
									<contains string="${project.packaging}" substring="bundle" />
									<then>
										<copy todir="${project.build.exportdir}">
											<fileset dir="${project.basedir}/target">
												<include name="*.?.jar" />
											</fileset>
										</copy>
									</then>
								</if>
							</tasks>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>
