<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>org.girod</groupId-->
   <groupId>se.alipsa</groupId>
   <artifactId>fxsvgimage</artifactId>
   <version>1.4.2</version>
   <name>fxsvgimage</name>
   <description>A small self-sufficient library which allows to convert a SVG file to a JavaFX Node tree or an Image (no dependencies)</description>

   <url>https://github.com/Alipsa/gsvg</url>

   <licenses>
      <license>
         <name>BSD 3-Clause License</name>
         <url>https://raw.githubusercontent.com/hervegirod/fxsvgimage/refs/heads/main/LICENSE</url>
         <distribution>repo</distribution>
      </license>
   </licenses>

   <developers>
      <developer>
          <id>herveGirod</id>
          <name>Hervé Girod</name>
      </developer>
      <developer>
         <id>perNyfelt</id>
         <name>Per Nyfelt</name>
      </developer>
      <developer>
         <id>pascalgn</id>
         <name>Pascal</name>
      </developer>
   </developers>

   <scm>
      <url>https://github.com/perNyfelt/fxsvgimage/tree/main/</url>
      <connection>scm:git:https://github.com/perNyfelt/fxsvgimage.git</connection>
      <developerConnection>scm:git:https://github.com/perNyfelt/fxsvgimage.git</developerConnection>
      <tag>HEAD</tag>
   </scm>

   <properties>
      <maven.compiler.source>1.8</maven.compiler.source>
      <maven.compiler.target>1.8</maven.compiler.target>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
   </properties>

   <dependencies>
      <!-- https://mvnrepository.com/artifact/org.apache.groovy/groovy -->
      <dependency>
         <groupId>org.apache.groovy</groupId>
         <artifactId>groovy</artifactId>
         <version>4.0.26</version>
         <scope>test</scope>
      </dependency>

      <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
         <version>4.13.2</version>
         <scope>test</scope>
      </dependency>
   </dependencies>

   <build>
      <sourceDirectory>${project.basedir}/src/core</sourceDirectory>
      <testSourceDirectory>${project.basedir}/test</testSourceDirectory>
      <testResources>
         <testResource>
            <directory>${project.basedir}/src/test</directory>
            <excludes>
               <exclude>**/*.java</exclude>
            </excludes>
         </testResource>
      </testResources>        
      <plugins>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <version>3.5.0</version>
            <executions>
               <execution>
                  <phase>generate-sources</phase>
                  <goals>
                     <goal>add-source</goal>
                  </goals>
                  <configuration>
                     <sources>
                        <source>src/tosvg</source>
                     </sources>
                  </configuration>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
               <execution>
                  <id>copy_images</id>
                  <phase>generate-test-resources</phase>
                  <configuration>
                     <target>
                        <copy toDir="${project.build.testOutputDirectory}">
                           <fileset dir="${project.build.testSourceDirectory}"
                                    includes="org/girod/javafx/svgimage/**/*.svg"/>
                        </copy>
                     </target>
                  </configuration>
                  <goals>
                     <goal>run</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>3.3.0</version>
            <executions>
               <execution>
                  <id>attach-sources</id>
                  <goals>
                     <goal>jar-no-fork</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>3.3.0</version>
            <configuration>
               <archive>
                  <manifestFile>${project.basedir}/src/core/manifest.mf</manifestFile>
               </archive>
            </configuration>
         </plugin>
         <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.6.3</version>
            <executions>
               <execution>
                  <id>attach-javadocs</id>
                  <goals>
                     <goal>jar</goal>
                  </goals>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>

   <profiles>
      <profile>
         <!--
         Note: To be able to sign and publish you need to add the below section to you ~/.m2/settings.xml
         Then you can simply publish to Sonatype by typing: mvn -Prelease clean deploy
         See https://central.sonatype.org/publish/publish-guide/ and https://central.sonatype.org/publish/publish-maven/ for details.
         <settings>
               <servers>
                 <server>
                         <id>gpg.passphrase</id>
                         <passphrase>your_secret_gpg_password</passphrase>
                     </server>
                     <server>
                         <id>ossrh</id>
                         <username>Your_Sonatype_username</username>
                         <password>Your_Sonatype_password</password>
                     </server>
               </servers>
           </settings>
         -->
         <id>release</id>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-gpg-plugin</artifactId>
                  <version>3.1.0</version>
                  <executions>
                     <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                           <goal>sign</goal>
                        </goals>
                     </execution>
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.sonatype.central</groupId>
                  <artifactId>central-publishing-maven-plugin</artifactId>
                  <version>0.9.0</version>
                  <extensions>true</extensions>
                  <configuration>
                     <publishingServerId>central</publishingServerId>
                     <autoPublish>true</autoPublish>
                     <deploymentName>${project.groupId}:${project.artifactId}:${project.version}</deploymentName>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>