bonjour,
notre projet open source (http://www.jguard.net) utilisait à l'origine ant,mais essaie de migrer vers maven 2.
notre projet présente plusieurs modules, réparti suivant un structure plane, afin de développer sur eclipse.
afin de mettre nos livrables sur ibiblio, comme indiqué ici:
http://maven.apache.org/guides/mini/...io-upload.html
,
nous essayons d'utiliser le plugin repository:bundle-create .
nous avons bien noté que les plugins release et repository ne supporte pas encore de façon automatique la gestion de plusieurs modules.
il est donc nécéssaire de créer un bundle à chaque module, afin de l'uploader sur ibiblio.
pour cela,nous utilisons la commande suivante:
mvn repository:bundle-create
notre projet comporte un module "racine" de type pom, et d'autres modules de typ jar ou war.
j'essaie de créer un bundle sur un module jar dépendant du module racine, mais en vain.
appremment, le plugin génère deux entrées specification-title dans le manifest.
le problème semble venir du plugin jar:jar appelé....(la même trace est levée lorsque l'on lance mvn jar:jar)
voici la trace (générée avec l'option -e):
à noter que mvn jar:jar sur le module racine ne plante pas tout le temps :[INFO] [jar:jar]
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error assembling JAR
Embedded error: The attribute "Specification-Title" may not occur more than once
in the same section
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error assembling JAR
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:559)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
fecycle(DefaultLifecycleExecutor.java:475)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecy
cle(DefaultLifecycleExecutor.java:891)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(Def
aultLifecycleExecutor.java:734)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:505)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:488)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:458)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
dleFailures(DefaultLifecycleExecutor.java:306)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:273)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:140)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:256)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error assembling JAR
at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJar
Mojo.java:151)
at org.apache.maven.plugin.jar.AbstractJarMojo.execute(AbstractJarMojo.j
ava:163)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:412)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:534)
... 20 more
Caused by: org.codehaus.plexus.archiver.jar.ManifestException: The attribute "Sp
ecification-Title" may not occur more than once in the same section
at org.codehaus.plexus.archiver.jar.Manifest$Section.addAttributeAndChec
k(Manifest.java:699)
at org.codehaus.plexus.archiver.jar.Manifest$Section.addConfiguredAttrib
ute(Manifest.java:630)
at org.codehaus.plexus.archiver.jar.Manifest.addConfiguredAttribute(Mani
fest.java:972)
at org.apache.maven.archiver.MavenArchiver.createArchive(MavenArchiver.j
ava:292)
at org.apache.maven.plugin.jar.AbstractJarMojo.createArchive(AbstractJar
Mojo.java:144)
... 23 more
si je met:
,<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Specification-Title>toto</Specification-Title>
<Specification-Version>1.00-beta-1</Specification-Version>
<Specification-Vendor>jguard</Specification-Vendor>
<Implementation-Vendor>jguard</Implementation-Vendor>
</manifestEntries>
</archive>
</configuration>
</plugin>
la même exception est levée.
par contre si je supprime la balise specification-title,tout va bien.
la même astuce par contre, ne marche pas dans le module fils.
j'ai essayé de supprimer la référence au plugin org.apache.maven.plugins, en vain, ou de bidouiller al cofnguration de celui-ci.
voici le pom du module racine:
et voici la configuration du module fils qui pose problème :<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>net.sf.jguard</groupId>
<artifactId>jguard</artifactId>
<packaging>pom</packaging>
<version>1.00-beta-1</version>
<name>jGuard</name>
<url>http://jguard.net</url>
<description><![CDATA[jGuard is a library that provides EASY security (authentication and authorization) for Java web applications]]></description>
<inceptionYear>2004</inceptionYear>
<developers>
<developer>
<id>chrisgwhite</id>
<name>Chris White</name>
<email>chrisgwhite at users.sourceforge.net</email>
<roles>
<role>Promoter</role>
</roles>
<timezone></timezone>
</developer>
<developer>
<id>diabolo512</id>
<name>Charles Gay</name>
<email>diabolo512 at users.sourceforge.net</email>
<roles>
<role>Developer</role>
<role>French Translator</role>
<role>Project Manager</role>
</roles>
<timezone></timezone>
</developer>
<developer>
<id>fred_borelli</id>
<name>Frederico Borelli</name>
<email>fred_borelli at users.sourceforge.net</email>
<roles>
<role>Tester</role>
<role>portuguese translator</role>
</roles>
<timezone></timezone>
</developer>
<developer>
<id>GiHe</id>
<name>Gilles H.</name>
<email>gihe at users.sourceforge.net</email>
<roles>
<role>Packager</role>
</roles>
<timezone></timezone>
</developer>
<developer>
<id>lostwind</id>
<name></name>
<email>shuwgf at users.sourceforge.net</email>
<roles>
<role>Tester</role>
</roles>
<timezone></timezone>
</developer>
<developer>
<id>simon_lebettre</id>
<name>Simon Lebettre</name>
<email>simon_lebettre at users.sourceforge.net</email>
<roles>
<role>Tester</role>
</roles>
<timezone></timezone>
</developer>
<developer>
<id>vinipitta</id>
<name>Vinícius Pitta Lima de Araújo</name>
<email>vinipitta at users.sourceforge.net</email>
<roles>
<role>Developer</role>
<role>Portuguese Translator</role>
</roles>
<timezone></timezone>
</developer>
<developer>
<id>zelfdoen</id>
<name>Theo Niemeijer</name>
<email>zelfdoen at users.sourceforge.net</email>
<roles>
<role>Developer</role>
</roles>
<timezone></timezone>
</developer>
<developer>
<id>vberetti</id>
<name>Vincent Beretti</name>
<email>vberetti at users.sourceforge.net</email>
<roles>
<role>Developer</role>
</roles>
<timezone></timezone>
</developer>
<developer>
<id></id>
<name>Alex Jacobs</name>
<email></email>
<roles>
<role>English Translator</role>
</roles>
<timezone></timezone>
</developer>
<developer>
<id>maxi</id>
<name>Maximiliano Batelli</name>
<email>tandilero at users.sourceforge.net</email>
<roles>
<role>Developer</role>
</roles>
<timezone></timezone>
</developer>
</developers>
<licenses>
<license>
<name>GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1</name>
<url>http://www.gnu.org/copyleft/lesser.html</url>
<distribution></distribution>
</license>
</licenses>
<scm>
<connection>scm:svn:http://svn.sourceforge.net/svnroot/jguard/jguard/trunk/jguard</connection>
<developerConnection>scm:svn:https://svn.sourceforge.net/svnroot/jguard/jguard/trunk/jguard</developerConnection>
<url>http://svn.sourceforge.net/viewcvs.cgi/jguard/jguard/trunk/jguard/</url>
</scm>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit-addons</groupId>
<artifactId>junit-addons</artifactId>
<version>1.4</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<Specification-Version>1.00-beta-1</Specification-Version>
<Specification-Vendor>jguard</Specification-Vendor>
<Implementation-Vendor>jguard</Implementation-Vendor>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<configuration>
<outputDirectory>eclipse-bin</outputDirectory>
</configuration>
</plugin>
</plugins>
</build>
<!-- that profile is designed for release distribution -->
<profiles>
<profile>
<id>distribution</id>
<activation>
<property>
<name>distribution</name>
</property>
</activation>
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>javadoc</id>
<configuration>
<minmemory>128m</minmemory>
<maxmemory>512</maxmemory>
</configuration>
<goals>
<goal>javadoc</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<inherited>false</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<configuration>
<descriptors>
<descriptor>src/main/assembly/distribution-all.xml</descriptor>
</descriptors>
<outputDirectory>target/assembly</outputDirectory>
<workDirectory>target/assembly/work</workDirectory>
</configuration>
<goals>
<goal>assembly</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<modules>
<module>../jguard-core</module>
<module>../jguard-ext</module>
<module>../jguard-jee</module>
<module>../jguard-struts-example</module>
<module>../jguard-swing-example</module>
</modules>
<repositories>
<repository>
<id>ibiblio</id>
<name>maven official repository</name>
<url>http://www.ibiblio.org/maven2</url>
</repository>
<repository>
<id>jguard</id>
<name>jguard repository</name>
<url>http://jguard.sourceforge.net/repository</url>
</repository>
</repositories>
</project>
<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>net.sf.jguard</groupId>
<artifactId>jguard-core</artifactId>
<packaging>jar</packaging>
<name>jGuard core</name>
<url>http://jguard.net</url>
<description><![CDATA[jGuard is a library that provides EASY security (authentication and authorization) for Java web applications]]></description>
<inceptionYear>2004</inceptionYear>
<version>1.00-beta-1</version>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.0.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>ehcache</groupId>
<artifactId>ehcache</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>commons-jexl</groupId>
<artifactId>commons-jexl</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
</dependency>
</dependencies>
<parent>
<groupId>net.sf.jguard</groupId>
<artifactId>jguard</artifactId>
<version>1.00-beta-1</version>
</parent>
<profiles>
<profile>
<id>1.4</id>
<build>
<finalName>jguard-core-jdk1.4</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.4</source>
<target>1.4</target><!-- don't make it backward compatible ? -->
<compilerVersion>1.4</compilerVersion>
<excludes>
<exclude>net/sf/jguard/jmx/*.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
est-ce que l'uin d'entre vous aurait une piste?
avez-vous réussi à générer des bundle pour des modules fils?
j'ai essayer de supprimer les caractères spéciaux de la balise description, qui apparemment peut poser problème (je suis en utf-8).
merci d'avance,
Charles.
Partager