<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">
<!--
 Copyright (c) 2012, 2018, Werner Keil, Anatole Tresch and others.

 Licensed under the Apache License, Version 2.0 (the "License"); you may not
 use this file except in compliance with the License. You may obtain a copy of
 the License at

 http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 License for the specific language governing permissions and limitations under
 the License.

 Contributors: @atsticks, @keilw, @manuela-grindei
-->
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <version>1.0</version>
        <groupId>org.javamoney</groupId>
        <artifactId>javamoney-parent</artifactId>
    </parent>
    <artifactId>javamoney-lib</artifactId>
    <groupId>org.javamoney.lib</groupId>
    <name>Money and Currency - JavaMoney Libraries (parent)</name>
    <packaging>pom</packaging>
    <properties>
        <jdkVersion>1.8</jdkVersion>
        <maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
        <maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
        <jsr.version>1.0.3</jsr.version>
        <ri.version>1.2.1</ri.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <slf4j.version>1.7.10</slf4j.version>

        <!-- OSGO support -->
        <osgi.version>5.0.0</osgi.version>
        <osgi.compendium.version>${osgi.version}</osgi.compendium.version>
        <osgi.annotation.version>6.0.0</osgi.annotation.version>
    </properties>

    <licenses>
        <license>
            <name>Apache License version 2.0</name>
            <url>LICENSE.txt</url>
        </license>
    </licenses>

    <modules>
        <module>calc</module>
        <module>javamoney-cdi</module>
        <module>exchange</module>
    </modules>
    
    <repositories>
        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>release</id>
            <name>jfrog-libs-release</name>
            <url>http://oss.jfrog.org/artifactory/libs-release</url>
        </repository>
        <repository>
            <snapshots />
            <id>snapshots</id>
            <name>jfrog-libs-snapshot</name>
            <url>http://oss.jfrog.org/artifactory/libs-snapshot</url>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <groupId>biz.aQute.bnd</groupId>
                <artifactId>bnd-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>bnd-process</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <pluginManagement>
        	<plugins>
        		<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
        		<plugin>
        			<groupId>org.eclipse.m2e</groupId>
        			<artifactId>lifecycle-mapping</artifactId>
        			<version>1.0.0</version>
        			<configuration>
        				<lifecycleMappingMetadata>
        					<pluginExecutions>
        						<pluginExecution>
        							<pluginExecutionFilter>
        								<groupId>org.jacoco</groupId>
        								<artifactId>jacoco-maven-plugin</artifactId>
                                        <version>0.8.1</version>
        								<goals>
        									<goal>prepare-agent</goal>
        								</goals>
        							</pluginExecutionFilter>
        							<action>
        								<ignore/>
        							</action>
        						</pluginExecution>
        					</pluginExecutions>
        				</lifecycleMappingMetadata>
        			</configuration>
        		</plugin>
                <plugin>
                    <groupId>biz.aQute.bnd</groupId>
                    <artifactId>bnd-maven-plugin</artifactId>
                    <version>3.5.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>ch.qos.logback</groupId>
                            <artifactId>logback-core</artifactId>
                            <version>1.1.3</version>
                        </dependency>
                        <dependency>
                            <groupId>org.slf4j</groupId>
                            <artifactId>slf4j-api</artifactId>
                            <version>1.7.13</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <goals>
                                <goal>bnd-process</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <archive>
                            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                        </archive>
                    </configuration>
                </plugin>
        	</plugins>
        </pluginManagement>
    </build>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.ibm.icu</groupId>
                <artifactId>icu4j</artifactId>
                <version>51.2</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
            <!-- OSGI support -->
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.annotation</artifactId>
                <scope>provided</scope>
                <version>${osgi.annotation.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.compendium</artifactId>
                <scope>provided</scope>
                <version>${osgi.compendium.version}</version>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>org.osgi</groupId>
                <artifactId>org.osgi.core</artifactId>
                <version>${osgi.version}</version>
                <scope>provided</scope>
                <optional>true</optional>
            </dependency>
            <dependency>
                <groupId>javax.money</groupId>
                <artifactId>money-api</artifactId>
                <version>${jsr.version}</version>
            </dependency>
            <dependency>
                <groupId>org.javamoney.moneta</groupId>
                <artifactId>moneta-core</artifactId>
                <version>${ri.version}</version>
            </dependency>
            <dependency>
                <groupId>org.javamoney.moneta</groupId>
                <artifactId>moneta-convert</artifactId>
                <version>${ri.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.annotation</groupId>
                <artifactId>javax.annotation-api</artifactId>
                <version>1.3.2</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.ibm.icu</groupId>
            <artifactId>icu4j</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>1</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jul-to-slf4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-gpg-plugin</artifactId>
                            <version>1.4</version>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <configuration>
                                <source>1.9</source>
                                <failOnError>false</failOnError>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <!-- Usage: mvn clean deploy -Dgpg.passphrase=yourpassphrase ; Or sign
                            already deployed artifact: mvn gpg:sign-and-deploy-file -DpomFile=target/myapp-1.0.pom
                            -Dfile=target/myapp-1.0.jar -Durl=https://oss.sonatype.org/service/local/staging/deploy/maven2/
                            -DrepositoryId=sonatype-nexus-staging -->
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <configuration>
                            <defaultKeyring>false</defaultKeyring>
                            <keyname>11A1E4D6</keyname>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
