Uploaded image for project: 'Maven Assembly Plugin'
  1. Maven Assembly Plugin
  2. MASSEMBLY-334

Can not generate class-path from Manifest

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.2-beta-2
    • None
    • manifest
    • None
    • Pc - Windows XP sp2

    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

      <?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>
      

      File : assembly

      <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>
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              pyt Damien
              Votes:
              9 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: