Changeset: f0fcb0de6c64 for monetdb-java
URL: https://dev.monetdb.org/hg/monetdb-java/rev/f0fcb0de6c64
Modified Files:
pom.xml
Branch: mvn
Log Message:
Copy jar files to jars/ with with file names that are compatible with Mtest
diffs (117 lines):
diff --git a/pom.xml b/pom.xml
--- a/pom.xml
+++ b/pom.xml
@@ -108,6 +108,10 @@
<version>3.8.0</version>
</plugin>
<plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>3.8.1</version>
+ </plugin>
+ <plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
@@ -147,9 +151,9 @@
</plugin>
<plugin>
- <groupId>com.coderplus.maven.plugins</groupId>
- <artifactId>copy-rename-maven-plugin</artifactId>
- <version>1.0.1</version>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>3.6.0</version>
</plugin>
</plugins>
@@ -189,12 +193,7 @@
</executions>
</plugin>
- <!-- Generate a tests jar that includes all dependencies such as
Junit.
- The result gets a name like
monetdb-jdbc-12.1-SNAPSHOT-test-jar-with-deps.jar.
- This can be changed by uncommenting the <finalName> and
<appendAssemblyId> settings
- but that causes a warning that cannot be suppressed.
- So instead we will use yet another plugin to rename the thing.
- -->
+ <!-- Generate the tests jar -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
@@ -220,24 +219,67 @@
</executions>
</plugin>
- <!-- Rename the jar-with-deps created above -->
+ <!-- parse the version number in preparation of copying files to
the jar directory -->
<plugin>
- <groupId>com.coderplus.maven.plugins</groupId>
- <artifactId>copy-rename-maven-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>parse-version-number</id>
+ <goals>
+ <goal>parse-version</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- Copy some files over to the jars/ directory for backward
compatibility with Mtest.
+ I must admit that I find it concerning that it doesn't seem
to worry the Maven designers
+ that we need 50 lines of xml to copy two files.
+ -->
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>rename-jar-with-deps</id>
+ <id>copy-jdbc-jar</id>
<phase>package</phase>
<goals>
- <goal>rename</goal>
+ <goal>copy</goal>
</goals>
<configuration>
-
<sourceFile>${project.build.directory}/${project.build.finalName}-test-jar-with-deps.jar
- </sourceFile>
-
<destinationFile>${project.build.directory}/jdbctests.jar</destinationFile>
+ <artifactItems>
+ <!-- main jar -->
+ <artifactItem>
+ <groupId>${project.groupId}</groupId>
+
<artifactId>${project.artifactId}</artifactId>
+ <version>${project.version}</version>
+ <type>${project.packaging}</type>
+
<destFileName>monetdb-jdbc-${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.jre8.jar</destFileName>
+ </artifactItem>
+ <!-- jdbcclient -->
+ <artifactItem>
+ <groupId>${project.groupId}</groupId>
+
<artifactId>${project.artifactId}</artifactId>
+ <version>${project.version}</version>
+ <type>${project.packaging}</type>
+
<destFileName>jdbcclient.jre8.jar</destFileName>
+ </artifactItem>
+ <!-- tests jar -->
+ <artifactItem>
+ <groupId>${project.groupId}</groupId>
+
<artifactId>${project.artifactId}</artifactId>
+ <version>${project.version}</version>
+ <type>${project.packaging}</type>
+ <classifier>test-jar-with-deps</classifier>
+ <destFileName>jdbctests.jar</destFileName>
+ </artifactItem>
+ </artifactItems>
</configuration>
</execution>
</executions>
+ <configuration>
+ <outputDirectory>${project.basedir}/jars</outputDirectory>
+ </configuration>
</plugin>
<plugin>
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]