Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Incomplete
-
3.0.0-M1
-
None
-
None
-
Windows 10, Maven 3.5.3, Java 1.8
Description
We have a mixture of artifacts that are basic java jar and osgi bundles. When perfoming a deploy:deploy on the bundle project and specifying the -DaltDeploymentRepository, we receive the following error.
Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) on project com.test.dummy: ArtifactDeployerException: Failed to retrieve remote metadata com.test.dummy:com.test.dummy:1.0.1-SNAPSHOT/maven-metadata.xml: Could not transfer metadata com.test.dummy:com.test.dummy:1.0.1-SNAPSHOT/maven-metadata.xml from/to snapshots::default (http://repo01:8081/artifactory/libs-snapshot-local): C:\Users\svc-jenkins\.m2\repository\com.test.dummy\com.test.dummy\1.0.1-SNAPSHOT\maven-metadata-snapshots::default.xml.part.lock (The filename, directory name, or volume label syntax is incorrect) -> [Help 1]
Previous artifacts in the project properly deployed, but these artifacts were of packaging jar, fails on the first artifact of packaging of type bundle. Same error occurs is we try and deploy just the bundle artifact as well.
if we specify the altDeploymentRepository within the <distributionManagement> section of the pom instead of a -D parameter it works.
If I change the package type from bundle to jar and use the -D parameter, the artifact then deploys properly, but then the maven-bundle-plugin then doesn't properly generate the MANIFEST.MF file.
Example of the parameter that fails.
-DaltDeploymentRepository=snapshots::default::http://repo01:8081/artifactory/libs-snapshot-local
pom file exhibiting the problem.
<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>com.test.dummy</groupId> <artifactId>dummy-parent</artifactId> <version>1.0.1-SNAPSHOT</version> </parent> <artifactId>com.test.dummy</artifactId> <packaging>bundle</packaging> <build> <plugins> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>4.2.0</version> <extensions>true</extensions> <configuration> <manifestLocation>META-INF</manifestLocation> <instructions> <Embed-Dependency>dummy-foss;scope=compile|runtime</Embed-Dependency> <Export-Package>com.test.dummy, com.test.dummy.annotation, com.test.dummy.statistics</Export-Package> </instructions> </configuration> </plugin> </plugins> </build> <dependencies> <dependency> <groupId>com.test.dummy</groupId> <artifactId>dummy-annotations</artifactId> <version>1.0.1-SNAPSHOT</version> </dependency> </dependencies> </project>