<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/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.lsst</groupId>
    <artifactId>org-lsst-ccs-parent</artifactId>
    <packaging>pom</packaging>
    <version>3.1.6</version>
    <name>LSST CCS - Parent (pom)</name>
    <url>${org.lsst.ccs.site.url}</url>

    <organization>
        <name>LSST</name>
        <url>http://lsst.org/</url>
    </organization>

    <developers>
        <developer>
            <id>bernard</id>
            <name>Bernard Amade</name>
            <email>bamade@in2p3.fr</email>
            <organization>APC, Paris</organization>
            <roles>
                <role>core developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>eric</id>
            <name>Eric Aubourg</name>
            <email>eric@aubourg.net</email>
            <organization>APC, Paris</organization>
            <roles>
                <role>architect</role>
                <role>core developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>tjohnson</id>
            <name>Tony Johnson</name>
            <organization>SLAC</organization>
            <email>tonyj@slac.stanford.edu</email>
            <roles>
                <role>core developer</role>
                <role>architect</role>
            </roles>
            <timezone>-8</timezone>
        </developer>
        <developer>
            <id>stuart</id>
            <name>Stuart Marshall</name>
            <organization>SLAC</organization>
            <email>marshall@slac.stanford.edu</email>
            <timezone>-8</timezone>
            <roles>
                <role>system engineering</role>
            </roles>
        </developer>
        <developer>
            <id>owen</id>
            <name>Owen Saxton</name>
            <organization>SLAC</organization>
            <email>saxton@slac.stanford.edu</email>
            <roles>
                <role>refrigeration subsystem</role>
                <role>rafts subsystem</role>
            </roles>
            <timezone>-8</timezone>
        </developer>
        <developer>
            <id>jon</id>
            <name>Jon Thaler</name>
            <organization>Illinois</organization>
            <email>jjt@illinois.edu</email>
            <roles>
                <role>IDCs</role>
            </roles>
            <timezone>-6</timezone>
        </developer>
        <developer>
            <id>max</id>
            <name>Max Turri</name>
            <organization>SLAC</organization>
            <email>turri@slac.stanford.edu</email>
            <roles>
                <role>core developer</role>
            </roles>
            <timezone>-8</timezone>
        </developer>
        <developer>
            <id>francoise</id>
            <name>Françoise Virieux</name>
            <organization>APC, Paris</organization>
            <email>virieux@in2p3.fr</email>
            <roles>
                <role>filter exchanger subsystem</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>etienne</id>
            <name>Etienne Marin-Matholaz</name>
            <organization>APC, Paris</organization>
            <email>etienne.marin-matholaz@apc.univ-paris7.fr</email>
            <roles>
                <role>core developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <id>dima</id>
            <name>Dmitry Onoprienko</name>
            <organization>SLAC</organization>
            <email>onoprien@slac.stanford.edu</email>
            <roles>
                <role>core developer</role>
            </roles>
            <timezone>-8</timezone>
        </developer>
        <developer>
            <id>charlie</id>
            <name>Charlie Armijo</name>
            <organization>Tucson</organization>
            <email>charlie.armijo@gmail.com</email>
            <roles>
                <role>power supply subsystem</role>
            </roles>
            <timezone>-7</timezone>
        </developer>
        <developer>
            <id>heather</id>
            <name>Heather Kelly</name>
            <organization>SLAC</organization>
            <email>heather625@gmail.com</email>
            <roles>
                <role>visualization</role>
            </roles>
            <timezone>-5</timezone>
        </developer>
        <developer>
            <id>homer</id>
            <name>Homer Neal</name>
            <organization>SLAC</organization>
            <email>homer@slac.stanford.edu</email>
            <roles>
                <role>BNL test stands</role>
            </roles>
            <timezone>-5</timezone>
        </developer>
        <developer>
            <id>diego</id>
            <name>Diego Terront</name>
            <organization>LPNHE</organization>
            <email>dterront@lpnhe.in2p3.fr</email>
            <roles>
                <role>Paris test stands</role>
            </roles>
            <timezone>-1</timezone>
        </developer>
        <developer>
            <id>steve</id>
            <name>Stephen Tether</name>
            <organization>SLAC</organization>
            <email>tether@slac.stanford.edu</email>
            <roles>
                <role>Shutter subsystem developer</role>
            </roles>
            <timezone>-8</timezone>
        </developer>
    </developers>
    <contributors>
        <contributor>
            <name>Walt Innes</name>
            <organization>SLAC</organization>
        </contributor>        
        <contributor>
            <name>John Kuczewski</name>
            <organization>BNL</organization>
        </contributor>        
        <contributor>
            <name>John Hart</name>
            <organization>Illinois</organization>
        </contributor>        
        <contributor>
            <name>Eduardo Sepulveda</name>
            <organization>LPNHE</organization>
        </contributor>        
    </contributors>

    <modules>
        <module>multi-module</module>
        <module>maven</module>
    </modules>

    <repositories>
        <repository>
            <id>freehep-maven2-public</id>
            <name>freehep maven2 repository</name>
            <url>https://srs.slac.stanford.edu/nexus/content/groups/freehep-maven2-public/</url>
        </repository>
        <repository>
            <id>lsst-maven2-public</id>
            <name>LSST Maven 2 central repository</name>
            <url>https://repo-nexus.lsst.org/nexus/content/groups/ccs-maven2-public/</url>
        </repository>
        <repository>
            <id>central</id>
            <name>Maven Central</name>
            <layout>default</layout>
            <url>https://repo1.maven.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>


    <pluginRepositories>
        <pluginRepository>
            <id>lsst-maven2-public</id>
            <name>LSST Maven 2 central repository</name>
            <url>https://repo-nexus.lsst.org/nexus/content/groups/ccs-maven2-public/</url>
        </pluginRepository>
    </pluginRepositories>

    <ciManagement>
        <system>Hudson</system>
        <url>https://srs.slac.stanford.edu/hudson/view/LSST/job/${project.artifactId}/</url>
    </ciManagement>


    <issueManagement>
        <system>Jira</system>
        <url>https://jira.slac.stanford.edu/browse/LSSTCCS</url>
    </issueManagement>

    <mailingLists>
        <mailingList>
            <name>CCS User List</name>
            <subscribe>https://kipac.stanford.edu/mailman/listinfo/ccs-users</subscribe>
            <post>ccs-users@kipac.stanford.edu</post>
            <archive>https://kipac.stanford.edu/mailman/private/ccs-users/</archive>
        </mailingList>
        <mailingList>
            <name>SLAC CCS List</name>
            <subscribe>https://kipac.stanford.edu/mailman/listinfo/ccs</subscribe>
            <post>ccs@kipac.stanford.edu</post>
            <archive>https://kipac.stanford.edu/mailman/private/ccs/</archive>
        </mailingList>
    </mailingLists>

    <properties>
        <org.lsst.ccs.project.type />
        <org_lsst_ccs_project>${project.artifactId}</org_lsst_ccs_project>
        <org_lsst_ccs_project_version>${project.version}</org_lsst_ccs_project_version>
        <org_lsst_ccs_project_type>internal-pom</org_lsst_ccs_project_type>
        <org_lsst_ccs_project_description>${project.name}</org_lsst_ccs_project_description>
        <org_lsst_ccs_project_jira_project>${project.issueManagement.url}</org_lsst_ccs_project_jira_project>
        <org_lsst_ccs_project_jira_prefix>maven</org_lsst_ccs_project_jira_prefix>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven-site-plugin.skip>false</maven-site-plugin.skip>
        <maven-site-plugin.skipDeploy>true</maven-site-plugin.skipDeploy>
        <maven-javadoc-plugin.report>javadoc</maven-javadoc-plugin.report>
        <maven-javadoc-plugin.skip>false</maven-javadoc-plugin.skip>
        <maven-jxr-plugin.aggregate>false</maven-jxr-plugin.aggregate>
        <!-- Maven properties to build the site -->
        <org.lsst.ccs.site.name>ccs-site</org.lsst.ccs.site.name>
        <org.lsst.ccs.site.url>https://repo-nexus.lsst.org/nexus/content/sites/${org.lsst.ccs.site.name}/site-root/poms/${project.artifactId}/${project.version}</org.lsst.ccs.site.url>
        <maven-site-plugin.stagingDirectory>/tmp/site/site-root/poms/${project.artifactId}/${project.version}</maven-site-plugin.stagingDirectory>
        <junit.org.version>4.13</junit.org.version>
        <apache.activemq.version>5.7.0</apache.activemq.version>
        <hibernate.version>4.0</hibernate.version>
        <org.lsst.ccs.resource.path>${project.build.testOutputDirectory}|~/ccs/tests/etc</org.lsst.ccs.resource.path>
        <sonar.host.url>
            https://srs.slac.stanford.edu/sonarqube/
        </sonar.host.url>
        <sonar.language>java</sonar.language>
        <sonar.scm.disabled>true</sonar.scm.disabled>
        <org.lsst.ccs.sonar.skip>true</org.lsst.ccs.sonar.skip>
        <surefireArgLine />
        <!-- The two versions of jersey and jackson are related.
            When changing the jersey version, make sure that the jackson version
            matches accordingly by looking at the dependency tree -->
        <jersey.version>2.35</jersey.version>
        <jackson.version>2.12.2</jackson.version>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>jline</groupId>
                <artifactId>jline</artifactId>
                <version>2.11</version>
            </dependency>
            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>1.2</version>
            </dependency>   
            <dependency>
                <groupId>org.freehep</groupId>
                <artifactId>freehep-util</artifactId>
                <version>2.1.3</version>
            </dependency>       
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-jdk14</artifactId>
                <version>1.7.5</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>1.2.17</version>
            </dependency> 
            <dependency>
                <groupId>org.glassfish.jersey</groupId>
                <artifactId>jersey-bom</artifactId>
                <version>${jersey.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
            <dependency>
                <groupId>com.fasterxml.jackson</groupId>
                <artifactId>jackson-bom</artifactId>
                <version>${jackson.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>    
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>${junit.org.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-params</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.vintage</groupId>
            <artifactId>junit-vintage-engine</artifactId>
            <version>5.9.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>sonar-maven-plugin</artifactId>
                    <version>3.2</version>
                    <configuration>
                        <skip>${org.lsst.ccs.sonar.skip}</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.0.0</version>
                    <configuration>
                        <ignoreMissingDescriptor>true</ignoreMissingDescriptor>
                        <tarLongFileMode>warn</tarLongFileMode>
                        <appendAssemblyId>true</appendAssemblyId>                    
                        <descriptorRefs>                        
                            <descriptorRef>distribution-assembly</descriptorRef>
                        </descriptorRefs>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <version>3.1.6</version>
                            <groupId>org.lsst</groupId>
                            <artifactId>org-lsst-ccs-maven-assembly</artifactId>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>distribution-assembly</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>            
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.3.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>3.1.2</version>
                    <configuration>                        
                        <enableAssertions>true</enableAssertions>
                        <runOrder>random</runOrder>
                        <argLine>${surefireArgLine}</argLine>
                        <systemPropertyVariables>
                            <org.lsst.ccs.testcontext>true</org.lsst.ccs.testcontext>
                            <org.lsst.ccs.resource.path>${org.lsst.ccs.resource.path}</org.lsst.ccs.resource.path>
                            <bootstrap.default.org.lsst.ccs.workdir>/tmp</bootstrap.default.org.lsst.ccs.workdir>
                            <trimStackTrace>false</trimStackTrace>
                        </systemPropertyVariables>                        
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                </plugin>
                <plugin>
                    <groupId>org.lsst</groupId>
                    <artifactId>org-lsst-ccs-maven-plugin-distribution</artifactId>
                    <version>3.1.6</version>
                    <executions>
                        <execution>
                            <id>ccs-distribution</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>ccsDistribution</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>                
            </plugins>
        </pluginManagement>
                
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>        
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
            <resource>
                <directory>scripts</directory>
                <filtering>true</filtering>
                <targetPath>bin</targetPath>
            </resource>
            <resource>
                <directory>lib</directory>
                <targetPath>lib</targetPath>
            </resource>
            <resource>
                <directory>lib64</directory>
                <targetPath>lib64</targetPath>
            </resource>
        </resources>
        
        <extensions>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-ssh-external</artifactId>
                <version>2.12</version>
            </extension>
            <extension>
                <groupId>org.apache.maven.wagon</groupId>
                <artifactId>wagon-webdav-jackrabbit</artifactId>
                <version>2.12</version>
            </extension>
        </extensions>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-scm-publish-plugin</artifactId>
                <version>3.2.1</version>
                <configuration>
                    <scmBranch>gh-pages</scmBranch>
                    <content>${project.build.directory}/site</content>
                    <subDirectory>site-root/poms/${project.artifactId}/${project.version}</subDirectory>
                </configuration>
                <executions>
                    <execution>
                        <id>scm-publish</id>
                        <phase>site-deploy</phase>
                        <goals>
                            <goal>publish-scm</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>                            
                <!-- MAKE SURE TO UPDATE THIS VERSION IN THE REPORTING TAG AS WELL -->
                <version>3.0.0</version>
            </plugin>                
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifest>
                            <useUniqueVersions>false</useUniqueVersions>
                            <addClasspath>true</addClasspath>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                        </manifest>
                        <manifestEntries>
                            <CCS-Project-Type>${org.lsst.ccs.project.type}</CCS-Project-Type>
                            <CCS-Project>${org_lsst_ccs_project}</CCS-Project>
                            <CCS-Jenkins-Build-Number>${env.BUILD_NUMBER}</CCS-Jenkins-Build-Number>
                            <CCS-Jenkins-Build-Id>${env.BUILD_ID}</CCS-Jenkins-Build-Id>
                            <CCS-Jenkins-Build-Url>${env.BUILD_URL}</CCS-Jenkins-Build-Url>
                            <CCS-Source-Code-Revision>${env.GIT_COMMIT}</CCS-Source-Code-Revision>
                            <CCS-Source-Code-Url>${env.GIT_URL}</CCS-Source-Code-Url>
                        </manifestEntries>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>javadoc-package</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>                                
                        <configuration>
                            <classesDirectory>${project.build.directory}/site/apidocs/</classesDirectory>
                            <classifier>javadoc</classifier>
                            <includes>
                                <include>**/*</include>
                            </includes>
                            <skipIfEmpty>true</skipIfEmpty>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- LSSTCCS-476 -->
                        <id>test-package</id>
                        <goals>
                            <goal>test-jar</goal>
                        </goals>
                        <configuration>
                            <skipIfEmpty>true</skipIfEmpty>
                        </configuration>
                    </execution>
                </executions>                
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>properties-maven-plugin</artifactId>
                <version>1.0-alpha-2</version>
                <executions>
                    <execution>
                        <id>write-project-properties</id>
                        <phase>package</phase>
                        <goals>
                            <goal>write-project-properties</goal>
                        </goals>
                        <configuration>
                            <outputFile>
                                ${project.build.directory}/${project.artifactId}.maven.properties
                            </outputFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.10</version>
                <executions>
                    <execution>
                        <id>unpack-dependencies-in-distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeScope>runtime</includeScope>
                            <includes>bin/*,lib/**/*,lib64/**/*</includes>
                            <includeGroupIds>org.lsst</includeGroupIds>
                            <outputDirectory>${project.build.directory}/distribution</outputDirectory>
                            <excludeTypes>pom</excludeTypes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unpack-resources-in-distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeScope>runtime</includeScope>
                            <includes>*.*</includes>
                            <excludes>**/pom.*</excludes>
                            <outputDirectory>${project.build.directory}/distribution/etc</outputDirectory>
                            <includeGroupIds>org.lsst</includeGroupIds>
                            <overWriteReleases>true</overWriteReleases>
                            <overWriteSnapshots>true</overWriteSnapshots>
                            <excludeTypes>pom</excludeTypes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>copy-dependencies-to-distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeScope>runtime</includeScope>
                            <includeTypes>jar</includeTypes>
                            <outputDirectory>${project.build.directory}/distribution/share/java</outputDirectory>
                            <excludeArtifactIds>junit,hamcrest-all</excludeArtifactIds>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-resources-plugin</artifactId>
                <version>3.1.0</version>                
                <configuration>
                    <escapeString>\</escapeString> 
                    <nonFilteredFileExtensions>
                        <nonFilteredFileExtension>spec</nonFilteredFileExtension>
                        <nonFilteredFileExtension>ser</nonFilteredFileExtension>
                    </nonFilteredFileExtensions>
                </configuration>
                <executions>
                    <execution>
                        <id>copy-scripts-to-distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/distribution/bin</outputDirectory>
                            <resources>          
                                <resource>
                                    <directory>${basedir}/scripts</directory>
                                    <filtering>true</filtering>
                                </resource>
                            </resources>              
                        </configuration>            
                    </execution>
                    <execution>
                        <id>copy-resources-to-distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/distribution/etc</outputDirectory>
                            <resources>          
                                <resource>                                    
                                    <directory>${basedir}/src/main/resources</directory>
                                    <filtering>true</filtering>
                                    <includes>
                                        <include>**/*</include>
                                    </includes>
                                </resource>
                            </resources>              
                        </configuration>            
                    </execution>
                    <execution>
                        <id>copy-shared-libraries-to-distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/distribution/lib</outputDirectory>
                            <resources>          
                                <resource>
                                    <directory>
                                        ${basedir}/lib
                                    </directory>
                                    <includes>
                                        <include>**/*</include>
                                    </includes>
                                </resource>
                                <resource>
                                    <directory>
                                        ${project.build.directory}/classes/lib
                                    </directory>
                                    <includes>
                                        <include>**/*</include>
                                    </includes>
                                </resource>
                            </resources>              
                        </configuration>            
                    </execution>
                    <execution>
                        <id>copy-shared-libraries-64-to-distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/distribution/lib64</outputDirectory>
                            <resources>          
                                <resource>
                                    <directory>
                                        ${basedir}/lib64
                                    </directory>
                                    <includes>
                                        <include>**/*</include>
                                    </includes>
                                </resource>
                                <resource>
                                    <directory>
                                        ${project.build.directory}/classes/lib64
                                    </directory>
                                    <includes>
                                        <include>**/*</include>
                                    </includes>
                                </resource>
                            </resources>              
                        </configuration>            
                    </execution>
                    <execution>
                        <id>copy-built-executables-to-distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/distribution/bin</outputDirectory>
                            <resources>          
                                <resource>
                                    <directory>
                                        ${project.build.directory}/classes/bin
                                    </directory>
                                    <includes>
                                        <include>**/*</include>
                                    </includes>
                                </resource>
                            </resources>              
                        </configuration>            
                    </execution>                    
                    <execution>
                        <id>copy-artifact-to-distribution</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.directory}/distribution/share/java</outputDirectory>
                            <resources>          
                                <resource>
                                    <directory>
                                        ${project.build.directory}
                                    </directory>
                                    <includes>
                                        <include>${project.artifactId}-${project.version}.jar</include>
                                    </includes>
                                </resource>
                            </resources>              
                        </configuration>            
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.7</version>
                <dependencies>
                    <dependency>
                        <groupId>ant-contrib</groupId>
                        <artifactId>ant-contrib</artifactId>
                        <version>1.0b3</version>
                        <exclusions>
                            <exclusion>
                                <groupId>ant</groupId>
                                <artifactId>ant</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.ant</groupId>
                        <artifactId>ant-nodeps</artifactId>
                        <version>1.8.1</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>change-permissions-for-bin</id>
                        <phase>package</phase>
                        <configuration>
                            <target>
                                <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath" />
                                <trycatch property="bin-dir">
                                    <try>
                                        <chmod file="target/distribution/bin/*" perm="775" />
                                    </try>

                                    <catch>
                                        <echo>No bin directory Available</echo>
                                    </catch>
                                </trycatch>                         
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>                
                <version>3.12.0</version>
                <executions>
                    <execution>
                        <id>attach-descriptor</id>
                        <goals>
                            <goal>attach-descriptor</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <stagingDirectory>${maven-site-plugin.stagingDirectory}</stagingDirectory>
                    <skip>${maven-site-plugin.skip}</skip>
                    <skipDeploy>${maven-site-plugin.skipDeploy}</skipDeploy>
                </configuration>
            </plugin>            
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <source>17</source>
                    <target>17</target>
                    <verbose>false</verbose>
                    <compilerArgument>-parameters</compilerArgument>
                    <showDeprecation>true</showDeprecation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.0.1</version>
                <configuration>
                    <releaseProfiles>site-generation,include-nightly-tests</releaseProfiles>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <version>2.8.2</version>
                <configuration>
                    <uniqueVersion>false</uniqueVersion>
                </configuration>
            </plugin>            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>  
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>                                            
                <!-- MAKE SURE TO UPDATE THIS VERSION IN THE BUILD/PLUGINS/PLUGIN TAG AS WELL -->
                <version>3.0.0</version>
                <configuration>
                    <dependencyDetailsEnabled>true</dependencyDetailsEnabled>
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                            <report>team</report>
                            <report>mailing-lists</report>
                            <report>dependencies</report>
                            <report>ci-management</report>
                            <report>issue-management</report>
                            <report>licenses</report>
                            <report>scm</report>
                            <report>plugins</report>
                            <report>dependency-info</report>
                            <report>summary</report>                                    
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.3.2</version>
                <configuration>
                    <links>
                        <link>https://junit.org/junit5/docs/current/api/</link>
                        <link>https://activemq.apache.org/maven/apidocs/</link>
                        <link>http://docs.jboss.org/hibernate/orm/${hibernate.version}/javadocs/</link>
                        <link>http://hamcrest.org/JavaHamcrest/javadoc/1.3/</link>
                    </links>
                    <detectLinks>true</detectLinks>
                    <failOnError>false</failOnError>
                    <validateLinks>true</validateLinks>
                    <skip>${maven-javadoc-plugin.skip}</skip>
                    <additionalparam>-views -all -link</additionalparam>   
                    <useStandardDocletOptions>true</useStandardDocletOptions>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>non-aggregate</id>
                        <reports>                            
                            <report>${maven-javadoc-plugin.report}</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <aggregate>${maven-jxr-plugin.aggregate}</aggregate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>3.1.2</version>                    
                <configuration>
                    <!-- This is needed by Jacoco -->
                    <forkCount>0</forkCount>
                    <aggregate>false</aggregate>
                    <linkXRef>true</linkXRef>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>unit-tests-report</id>
                        <configuration>
                            <outputName>tests-report</outputName>
                            <reportsDirectories>
                                <reportsDirectory>${project.build.directory}/tests-report</reportsDirectory>                                        
                            </reportsDirectories>
                        </configuration>
                        <reports>
                            <report>report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jdepend-maven-plugin</artifactId>
                <version>2.0</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.3</version>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>dependency-updates-report</report>
                            <report>plugin-updates-report</report>
                            <report>property-updates-report</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <version>3.5</version>
            </plugin>
        </plugins>
    </reporting>   


    
    <scm>
        <url>https://github.com/lsst-camera-ccs/org-lsst-ccs-parent</url>
        <connection>scm:git:https://github.com/lsst-camera-ccs/org-lsst-ccs-parent.git</connection>
        <developerConnection>scm:git:https://${env.GIT_USERNAME}:${env.GIT_PASSWORD}@github.com/lsst-camera-ccs/org-lsst-ccs-parent.git</developerConnection>
        <tag>org-lsst-ccs-parent-3.1.6</tag>
    </scm>


    <distributionManagement>
        <!-- use the following if you're not using a snapshot version. -->
        <repository>
            <id>lsst-maven2</id>
            <name>LSST Maven 2 central repository</name>
            <url>https://repo-nexus.lsst.org/nexus/content/repositories/ccs-maven2/</url>
        </repository>
        <snapshotRepository>
            <id>lsst-maven2-snapshots</id>
            <name>LSST Maven2 central SNAPSHOTS repository</name>
            <url>https://repo-nexus.lsst.org/nexus/content/repositories/ccs-maven2-snapshots/</url>
        </snapshotRepository>
        <site>
            <id>github</id>
            <name>LSST Public pages in github</name>
            <url>scm:git:https://${env.GIT_USERNAME}:${env.GIT_PASSWORD}@github.com/lsst-camera-ccs/org-lsst-ccs-site.git</url>
        </site>
    </distributionManagement>

    <profiles>
        <profile>
            <id>doclint-java8-disable</id>
            <activation>
                <jdk>[1.8,</jdk>
            </activation>
            <reporting>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <doclint>none</doclint>
                        </configuration>
                    </plugin>
                </plugins>
            </reporting>            
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <configuration>
                            <additionalparam>-Xdoclint:none</additionalparam>
                            <doclint>none</doclint>
                        </configuration>
                    </plugin>            
                </plugins>
            </build>
        </profile>
        <profile>
            <id>skip-tests</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <skipTests>true</skipTests>
                        </configuration>
                    </plugin>                    
                </plugins>
            </build>
        </profile>        
        <profile>
            <!-- Profile for Site Generation -->
            <id>site-generation</id>
            <activation>
                <property>
                    <name>org.lsst.ccs.site.generation</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <maven-site-plugin.skip>false</maven-site-plugin.skip>
                <maven-site-plugin.skipDeploy>false</maven-site-plugin.skipDeploy>
            </properties>
        </profile>        
        <profile>
            <!-- Profile for Site Generation -->
            <id>sonar-activation</id>
            <activation>
                <property>
                    <name>org.lsst.ccs.sonar.activation</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <org.lsst.ccs.sonar.skip>false</org.lsst.ccs.sonar.skip>
            </properties>
        </profile>        
        <profile>
            <id>turnXlintOn</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <compilerArgs>
                                <arg>-Xlint:all</arg>
                            </compilerArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>        
        <profile>
            <id>createRpm</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>rpm-maven-plugin</artifactId>
                        <version>2.2.0</version>
                        <executions>
                            <execution>
                                <id>generate-rpm</id>
                                <goals>
                                    <goal>attached-rpm</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <needarch>true</needarch>
                            <group>CCS</group>
                            <mappings>
                                <mapping>
                                    <directory>/lsst/ccs/ccs_install/${project.build.finalName}</directory>
                                    <filemode>750</filemode>
                                    <sources>
                                        <source>
                                            <location>target/distribution/</location>
                                        </source>
                                    </sources>
                                </mapping>
                                <mapping>
                                    <directory>/lsst/ccs/ccs_install/</directory>
                                    <sources>
                                        <softlinkSource>
                                            <destination>${project.artifactId}</destination>
                                            <location>${project.build.finalName}</location>
                                        </softlinkSource>
                                    </sources>
                                </mapping>
                            </mappings>
                            <preinstallScriptlet>
                                <script>echo "installing ${project.name} now"</script>
                            </preinstallScriptlet>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>        
        <profile>
            <id>java17</id>
            <activation>
                <jdk>[17,)</jdk>
            </activation>
            <properties>
                <surefireArgLine>
                    --add-opens=java.base/java.util=ALL-UNNAMED
                    --add-opens=java.base/java.time=ALL-UNNAMED            
                    --add-opens=java.base/java.lang=ALL-UNNAMED            
                    --add-opens=java.base/java.io=ALL-UNNAMED            
                </surefireArgLine>
            </properties>
        </profile>        
    </profiles>
 
</project>

