Files
openapi-generator-original/modules/openapi-generator-mill-plugin/pom.xml
Marc Schlegel 32d4085105 Mill plugin (#22739)
* Revert "remove mill plugin (#22736)"

This reverts commit 084a0a46b4.

* Add workaround for scaladoc generation in Scala 3 & additional update after revert
2026-01-21 03:48:12 +08:00

203 lines
8.0 KiB
XML

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-project</artifactId>
<!-- RELEASE_VERSION -->
<version>7.20.0-SNAPSHOT</version>
<!-- /RELEASE_VERSION -->
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>openapi-generator-mill-plugin</artifactId>
<packaging>jar</packaging>
<name>openapi-generator-mill-plugin</name>
<description>Mill module to build modules from OpenAPI Generator</description>
<repositories>
<!-- enable central, to find Scala and Mill deps -->
<repository>
<id>central</id>
<name>Central Repository OSSRH</name>
<url>https://repo1.maven.org/maven2/</url>
</repository>
</repositories>
<properties>
<scala-plugin.version>4.9.5</scala-plugin.version>
<scala.version>3.7.4</scala.version>
<mill.version>1.0.6</mill.version>
</properties>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala3-library_3</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>com.lihaoyi</groupId>
<artifactId>mill-libs_3</artifactId>
<version>${mill.version}</version>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.lihaoyi</groupId>
<artifactId>mill-testkit_3</artifactId>
<version>${mill.version}</version>
<scope>test</scope>
</dependency>
<!-- using ScalaTest as it integrates best with TestNG -->
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_3</artifactId>
<version>3.2.19</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.scalatestplus</groupId>
<artifactId>testng-7-10_3</artifactId>
<version>3.2.19.0</version>
<scope>test</scope>
</dependency>
<!-- The following dependencies are needed to run Mill in a Unit-Test -->
<dependency>
<groupId>org.virtuslab.scala-cli</groupId>
<artifactId>config_3</artifactId>
<version>1.11.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.github.alexarchambault</groupId>
<artifactId>concurrent-reference-hash-map</artifactId>
<version>1.1.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/scala</sourceDirectory>
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>${project.parent.basedir}${file.separator}google_checkstyle.xml</configLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.5.0</version>
<executions>
<execution>
<id>add-scala-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/scala</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-scala-test-sources</id>
<phase>generate-test-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/java</source>
<source>src/test/scala</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>${scala-plugin.version}</version>
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
<execution>
<!-- see https://github.com/davidB/scala-maven-plugin/issues/604 why a workaround is needed -->
<id>attach-javadocs</id>
<goals>
<goal>doc-jar</goal>
</goals>
<configuration>
<scaladocClassName>dotty.tools.scaladoc.Main</scaladocClassName>
<sourceDir>${project.build.outputDirectory}</sourceDir>
<args>-nobootcp</args>
<includes>
<include>**/*.tasty</include>
</includes>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scaladoc_3</artifactId>
<version>3.7.4</version>
</dependency>
</dependencies>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<environmentVariables>
<MILL_TEST_RESOURCE_DIR>${project.basedir}/src/test/resources</MILL_TEST_RESOURCE_DIR>
</environmentVariables>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>static-analysis</id>
<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<configuration>
<excludeFilterFile>${project.parent.basedir}${file.separator}spotbugs-exclude.xml</excludeFilterFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
</plugin>
<plugin>
<groupId>se.bjurr.violations</groupId>
<artifactId>violations-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>