<?xml version="1.0" encoding="UTF-8"?>
<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>
    <parent>
        <groupId>org.scijava</groupId>
        <artifactId>pom-scijava</artifactId>
        <version>45.0.0</version>
        <relativePath />
    </parent>

    <groupId>io.github.cmessaoudi</groupId>
    <artifactId>Mic-Learning</artifactId>
    <version>1.2.0</version>

    <name>MIC-Learning</name>
    <description>
        ImageJ/Fiji plugin for deep learning and machine learning workflows.
    </description>
    <url> https://github.com/MultimodalImagingCenter/MIC-Learning </url>
    <inceptionYear>2026</inceptionYear>
    <organization>
        <name>Multimodal-Imaging-Center</name>
        <url>https://institut-curie.org/platform/curiecoretech-multimodal-imaging-center-uar2016-us43</url>
    </organization>
    <licenses>
        <license>
            <name>Institut Curie Software License</name>
            <url>https://raw.githubusercontent.com/MultimodalImagingCenter/MIC-Learning/main/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>cmessaoudi</id>
            <name>Cedric Messaoudi</name>
            <organization>Institut Curie</organization>
            <url>https://institut-curie.org/personne/cedric-messaoudi</url>
            <roles>
                <role>founder</role>
                <role>lead</role>
                <role>developer</role>
                <role>debugger</role>
                <role>reviewer</role>
                <role>support</role>
                <role>maintainer</role>
            </roles>
        </developer>
        <developer>
            <id>noemie-bozier</id>
            <name>Noemie Bozier</name>
            <organization>Institut Curie</organization>
            <roles>
                <role>founder</role>
                <role>developer</role>
                <role>debugger</role>
                <role>support</role>
                <role>maintainer</role>
            </roles>
        </developer>
    </developers>
    <contributors>
        <contributor>
            <name>Laetitia Besse</name>
            <url>https://curie.fr/personne/laetitia-besse</url>
            <roles>
                <role>reviewer</role>
            </roles>
            <!--properties><id></id></properties-->
        </contributor>
        <contributor>
            <name>Christine Walczak</name>
            <url>https://curie.fr/personne/christine-walczak</url>
            <roles>
                <role>reviewer</role>
            </roles>
            <!--properties><id></id></properties-->
        </contributor>
    </contributors>

    <mailingLists>
        <mailingList>
            <name>Image.sc Forum</name>
            <archive>https://forum.image.sc/</archive>
        </mailingList>
    </mailingLists>

    <scm>
        <connection>
            scm:git:git://github.com/MultimodalImagingCenter/MIC-Learning.git
        </connection>
        <developerConnection>
            scm:git:ssh://github.com:MultimodalImagingCenter/MIC-Learning.git
        </developerConnection>
        <url>
            https://github.com/MultimodalImagingCenter/MIC-Learning
        </url>
    </scm>

    <issueManagement>
        <system>GitHub Issues</system>
        <url>https://github.com/MultimodalImagingCenter/MIC-Learning/issues</url>
    </issueManagement>

    <ciManagement>
        <system>GitHub Actions</system>
        <url>https://github.com/MultimodalImagingCenter/MIC-Learning/actions/new</url>
    </ciManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <package-name>fr.curie.mic_learning</package-name>
        <license.licenseName>Institut Curie</license.licenseName>
        <license.copyrightOwners>Multimodal-Imaging-Center</license.copyrightOwners>
        <!-- NB: Deploy releases to the SciJava Maven repository. -->
        <releaseProfiles>sign,deploy-to-scijava</releaseProfiles>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>ai.djl</groupId>
                <artifactId>bom</artifactId>
                <version>0.34.0</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <repositories>
        <repository>
            <id>scijava.public</id>
            <url>https://maven.scijava.org/content/repositories/public/</url>
        </repository>
    </repositories>

    <dependencies>
        <!-- ImageJ -->
        <dependency>
            <groupId>net.imagej</groupId>
            <artifactId>ij</artifactId>
            <version>1.53t</version>
            <scope>provided</scope>
        </dependency>

        <!-- DJL main API-->
        <dependency>
            <groupId>ai.djl</groupId>
            <artifactId>api</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/ai.djl/basicdataset -->
        <dependency>
            <groupId>ai.djl</groupId>
            <artifactId>model-zoo</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/ai.djl.pytorch/pytorch-engine -->
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-engine</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/ai.djl.pytorch/pytorch-model-zoo -->
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-model-zoo</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/ai.djl.pytorch/pytorch-native-cu124 -->
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-native-cu124</artifactId>
            <version>2.5.1</version>
            <scope>runtime</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/ai.djl.pytorch/pytorch-jni -->
        <dependency>
            <groupId>ai.djl.pytorch</groupId>
            <artifactId>pytorch-jni</artifactId>
            <version>2.5.1-0.34.0</version>
            <scope>runtime</scope>
        </dependency>


        <!-- Runtime TensorFlow -->
        <dependency>
            <groupId>ai.djl.tensorflow</groupId>
            <artifactId>tensorflow-engine</artifactId>
        </dependency>

        <dependency>
            <groupId>ai.djl.tensorflow</groupId>
            <artifactId>tensorflow-native-cpu</artifactId>
            <version>2.16.1</version>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>ai.djl.tensorflow</groupId>
            <artifactId>tensorflow-api</artifactId>
        </dependency>

        <!-- Runtime MXnet -->
        <dependency>
            <groupId>ai.djl.mxnet</groupId>
            <artifactId>mxnet-engine</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/ai.djl.mxnet/mxnet-model-zoo -->
        <dependency>
            <groupId>ai.djl.mxnet</groupId>
            <artifactId>mxnet-model-zoo</artifactId>
        </dependency>


        <!-- Runtime ONNX -->
        <dependency>
            <groupId>ai.djl.onnxruntime</groupId>
            <artifactId>onnxruntime-engine</artifactId>
            <scope>runtime</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/ai.djl.onnxruntime/onnxruntime-native-auto -->
        <dependency>
            <groupId>ai.djl.onnxruntime</groupId>
            <artifactId>onnxruntime-native-auto</artifactId>
            <version>1.3.0</version>
            <scope>runtime</scope>

        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
            <version>3.18.0</version>
        </dependency>
        <dependency>
            <groupId>org.apposed</groupId>
            <artifactId>appose</artifactId>
            <version>0.11.0</version>
        </dependency>

        <!-- Source: https://mvnrepository.com/artifact/net.imglib2/imglib2-appose -->
        <dependency>
            <groupId>net.imglib2</groupId>
            <artifactId>imglib2-appose</artifactId>
            <version>0.4.0</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>net.imglib2</groupId>
            <artifactId>imglib2-ij</artifactId>
            <version>2.0.2</version>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <createDependencyReducedPom>false</createDependencyReducedPom>

                            <shadedArtifactAttached>true</shadedArtifactAttached>
                            <shadedClassifierName>all</shadedClassifierName>


                            <transformers>
                                <!-- standard service loader files -->
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
                                <!-- standard license files -->
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheLicenseResourceTransformer"/>
                                <!-- standard notice files -->
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ApacheNoticeResourceTransformer"/>
                                <!-- final MANIFEST.MF -->
                                <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"/>
                                <!-- non-standard files -->
                                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/LICENSE-LGPL-2.1.txt</resource>
                                </transformer>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/LICENSE-LGPL-3.txt</resource>
                                </transformer>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/LICENSE-W3C-TEST</resource>
                                </transformer>
                                <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                    <resource>META-INF/DEPENDENCIES</resource>
                                </transformer>
                            </transformers>

                            <relocations>
                                <relocation>
                                    <pattern>com.google.protobuf</pattern>
                                    <shadedPattern>fr.curie.shaded.com.google.protobuf</shadedPattern>
                                </relocation>
                            </relocations>
                            <createDependencyReducedPom>false</createDependencyReducedPom>
                            <filters>
                                <filter>
                                    <artifact>*:*</artifact>
                                    <excludes>
                                        <!-- silence the benign manifest warning -->
                                        <exclude>META-INF/MANIFEST.MF</exclude>
                                        <exclude>module-info.class</exclude>
                                        <exclude>META-INF/versions/*/module-info.class</exclude>
                                        <!-- exclude signature files -->
                                        <exclude>META-INF/*.SF</exclude>
                                        <exclude>META-INF/*.DSA</exclude>
                                        <exclude>META-INF/*.RSA</exclude>
                                    </excludes>
                                </filter>
                            </filters>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.13.0</version>
                <configuration>
                    <source>${maven.compiler.source}</source>
                    <target>${maven.compiler.target}</target>
                </configuration>
            </plugin>
<!-- generate javadoc -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.11.2</version>

                <configuration>
                    <doclint>none</doclint>
                    <source>8</source>
                    <useModulePath>false</useModulePath>

                    <classpathDependencyExcludes>
                        <classpathDependencyExclude>ai.djl.onnxruntime:onnxruntime-native-auto</classpathDependencyExclude>
                    </classpathDependencyExcludes>
                </configuration>

                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
    <!-- signing jar for security (maven) -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
                <version>3.2.8</version>

                <executions>
                    <execution>
                        <id>sign-artifacts</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>

                <configuration>
                    <bestPractices>true</bestPractices>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.11.0</version>
                <extensions>true</extensions>

                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>false</autoPublish>
                </configuration>
            </plugin>
        </plugins>
    </build>

</project>

