[
https://jira.codehaus.org/browse/MASSEMBLY-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dennis Lundberg updated MASSEMBLY-334:
--------------------------------------
Component/s: manifest
Description:
I have a maven's projet multi-module.
I have a problem when i launch mvn package assembly:assembly
In the Manifest file, the class path does not generated.
Pom project
{code: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>
<groupId>com.ipsis.pacha</groupId>
<artifactId>Pacha</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>PACHA</name>
<build>
<plugins>
<plugin>
<!-- Tache permettant d'afficher le classpath
utilisé lors de l'execution de maven. -->
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>print-maven-runtime-classpath</id>
<phase>compile</phase>
<configuration>
<tasks>
<property
name="runtime-classpath"
refid="maven.runtime.classpath" />
<echo
message="maven.runtime.classpath=${runtime-classpath}" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>print-maven-test-classpath</id>
<phase>test-compile</phase>
<configuration>
<tasks>
<property
name="test-classpath"
refid="maven.test.classpath" />
<echo
message="maven.test.classpath=${test-classpath}" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Version du compilateur et de la JVM cible
pour l'execution de l'application -->
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- On reste en 1.6. -->
<source>1.6</source>
<target>1.6</target>
<meminitial>512m</meminitial>
<maxmem>1024m</maxmem>
<optimize>true</optimize>
<verbose>true</verbose>
<fork>true</fork>
<executable>${JAVA_HOME}\bin\javac.exe</executable>
<compilerVersion>1.6</compilerVersion>
</configuration>
<dependencies />
</plugin>
<!-- Deploiement -->
<plugin>
<inherited>true</inherited>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<updateReleaseInfo>true</updateReleaseInfo>
</configuration>
</plugin>
<!-- Permet de déployer aussitôt la version lors de
sa création. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<goals>deploy</goals>
</configuration>
</plugin>
<!-- Plugin pour les tests unitaires -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<!-- Plugin de generation des fichiers de
configuration pour Eclipse -->
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpversion>2.0</wtpversion>
<!-- Configuration de repertoire de
compilation d'Eclipse -->
<buildOutputDirectory>
/classes
</buildOutputDirectory>
<downloadSources>false</downloadSources>
<!-- Ajout des librairies Eclipse -->
<classpathContainers>
<!-- Ajout du JRE par défaut
Eclipse -->
<classpathContainer>
org.eclipse.jdt.launching.JRE_CONTAINER
</classpathContainer>
</classpathContainers>
</configuration>
</plugin>
<!-- Construction du site -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<locales>fr</locales>
<inputEncoding>ISO-8859-1</inputEncoding>
<outputEncoding>ISO-8859-1</outputEncoding>
</configuration>
</plugin>
<!-- Creation d'un jar unique -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>assembly/pacha_src.xml</descriptor>
</descriptors>
<finalName>${artifactId}-${version}</finalName>
<outputDirectory>target</outputDirectory>
<archive>
<manifest>
<mainClass>
com.ipsis.pacha.gui.ihm.Main
</mainClass>
<packageName>com.ipsis.pacha</packageName>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<!-- Librairie junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
<!-- Log -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Commons lang -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
<type>jar</type>
</dependency>
<!-- HiveMind Lie interfaces aux implementations -->
<dependency>
<groupId>hivemind</groupId>
<artifactId>hivemind</artifactId>
<version>1.1-rc-1</version>
</dependency>
</dependencies>
</dependencyManagement>
<!-- Module du projet -->
<modules>
<module>Common</module>
<module>Core</module>
<module>TreatmentInterface</module>
<module>TreatmentImplementation</module>
<module>GUI</module>
</modules>
</project>
{code}
File : assembly
{code:xml}
<assembly>
<id></id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>/</baseDirectory>
<moduleSets>
<moduleSet>
<binaries>
<outputDirectory>/</outputDirectory>
<unpack>true</unpack>
<includeDependencies>true</includeDependencies>
<dependencySets>
<dependencySet>
<excludes>
<exclude>*:sources</exclude>
<exclude>*:jar:*</exclude>
</excludes>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
</assembly>
{code}
was:
I have a maven's projet multi-module.
I have a problem when i launch mvn package assembly:assembly
In the Manifest file, the class path does not generated.
Pom project
{code: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>
<groupId>com.ipsis.pacha</groupId>
<artifactId>Pacha</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<name>PACHA</name>
<build>
<plugins>
<plugin>
<!-- Tache permettant d'afficher le classpath
utilisé lors de l'execution de maven. -->
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>print-maven-runtime-classpath</id>
<phase>compile</phase>
<configuration>
<tasks>
<property
name="runtime-classpath"
refid="maven.runtime.classpath" />
<echo
message="maven.runtime.classpath=${runtime-classpath}" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>print-maven-test-classpath</id>
<phase>test-compile</phase>
<configuration>
<tasks>
<property
name="test-classpath"
refid="maven.test.classpath" />
<echo
message="maven.test.classpath=${test-classpath}" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- Version du compilateur et de la JVM cible
pour l'execution de l'application -->
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!-- On reste en 1.6. -->
<source>1.6</source>
<target>1.6</target>
<meminitial>512m</meminitial>
<maxmem>1024m</maxmem>
<optimize>true</optimize>
<verbose>true</verbose>
<fork>true</fork>
<executable>${JAVA_HOME}\bin\javac.exe</executable>
<compilerVersion>1.6</compilerVersion>
</configuration>
<dependencies />
</plugin>
<!-- Deploiement -->
<plugin>
<inherited>true</inherited>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<updateReleaseInfo>true</updateReleaseInfo>
</configuration>
</plugin>
<!-- Permet de déployer aussitôt la version lors de sa
création. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<goals>deploy</goals>
</configuration>
</plugin>
<!-- Plugin pour les tests unitaires -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<!-- Plugin de generation des fichiers de
configuration pour Eclipse -->
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<wtpversion>2.0</wtpversion>
<!-- Configuration de repertoire de
compilation d'Eclipse -->
<buildOutputDirectory>
/classes
</buildOutputDirectory>
<downloadSources>false</downloadSources>
<!-- Ajout des librairies Eclipse -->
<classpathContainers>
<!-- Ajout du JRE par défaut
Eclipse -->
<classpathContainer>
org.eclipse.jdt.launching.JRE_CONTAINER
</classpathContainer>
</classpathContainers>
</configuration>
</plugin>
<!-- Construction du site -->
<plugin>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<locales>fr</locales>
<inputEncoding>ISO-8859-1</inputEncoding>
<outputEncoding>ISO-8859-1</outputEncoding>
</configuration>
</plugin>
<!-- Creation d'un jar unique -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>assembly/pacha_src.xml</descriptor>
</descriptors>
<finalName>${artifactId}-${version}</finalName>
<outputDirectory>target</outputDirectory>
<archive>
<manifest>
<mainClass>
com.ipsis.pacha.gui.ihm.Main
</mainClass>
<packageName>com.ipsis.pacha</packageName>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencyManagement>
<dependencies>
<!-- Librairie junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.1</version>
<scope>test</scope>
</dependency>
<!-- Log -->
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
<exclusions>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Commons lang -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
<type>jar</type>
</dependency>
<!-- HiveMind Lie interfaces aux implementations -->
<dependency>
<groupId>hivemind</groupId>
<artifactId>hivemind</artifactId>
<version>1.1-rc-1</version>
</dependency>
</dependencies>
</dependencyManagement>
<!-- Module du projet -->
<modules>
<module>Common</module>
<module>Core</module>
<module>TreatmentInterface</module>
<module>TreatmentImplementation</module>
<module>GUI</module>
</modules>
</project>
{code}
File : assembly
{code:xml}
<assembly>
<id></id>
<formats>
<format>jar</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>/</baseDirectory>
<moduleSets>
<moduleSet>
<binaries>
<outputDirectory>/</outputDirectory>
<unpack>true</unpack>
<includeDependencies>true</includeDependencies>
<dependencySets>
<dependencySet>
<excludes>
<exclude>*:sources</exclude>
<exclude>*:jar:*</exclude>
</excludes>
</dependencySet>
</dependencySets>
</binaries>
</moduleSet>
</moduleSets>
</assembly>
{code}
> Can not generate class-path from Manifest
> -----------------------------------------
>
> Key: MASSEMBLY-334
> URL: https://jira.codehaus.org/browse/MASSEMBLY-334
> Project: Maven 2.x Assembly Plugin
> Issue Type: Bug
> Components: manifest
> Affects Versions: 2.2-beta-2
> Environment: Pc - Windows XP sp2
> Reporter: Damien
>
> I have a maven's projet multi-module.
> I have a problem when i launch mvn package assembly:assembly
> In the Manifest file, the class path does not generated.
> Pom project
> {code: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>
> <groupId>com.ipsis.pacha</groupId>
> <artifactId>Pacha</artifactId>
> <packaging>pom</packaging>
> <version>1.0-SNAPSHOT</version>
> <name>PACHA</name>
>
> <build>
> <plugins>
> <plugin>
> <!-- Tache permettant d'afficher le classpath
> utilisé lors de l'execution de maven. -->
> <artifactId>maven-antrun-plugin</artifactId>
> <executions>
> <execution>
>
> <id>print-maven-runtime-classpath</id>
> <phase>compile</phase>
> <configuration>
> <tasks>
> <property
> name="runtime-classpath"
>
> refid="maven.runtime.classpath" />
> <echo
>
> message="maven.runtime.classpath=${runtime-classpath}" />
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> <execution>
>
> <id>print-maven-test-classpath</id>
> <phase>test-compile</phase>
> <configuration>
> <tasks>
> <property
> name="test-classpath"
>
> refid="maven.test.classpath" />
> <echo
>
> message="maven.test.classpath=${test-classpath}" />
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> <plugin>
> <!-- Version du compilateur et de la JVM cible
> pour l'execution de l'application -->
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <!-- On reste en 1.6. -->
> <source>1.6</source>
> <target>1.6</target>
> <meminitial>512m</meminitial>
> <maxmem>1024m</maxmem>
> <optimize>true</optimize>
> <verbose>true</verbose>
> <fork>true</fork>
>
> <executable>${JAVA_HOME}\bin\javac.exe</executable>
> <compilerVersion>1.6</compilerVersion>
> </configuration>
> <dependencies />
> </plugin>
> <!-- Deploiement -->
> <plugin>
> <inherited>true</inherited>
> <artifactId>maven-deploy-plugin</artifactId>
> <configuration>
>
> <updateReleaseInfo>true</updateReleaseInfo>
> </configuration>
> </plugin>
> <!-- Permet de déployer aussitôt la version lors de
> sa création. -->
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-release-plugin</artifactId>
> <configuration>
> <goals>deploy</goals>
> </configuration>
> </plugin>
> <!-- Plugin pour les tests unitaires -->
> <plugin>
> <artifactId>maven-surefire-plugin</artifactId>
> </plugin>
> <plugin>
> <!-- Plugin de generation des fichiers de
> configuration pour Eclipse -->
> <artifactId>maven-eclipse-plugin</artifactId>
> <configuration>
> <wtpversion>2.0</wtpversion>
> <!-- Configuration de repertoire de
> compilation d'Eclipse -->
> <buildOutputDirectory>
> /classes
> </buildOutputDirectory>
> <downloadSources>false</downloadSources>
> <!-- Ajout des librairies Eclipse -->
> <classpathContainers>
> <!-- Ajout du JRE par défaut
> Eclipse -->
> <classpathContainer>
>
> org.eclipse.jdt.launching.JRE_CONTAINER
> </classpathContainer>
> </classpathContainers>
> </configuration>
> </plugin>
> <!-- Construction du site -->
> <plugin>
> <artifactId>maven-site-plugin</artifactId>
> <configuration>
> <locales>fr</locales>
>
> <inputEncoding>ISO-8859-1</inputEncoding>
>
> <outputEncoding>ISO-8859-1</outputEncoding>
> </configuration>
> </plugin>
> <!-- Creation d'un jar unique -->
> <plugin>
> <artifactId>maven-assembly-plugin</artifactId>
> <configuration>
> <descriptors>
>
> <descriptor>assembly/pacha_src.xml</descriptor>
>
> </descriptors>
>
> <finalName>${artifactId}-${version}</finalName>
>
> <outputDirectory>target</outputDirectory>
> <archive>
> <manifest>
> <mainClass>
>
> com.ipsis.pacha.gui.ihm.Main
> </mainClass>
>
> <packageName>com.ipsis.pacha</packageName>
>
> <addClasspath>true</addClasspath>
> </manifest>
> </archive>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <dependencyManagement>
> <dependencies>
> <!-- Librairie junit -->
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>4.1</version>
> <scope>test</scope>
> </dependency>
> <!-- Log -->
> <dependency>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId>
> <version>1.1.1</version>
> <exclusions>
> <exclusion>
> <groupId>javax.servlet</groupId>
>
> <artifactId>servlet-api</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> <!-- Commons lang -->
> <dependency>
> <groupId>commons-lang</groupId>
> <artifactId>commons-lang</artifactId>
> <version>2.3</version>
> <type>jar</type>
> </dependency>
> <!-- HiveMind Lie interfaces aux implementations -->
> <dependency>
> <groupId>hivemind</groupId>
> <artifactId>hivemind</artifactId>
> <version>1.1-rc-1</version>
> </dependency>
> </dependencies>
> </dependencyManagement>
> <!-- Module du projet -->
> <modules>
> <module>Common</module>
> <module>Core</module>
> <module>TreatmentInterface</module>
> <module>TreatmentImplementation</module>
> <module>GUI</module>
> </modules>
> </project>
> {code}
> File : assembly
> {code:xml}
> <assembly>
> <id></id>
> <formats>
> <format>jar</format>
> </formats>
> <includeBaseDirectory>true</includeBaseDirectory>
> <baseDirectory>/</baseDirectory>
> <moduleSets>
> <moduleSet>
> <binaries>
> <outputDirectory>/</outputDirectory>
> <unpack>true</unpack>
> <includeDependencies>true</includeDependencies>
> <dependencySets>
> <dependencySet>
> <excludes>
>
> <exclude>*:sources</exclude>
>
> <exclude>*:jar:*</exclude>
> </excludes>
> </dependencySet>
> </dependencySets>
> </binaries>
> </moduleSet>
> </moduleSets>
> </assembly>
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
