Reputation: 1456
I am attempting to release a Mule domain using the mule-domain-maven-plugin. I've noticed when invoking install, that the main *.zip artifact is installed, followed by the *.pom, followed by a second copy of the *.zip:
[INFO] --- maven-install-plugin:2.5.2:install (default-install) @ esb-common ---
[INFO] Installing /Users/chase/git/dn2k/dn2k-esb/esb-common/target/esb-common-2.6.7.0.zip to /Users/chase/.m2/repository/com/dn2k/esb-common/2.6.7.0/esb-common-2.6.7.0.zip
[INFO] Installing /Users/chase/git/dn2k/dn2k-esb/esb-common/pom.xml to /Users/chase/.m2/repository/com/dn2k/esb-common/2.6.7.0/esb-common-2.6.7.0.pom
[INFO] Installing /Users/chase/git/dn2k/dn2k-esb/esb-common/target/esb-common-2.6.7.0.zip to /Users/chase/.m2/repository/com/dn2k/esb-common/2.6.7.0/esb-common-2.6.7.0.zip
A bit odd, perhaps, but harmless.
However, when attempting to release, a similar sequence is followed. First the main *.zip artifact is uploaded to Nexus, then the *.pom, then maven-metadata.xml, then finally a second copy of the main *.zip artifact:
[INFO] Uploading: http://<hostname>/nexus/content/repositories/releases/com/dn2k/esb-common/2.6.7.0/esb-common-2.6.7.0.zip
[INFO] Uploaded: http://<hostname>/nexus/content/repositories/releases/com/dn2k/esb-common/2.6.7.0/esb-common-2.6.7.0.zip (2 KB at 7.7 KB/sec)
[INFO] Uploading: http://<hostname>/nexus/content/repositories/releases/com/dn2k/esb-common/2.6.7.0/esb-common-2.6.7.0.pom
[INFO] Uploaded: http://<hostname>/nexus/content/repositories/releases/com/dn2k/esb-common/2.6.7.0/esb-common-2.6.7.0.pom (2 KB at 6.7 KB/sec)
[INFO] Downloading: http://<hostname>/nexus/content/repositories/releases/com/dn2k/esb-common/maven-metadata.xml
[DEBUG] Could not find metadata com.dn2k:esb-common/maven-metadata.xml in dn2k-deployment (http://<hostname>/nexus/content/repositories/releases/)
[DEBUG] Writing tracking file /Users/myron/.m2/repository/com/dn2k/esb-common/resolver-status.properties
[INFO] Uploading: http://<hostname>/nexus/content/repositories/releases/com/dn2k/esb-common/maven-metadata.xml
[INFO] Uploaded: http://<hostname>/nexus/content/repositories/releases/com/dn2k/esb-common/maven-metadata.xml (302 B at 1.4 KB/sec)
[DEBUG] Using transporter WagonTransporter with priority -1.0 for http://<hostname>/nexus/content/repositories/releases/
[DEBUG] Using connector BasicRepositoryConnector with priority 0.0 for http://<hostname>/nexus/content/repositories/releases/ with username=admin, password=***
[INFO] Uploading: http://<hostname>/nexus/content/repositories/releases/com/dn2k/esb-common/2.6.7.0/esb-common-2.6.7.0.zip
^^^^ ERRORS OUT ^^^^
On this second upload, Nexus balks, as we have it configured to disallow multiple uploads of the same released artifact.
In the source code for the plugin, line 88 identifies the zip file as the main artifact, and just one line above identifies that same file as an attachment. This double identification is what causes the maven-install-plugin to do the double copy to the ~/.m2/repository as shown above.
Is this a bug, or am I failing to configure the plugin correctly? Does anyone have an example of a successful release using the mule-domain-maven-plugin?
Here's the pom for the esb-common (domain) project (version managed to 1.1 for the plugin):
<?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>com.dn2k</groupId>
<artifactId>esb-common</artifactId>
<packaging>mule-domain</packaging>
<parent>
<groupId>com.dn2k</groupId>
<artifactId>esb-parent</artifactId>
<version>2.6.7.0</version>
</parent>
<build>
<plugins>
<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-domain-maven-plugin</artifactId>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
Upvotes: 3
Views: 383
Reputation: 711
I filed a case for mulesoft team. They now fixed my ticket. This was clearly a bug. Luckily I doesn't get these redudant installing message anymore, if I use the latest mule version and mule plugin.
[INFO] Installing C:\project\workspaces\workspace_mule\zzzz\pom.xml to C:\Users\charmin\.m2\repository\com\mycompany\zzzz\1.0.0-SNAPSHOT\zzzz-1.0.0-SNAPSHOT.pom
[INFO] Installing C:\project\workspaces\workspace_mule\zzzz\target\zzzz-1.0.0-SNAPSHOT.zip to C:\Users\charmin\.m2\repository\com\mycompany\zzzz\1.0.0-SNAPSHOT\zzzz-1.0.0-SNAPSHOT.zip
Upvotes: 0