The maven-bundle-plugin doesn't work properly if spawned by release:perform
---------------------------------------------------------------------------
Key: FELIX-1890
URL: https://issues.apache.org/jira/browse/FELIX-1890
Project: Felix
Issue Type: Bug
Components: Maven Bundle Plugin
Affects Versions: maven-bundle-plugin-2.0.1
Reporter: Fabrizio Giudici
The bundle-plugin in my project works fine when I run goals such as clean
install or even release:prepare; it fails when I run release:perform.
For instance, running release:prepare, this is the output produced:
[Mistral:Projects/jrawio/src] fritz% ll modules/jrawio-all/target/
total 992
drwxrwx--- 8 fritz staff 272 Nov 23 21:03 .
drwxrwx--- 6 fritz staff 204 Nov 23 21:03 ..
drwxrwx--- 3 fritz staff 102 Nov 23 21:03 classes
drwxrwx--- 3 fritz staff 102 Nov 23 21:03 dummy-hg-repo
-rw-rw---- 1 fritz staff 3300 Nov 23 21:03
it.tidalwave.imageio.raw-1.6.2-tests.jar
-rw-rw---- 1 fritz staff 500450 Nov 23 21:03
it.tidalwave.imageio.raw-1.6.2.jar
drwxrwx--- 3 fritz staff 102 Nov 23 21:03 maven-archiver
drwxrwx--- 2 fritz staff 68 Nov 23 21:03 target-maven-repo
When running release:prepare, the jar file is mostly empty:
[Mistral:Projects/jrawio/src] fritz% ll
target/checkout/modules/jrawio-all/target/
total 24
drwxrwx--- 9 fritz staff 306 Nov 23 21:14 .
drwxrwx--- 5 fritz staff 170 Nov 23 21:14 ..
drwxrwx--- 3 fritz staff 102 Nov 23 21:14 classes
drwxrwx--- 3 fritz staff 102 Nov 23 21:14 dummy-hg-repo
-rw-rw---- 1 fritz staff 316 Nov 23 21:14
it.tidalwave.imageio.raw-1.6.2-sources.jar
-rw-rw---- 1 fritz staff 3301 Nov 23 21:14
it.tidalwave.imageio.raw-1.6.2-tests.jar
-rw-rw---- 1 fritz staff 3301 Nov 23 21:14 it.tidalwave.imageio.raw-1.6.2.jar
drwxrwx--- 3 fritz staff 102 Nov 23 21:14 maven-archiver
drwxrwx--- 2 fritz staff 68 Nov 23 21:14 target-maven-repo
The curious thing is that I manually enter the directory target/checkout and
run mvn clean install from there, everything works. So the problem seems
related to the maven run spawned by release:perform
This is the configuration that I'm using with the bundle-plugin:
[Mistral:Projects/jrawio/src] fritz% cat modules/jrawio-all/pom.xml
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>it.tidalwave.imageio</groupId>
<artifactId>jrawio</artifactId>
<version>1.6.3-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>
<artifactId>it.tidalwave.imageio.raw</artifactId>
<packaging>bundle</packaging>
<name>jrawio - JAR artifact</name>
<dependencies>
<dependency>
<groupId>it.tidalwave.imageio</groupId>
<artifactId>codec</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>it.tidalwave.imageio</groupId>
<artifactId>processor</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package>it.tidalwave.imageio.*;-split-package:=merge-first</Export-Package>
<Bundle-Name>jrawio</Bundle-Name>
<Bundle-SymbolicName>it.tidalwave.imageio.raw</Bundle-SymbolicName>
<Bundle-DocURL>http://jrawio.rawdarkroom.org</Bundle-DocURL>
<Embed-Dependency>processor;codec;inline=true</Embed-Dependency>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
This is the configuration of the release plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<preparationGoals>clean install verify</preparationGoals>
<goals>clean install javadoc:javadoc assembly:assembly
deploy</goals>
<arguments>-Prelease
-DaltDeploymentRepository="${altDeploymentRepository}"</arguments>
</configuration>
</plugin>
My project is open sourced and the problem can be reproduced by:
hg clone https://kenai.com/hg/jrawio~src
mvn -o -B release:clean release:prepare release:perform -Prelease
The pom is configured to perform the release into staged repositories on a
local directory, so it can be run by everyone and won't do any change in public
repos.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.