714 lines
29 KiB
Diff
714 lines
29 KiB
Diff
From ce0929d03ba33ff98727fbd527f4ec94412f78bd Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
|
Date: Wed, 4 Oct 2023 08:26:00 +0200
|
|
Subject: [PATCH 6/7] Test variable expansion in artifactId
|
|
|
|
---
|
|
.../test_artifactid_expansion-want.xml | 34 ++
|
|
test/data/install_pom/xgboost/pom.xml | 499 ++++++++++++++++++
|
|
.../install_pom/xgboost/xgboost4j/pom.xml | 125 +++++
|
|
test/install_pom_test.py | 7 +
|
|
4 files changed, 665 insertions(+)
|
|
create mode 100644 test/data/install_pom/test_artifactid_expansion-want.xml
|
|
create mode 100644 test/data/install_pom/xgboost/pom.xml
|
|
create mode 100644 test/data/install_pom/xgboost/xgboost4j/pom.xml
|
|
|
|
diff --git a/test/data/install_pom/test_artifactid_expansion-want.xml b/test/data/install_pom/test_artifactid_expansion-want.xml
|
|
new file mode 100644
|
|
index 00000000..ce5fdcf8
|
|
--- /dev/null
|
|
+++ b/test/data/install_pom/test_artifactid_expansion-want.xml
|
|
@@ -0,0 +1,34 @@
|
|
+<?xml version='1.0' encoding='UTF-8'?>
|
|
+<project xmlns="http://maven.apache.org/POM/4.0.0">
|
|
+ <modelVersion>4.0.0</modelVersion>
|
|
+ <groupId>ml.dmlc</groupId>
|
|
+ <artifactId>xgboost4j_2.12</artifactId>
|
|
+ <version>2.0.0</version>
|
|
+ <dependencies>
|
|
+ <dependency>
|
|
+ <groupId>org.scala-lang</groupId>
|
|
+ <artifactId>scala-compiler</artifactId>
|
|
+ <version>2.12.18</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.scala-lang</groupId>
|
|
+ <artifactId>scala-library</artifactId>
|
|
+ <version>2.12.18</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.scala-lang.modules</groupId>
|
|
+ <artifactId>scala-collection-compat_2.12</artifactId>
|
|
+ <version>2.10.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>com.esotericsoftware</groupId>
|
|
+ <artifactId>kryo</artifactId>
|
|
+ <version>5.5.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>commons-logging</groupId>
|
|
+ <artifactId>commons-logging</artifactId>
|
|
+ <version>1.2</version>
|
|
+ </dependency>
|
|
+ </dependencies>
|
|
+</project>
|
|
\ No newline at end of file
|
|
diff --git a/test/data/install_pom/xgboost/pom.xml b/test/data/install_pom/xgboost/pom.xml
|
|
new file mode 100644
|
|
index 00000000..80caa132
|
|
--- /dev/null
|
|
+++ b/test/data/install_pom/xgboost/pom.xml
|
|
@@ -0,0 +1,499 @@
|
|
+<?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>
|
|
+
|
|
+ <groupId>ml.dmlc</groupId>
|
|
+ <artifactId>xgboost-jvm</artifactId>
|
|
+ <version>2.0.0</version>
|
|
+ <packaging>pom</packaging>
|
|
+ <name>XGBoost JVM Package</name>
|
|
+ <description>JVM Package for XGBoost</description>
|
|
+ <url>https://github.com/dmlc/xgboost/tree/master/jvm-packages</url>
|
|
+ <licenses>
|
|
+ <license>
|
|
+ <name>The Apache License, Version 2.0</name>
|
|
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
|
+ </license>
|
|
+ </licenses>
|
|
+ <developers>
|
|
+ <developer>
|
|
+ <name>CodingCat</name>
|
|
+ <email>codingcat@apache.org</email>
|
|
+ </developer>
|
|
+ </developers>
|
|
+ <scm>
|
|
+ <connection>scm:git:git:/github.com/dmlc/xgboost.git</connection>
|
|
+ <developerConnection>scm:git:ssh://github.com/dmlc/xgboost.git</developerConnection>
|
|
+ <url>https://github.com/dmlc/xgboost</url>
|
|
+ </scm>
|
|
+ <properties>
|
|
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
|
+ <maven.compiler.source>1.8</maven.compiler.source>
|
|
+ <maven.compiler.target>1.8</maven.compiler.target>
|
|
+ <flink.version>1.17.1</flink.version>
|
|
+ <junit.version>4.13.2</junit.version>
|
|
+ <spark.version>3.4.0</spark.version>
|
|
+ <spark.version.gpu>3.3.2</spark.version.gpu>
|
|
+ <scala.version>2.12.18</scala.version>
|
|
+ <scala.binary.version>2.12</scala.binary.version>
|
|
+ <hadoop.version>3.3.5</hadoop.version>
|
|
+ <maven.wagon.http.retryHandler.count>5</maven.wagon.http.retryHandler.count>
|
|
+ <log.capi.invocation>OFF</log.capi.invocation>
|
|
+ <use.cuda>OFF</use.cuda>
|
|
+ <cudf.version>23.08.0</cudf.version>
|
|
+ <spark.rapids.version>23.08.0</spark.rapids.version>
|
|
+ <cudf.classifier>cuda11</cudf.classifier>
|
|
+ <scalatest.version>3.2.16</scalatest.version>
|
|
+ <scala-collection-compat.version>2.10.0</scala-collection-compat.version>
|
|
+ </properties>
|
|
+ <repositories>
|
|
+ <repository>
|
|
+ <id>central_maven</id>
|
|
+ <name>central maven</name>
|
|
+ <url>https://repo1.maven.org/maven2</url>
|
|
+ </repository>
|
|
+ </repositories>
|
|
+ <modules>
|
|
+ </modules>
|
|
+
|
|
+ <profiles>
|
|
+ <profile>
|
|
+ <!-- default active profile excluding gpu related test suites -->
|
|
+ <id>default</id>
|
|
+ <activation>
|
|
+ <activeByDefault>true</activeByDefault>
|
|
+ </activation>
|
|
+ <modules>
|
|
+ <module>xgboost4j</module>
|
|
+ <module>xgboost4j-example</module>
|
|
+ <module>xgboost4j-spark</module>
|
|
+ <module>xgboost4j-flink</module>
|
|
+ </modules>
|
|
+ </profile>
|
|
+
|
|
+ <profile>
|
|
+ <id>scala-2.13</id>
|
|
+ <properties>
|
|
+ <scala.binary.version>2.13</scala.binary.version>
|
|
+ <scala.version>2.13.11</scala.version>
|
|
+ </properties>
|
|
+ </profile>
|
|
+
|
|
+ <!-- gpu profile with both cpu and gpu test suites -->
|
|
+ <profile>
|
|
+ <id>gpu</id>
|
|
+ <activation>
|
|
+ <property>
|
|
+ <name>use.cuda</name>
|
|
+ <value>ON</value>
|
|
+ </property>
|
|
+ </activation>
|
|
+ <properties>
|
|
+ <use.cuda>ON</use.cuda>
|
|
+ </properties>
|
|
+ <modules>
|
|
+ <module>xgboost4j-gpu</module>
|
|
+ <module>xgboost4j-spark-gpu</module>
|
|
+ </modules>
|
|
+ </profile>
|
|
+
|
|
+ <profile>
|
|
+ <id>release</id>
|
|
+ <modules>
|
|
+ <module>xgboost4j</module>
|
|
+ <module>xgboost4j-example</module>
|
|
+ <module>xgboost4j-spark</module>
|
|
+ <module>xgboost4j-flink</module>
|
|
+ <module>xgboost4j-gpu</module>
|
|
+ <module>xgboost4j-spark-gpu</module>
|
|
+ </modules>
|
|
+ <build>
|
|
+ <plugins>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-jar-plugin</artifactId>
|
|
+ <version>3.3.0</version>
|
|
+ <executions>
|
|
+ <execution>
|
|
+ <id>empty-javadoc-jar</id>
|
|
+ <phase>package</phase>
|
|
+ <goals>
|
|
+ <goal>jar</goal>
|
|
+ </goals>
|
|
+ <configuration>
|
|
+ <classifier>javadoc</classifier>
|
|
+ <classesDirectory>${basedir}/javadoc</classesDirectory>
|
|
+ </configuration>
|
|
+ </execution>
|
|
+ </executions>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-release-plugin</artifactId>
|
|
+ <version>3.0.1</version>
|
|
+ <configuration>
|
|
+ <autoVersionSubmodules>true</autoVersionSubmodules>
|
|
+ <useReleaseProfile>false</useReleaseProfile>
|
|
+ <releaseProfiles>release</releaseProfiles>
|
|
+ <goals>deploy</goals>
|
|
+ </configuration>
|
|
+ </plugin>
|
|
+ <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.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.sonatype.plugins</groupId>
|
|
+ <artifactId>nexus-staging-maven-plugin</artifactId>
|
|
+ <version>1.6.13</version>
|
|
+ <extensions>true</extensions>
|
|
+ <configuration>
|
|
+ <serverId>ossrh</serverId>
|
|
+ <nexusUrl>https://oss.sonatype.org/</nexusUrl>
|
|
+ <autoReleaseAfterClose>false</autoReleaseAfterClose>
|
|
+ </configuration>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-surefire-plugin</artifactId>
|
|
+ <configuration>
|
|
+ <skipTests>true</skipTests>
|
|
+ </configuration>
|
|
+ </plugin>
|
|
+ </plugins>
|
|
+ </build>
|
|
+ </profile>
|
|
+ <profile>
|
|
+ <id>assembly</id>
|
|
+ <build>
|
|
+ <plugins>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-assembly-plugin</artifactId>
|
|
+ <version>3.6.0</version>
|
|
+ <configuration>
|
|
+ <descriptorRefs>
|
|
+ <descriptorRef>jar-with-dependencies</descriptorRef>
|
|
+ </descriptorRefs>
|
|
+ <skipAssembly>true</skipAssembly>
|
|
+ </configuration>
|
|
+ <executions>
|
|
+ <execution>
|
|
+ <id>make-assembly</id>
|
|
+ <phase>package</phase>
|
|
+ <goals>
|
|
+ <goal>single</goal>
|
|
+ </goals>
|
|
+ </execution>
|
|
+ </executions>
|
|
+ </plugin>
|
|
+ </plugins>
|
|
+ </build>
|
|
+ </profile>
|
|
+ <profile>
|
|
+ <id>release-to-github</id>
|
|
+ <distributionManagement>
|
|
+ <repository>
|
|
+ <id>github.repo</id>
|
|
+ <name>Temporary Staging Repository</name>
|
|
+ <url>file://${project.build.directory}/mvn-repo</url>
|
|
+ </repository>
|
|
+ </distributionManagement>
|
|
+ <properties>
|
|
+ <github.global.server>github</github.global.server>
|
|
+ </properties>
|
|
+ <modules>
|
|
+ <module>xgboost4j</module>
|
|
+ <module>xgboost4j-example</module>
|
|
+ <module>xgboost4j-spark</module>
|
|
+ <module>xgboost4j-flink</module>
|
|
+ <module>xgboost4j-gpu</module>
|
|
+ <module>xgboost4j-spark-gpu</module>
|
|
+ </modules>
|
|
+ <build>
|
|
+ <plugins>
|
|
+ <plugin>
|
|
+ <groupId>com.github.github</groupId>
|
|
+ <artifactId>site-maven-plugin</artifactId>
|
|
+ <version>0.12</version>
|
|
+ <configuration>
|
|
+ <message>Maven artifacts for ${project.version}</message>
|
|
+ <noJekyll>true</noJekyll>
|
|
+ <outputDirectory>${project.build.directory}/mvn-repo</outputDirectory>
|
|
+ <branch>refs/heads/maven-repo</branch>
|
|
+ <excludes>
|
|
+ <exclude>*-with-dependencies.jar</exclude>
|
|
+ </excludes>
|
|
+ <repositoryName>xgboost</repositoryName>
|
|
+ <repositoryOwner>CodingCat</repositoryOwner>
|
|
+ <merge>true</merge>
|
|
+ </configuration>
|
|
+ <executions>
|
|
+ <!-- run site-maven-plugin's 'site' target as part of the build's normal 'deploy' phase -->
|
|
+ <execution>
|
|
+ <goals>
|
|
+ <goal>site</goal>
|
|
+ </goals>
|
|
+ <phase>deploy</phase>
|
|
+ </execution>
|
|
+ </executions>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-deploy-plugin</artifactId>
|
|
+ <version>3.1.1</version>
|
|
+ <configuration>
|
|
+ <altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo</altDeploymentRepository>
|
|
+ </configuration>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-surefire-plugin</artifactId>
|
|
+ <configuration>
|
|
+ <skipTests>true</skipTests>
|
|
+ </configuration>
|
|
+ </plugin>
|
|
+ </plugins>
|
|
+ </build>
|
|
+ </profile>
|
|
+ <profile>
|
|
+ <id>release-to-s3</id>
|
|
+ <distributionManagement>
|
|
+ <snapshotRepository>
|
|
+ <id>maven-s3-snapshot-repo</id>
|
|
+ <url>s3://xgboost-maven-repo/snapshot</url>
|
|
+ </snapshotRepository>
|
|
+ <repository>
|
|
+ <id>maven-s3-release-repo</id>
|
|
+ <url>s3://xgboost-maven-repo/release</url>
|
|
+ </repository>
|
|
+ </distributionManagement>
|
|
+ <repositories>
|
|
+ <repository>
|
|
+ <id>maven-s3-snapshot-repo</id>
|
|
+ <url>https://s3.amazonaws.com/xgboost-maven-repo/snapshot</url>
|
|
+ </repository>
|
|
+ <repository>
|
|
+ <id>maven-s3-release-repo</id>
|
|
+ <url>https://s3.amazonaws.com/xgboost-maven-repo/release</url>
|
|
+ </repository>
|
|
+ </repositories>
|
|
+ <build>
|
|
+ <plugins>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-surefire-plugin</artifactId>
|
|
+ <configuration>
|
|
+ <skipTests>true</skipTests>
|
|
+ </configuration>
|
|
+ </plugin>
|
|
+ </plugins>
|
|
+ </build>
|
|
+ </profile>
|
|
+ </profiles>
|
|
+ <distributionManagement>
|
|
+ <snapshotRepository>
|
|
+ <id>ossrh</id>
|
|
+ <url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
|
+ </snapshotRepository>
|
|
+ </distributionManagement>
|
|
+ <build>
|
|
+ <resources>
|
|
+ <resource>
|
|
+ <directory>src/main/resources</directory>
|
|
+ <filtering>true</filtering>
|
|
+ </resource>
|
|
+ </resources>
|
|
+
|
|
+ <pluginManagement>
|
|
+ <plugins>
|
|
+ <plugin>
|
|
+ <groupId>org.scalatest</groupId>
|
|
+ <artifactId>scalatest-maven-plugin</artifactId>
|
|
+ <version>2.2.0</version>
|
|
+ <executions>
|
|
+ <execution>
|
|
+ <id>test</id>
|
|
+ <goals>
|
|
+ <goal>test</goal>
|
|
+ </goals>
|
|
+ </execution>
|
|
+ </executions>
|
|
+ </plugin>
|
|
+ </plugins>
|
|
+ </pluginManagement>
|
|
+
|
|
+ <plugins>
|
|
+ <plugin>
|
|
+ <groupId>org.scalastyle</groupId>
|
|
+ <artifactId>scalastyle-maven-plugin</artifactId>
|
|
+ <version>1.0.0</version>
|
|
+ <configuration>
|
|
+ <verbose>false</verbose>
|
|
+ <failOnViolation>true</failOnViolation>
|
|
+ <includeTestSourceDirectory>true</includeTestSourceDirectory>
|
|
+ <sourceDirectory>${basedir}/src/main/scala</sourceDirectory>
|
|
+ <testSourceDirectory>${basedir}/src/test/scala</testSourceDirectory>
|
|
+ <configLocation>scalastyle-config.xml</configLocation>
|
|
+ <outputEncoding>UTF-8</outputEncoding>
|
|
+ </configuration>
|
|
+ <executions>
|
|
+ <execution>
|
|
+ <id>checkstyle</id>
|
|
+ <phase>validate</phase>
|
|
+ <goals>
|
|
+ <goal>check</goal>
|
|
+ </goals>
|
|
+ </execution>
|
|
+ </executions>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-site-plugin</artifactId>
|
|
+ <version>3.12.1</version>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-checkstyle-plugin</artifactId>
|
|
+ <version>3.3.0</version>
|
|
+ <configuration>
|
|
+ <configLocation>checkstyle.xml</configLocation>
|
|
+ <failOnViolation>true</failOnViolation>
|
|
+ </configuration>
|
|
+ <executions>
|
|
+ <execution>
|
|
+ <id>checkstyle</id>
|
|
+ <phase>validate</phase>
|
|
+ <goals>
|
|
+ <goal>check</goal>
|
|
+ </goals>
|
|
+ </execution>
|
|
+ </executions>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>net.alchim31.maven</groupId>
|
|
+ <artifactId>scala-maven-plugin</artifactId>
|
|
+ <version>4.8.1</version>
|
|
+ <executions>
|
|
+ <execution>
|
|
+ <id>compile</id>
|
|
+ <goals>
|
|
+ <goal>compile</goal>
|
|
+ </goals>
|
|
+ <phase>compile</phase>
|
|
+ </execution>
|
|
+ <execution>
|
|
+ <id>test-compile</id>
|
|
+ <goals>
|
|
+ <goal>testCompile</goal>
|
|
+ </goals>
|
|
+ <phase>test-compile</phase>
|
|
+ </execution>
|
|
+ <execution>
|
|
+ <phase>process-resources</phase>
|
|
+ <goals>
|
|
+ <goal>compile</goal>
|
|
+ </goals>
|
|
+ </execution>
|
|
+ <execution>
|
|
+ <id>scala-compile-first</id>
|
|
+ <phase>process-resources</phase>
|
|
+ <goals>
|
|
+ <goal>compile</goal>
|
|
+ <goal>add-source</goal>
|
|
+ </goals>
|
|
+ </execution>
|
|
+ </executions>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-surefire-plugin</artifactId>
|
|
+ <version>3.1.2</version>
|
|
+ <configuration>
|
|
+ <skipTests>false</skipTests>
|
|
+ <useSystemClassLoader>false</useSystemClassLoader>
|
|
+ </configuration>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>org.scalatest</groupId>
|
|
+ <artifactId>scalatest-maven-plugin</artifactId>
|
|
+ </plugin>
|
|
+ </plugins>
|
|
+ <extensions>
|
|
+ <extension>
|
|
+ <groupId>com.github.seahen</groupId>
|
|
+ <artifactId>maven-s3-wagon</artifactId>
|
|
+ <version>1.3.3</version>
|
|
+ </extension>
|
|
+ </extensions>
|
|
+ </build>
|
|
+ <reporting>
|
|
+ <plugins>
|
|
+ <plugin>
|
|
+ <artifactId>maven-project-info-reports-plugin</artifactId>
|
|
+ <version>3.4.5</version>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>net.alchim31.maven</groupId>
|
|
+ <artifactId>scala-maven-plugin</artifactId>
|
|
+ <version>4.8.1</version>
|
|
+ <configuration>
|
|
+ <jvmArgs>
|
|
+ <jvmArg>-Xms64m</jvmArg>
|
|
+ <jvmArg>-Xmx1024m</jvmArg>
|
|
+ </jvmArgs>
|
|
+ </configuration>
|
|
+ </plugin>
|
|
+ </plugins>
|
|
+ </reporting>
|
|
+ <dependencies>
|
|
+ <dependency>
|
|
+ <groupId>com.esotericsoftware</groupId>
|
|
+ <artifactId>kryo</artifactId>
|
|
+ <version>5.5.0</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>commons-logging</groupId>
|
|
+ <artifactId>commons-logging</artifactId>
|
|
+ <version>1.2</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.scalatest</groupId>
|
|
+ <artifactId>scalatest_${scala.binary.version}</artifactId>
|
|
+ <version>${scalatest.version}</version>
|
|
+ <scope>test</scope>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.scalactic</groupId>
|
|
+ <artifactId>scalactic_${scala.binary.version}</artifactId>
|
|
+ <version>${scalatest.version}</version>
|
|
+ <scope>test</scope>
|
|
+ </dependency>
|
|
+ </dependencies>
|
|
+</project>
|
|
diff --git a/test/data/install_pom/xgboost/xgboost4j/pom.xml b/test/data/install_pom/xgboost/xgboost4j/pom.xml
|
|
new file mode 100644
|
|
index 00000000..8d4f2c05
|
|
--- /dev/null
|
|
+++ b/test/data/install_pom/xgboost/xgboost4j/pom.xml
|
|
@@ -0,0 +1,125 @@
|
|
+<?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>ml.dmlc</groupId>
|
|
+ <artifactId>xgboost-jvm</artifactId>
|
|
+ <version>2.0.0</version>
|
|
+ </parent>
|
|
+ <name>xgboost4j</name>
|
|
+ <artifactId>xgboost4j_${scala.binary.version}</artifactId>
|
|
+ <version>2.0.0</version>
|
|
+ <packaging>jar</packaging>
|
|
+
|
|
+ <dependencies>
|
|
+ <dependency>
|
|
+ <groupId>org.scala-lang</groupId>
|
|
+ <artifactId>scala-compiler</artifactId>
|
|
+ <version>${scala.version}</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.scala-lang</groupId>
|
|
+ <artifactId>scala-library</artifactId>
|
|
+ <version>${scala.version}</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.scala-lang.modules</groupId>
|
|
+ <artifactId>scala-collection-compat_${scala.binary.version}</artifactId>
|
|
+ <version>${scala-collection-compat.version}</version>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.hadoop</groupId>
|
|
+ <artifactId>hadoop-hdfs</artifactId>
|
|
+ <version>${hadoop.version}</version>
|
|
+ <scope>provided</scope>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.apache.hadoop</groupId>
|
|
+ <artifactId>hadoop-common</artifactId>
|
|
+ <version>${hadoop.version}</version>
|
|
+ <scope>provided</scope>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>junit</groupId>
|
|
+ <artifactId>junit</artifactId>
|
|
+ <version>${junit.version}</version>
|
|
+ <scope>test</scope>
|
|
+ </dependency>
|
|
+ <dependency>
|
|
+ <groupId>org.scalatest</groupId>
|
|
+ <artifactId>scalatest_${scala.binary.version}</artifactId>
|
|
+ <version>${scalatest.version}</version>
|
|
+ <scope>provided</scope>
|
|
+ </dependency>
|
|
+ </dependencies>
|
|
+
|
|
+ <build>
|
|
+ <plugins>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-javadoc-plugin</artifactId>
|
|
+ <version>3.5.0</version>
|
|
+ <configuration>
|
|
+ <show>protected</show>
|
|
+ <nohelp>true</nohelp>
|
|
+ </configuration>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-assembly-plugin</artifactId>
|
|
+ <configuration>
|
|
+ <skipAssembly>false</skipAssembly>
|
|
+ </configuration>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <artifactId>exec-maven-plugin</artifactId>
|
|
+ <groupId>org.codehaus.mojo</groupId>
|
|
+ <version>3.1.0</version>
|
|
+ <executions>
|
|
+ <execution>
|
|
+ <id>native</id>
|
|
+ <phase>generate-sources</phase>
|
|
+ <goals>
|
|
+ <goal>exec</goal>
|
|
+ </goals>
|
|
+ <configuration>
|
|
+ <executable>python</executable>
|
|
+ <arguments>
|
|
+ <argument>create_jni.py</argument>
|
|
+ <argument>--log-capi-invocation</argument>
|
|
+ <argument>${log.capi.invocation}</argument>
|
|
+ </arguments>
|
|
+ <workingDirectory>${user.dir}</workingDirectory>
|
|
+ </configuration>
|
|
+ </execution>
|
|
+ </executions>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-jar-plugin</artifactId>
|
|
+ <version>3.3.0</version>
|
|
+ <executions>
|
|
+ <execution>
|
|
+ <goals>
|
|
+ <goal>test-jar</goal>
|
|
+ </goals>
|
|
+ </execution>
|
|
+ </executions>
|
|
+ </plugin>
|
|
+ <plugin>
|
|
+ <groupId>org.apache.maven.plugins</groupId>
|
|
+ <artifactId>maven-resources-plugin</artifactId>
|
|
+ <version>3.3.1</version>
|
|
+ <configuration>
|
|
+ <nonFilteredFileExtensions>
|
|
+ <nonFilteredFileExtension>dll</nonFilteredFileExtension>
|
|
+ <nonFilteredFileExtension>dylib</nonFilteredFileExtension>
|
|
+ <nonFilteredFileExtension>so</nonFilteredFileExtension>
|
|
+ </nonFilteredFileExtensions>
|
|
+ </configuration>
|
|
+ </plugin>
|
|
+ </plugins>
|
|
+ </build>
|
|
+</project>
|
|
diff --git a/test/install_pom_test.py b/test/install_pom_test.py
|
|
index c6acc644..db79c001 100644
|
|
--- a/test/install_pom_test.py
|
|
+++ b/test/install_pom_test.py
|
|
@@ -131,6 +131,13 @@ class TestInstallPom(unittest.TestCase):
|
|
result)
|
|
self.assertEqual(report, '', report)
|
|
|
|
+ @install_pom(os.path.join('xgboost', 'xgboost4j', 'pom.xml'))
|
|
+ def test_artifactid_expansion(self, stdout, stderr, return_value, result):
|
|
+ self.assertEqual(return_value, 0, stderr)
|
|
+ report = self.check_result(inspect.currentframe().f_code.co_name,
|
|
+ result)
|
|
+ self.assertEqual(report, '', report)
|
|
+
|
|
@install_pom('a_binary_file.pom')
|
|
def test_not_pom(self, stdout, stderr, return_value, result):
|
|
self.assertNotEqual(return_value, 0)
|
|
--
|
|
2.42.0
|
|
|