[ http://jira.codehaus.org/browse/MNG-3438?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_126499 ]
Brian Fox commented on MNG-3438: -------------------------------- The enforcer plugin can be used to detect these issues. I updated the pom like below and it works (note i removed checkstyle because it wasn't building): {noformat} <?xml version="1.0" encoding="UTF-8"?> <!-- * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. * --> <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>com.xpn.xwiki.platform.tools</groupId> <artifactId>xwiki-tools</artifactId> <version>8-SNAPSHOT</version> </parent> <artifactId>xwiki-xar-plugin</artifactId> <name>XWiki Platform - Tools - XAR Plugin</name> <version>1.10-SNAPSHOT</version> <packaging>maven-plugin</packaging> <description>XWiki Platform - Tools - XAR Plugin</description> <dependencies> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>2.0</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>2.0.4</version> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-archiver</artifactId> <version>1.0-alpha-9</version> <exclusions> <exclusion> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-container-default</artifactId> </exclusion> <exclusion> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-component-api</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-io</artifactId> <version>1.0-alpha-2</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-model</artifactId> <version>2.0.4</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-artifact</artifactId> <version>2.0</version> </dependency> <dependency> <groupId>dom4j</groupId> <artifactId>dom4j</artifactId> <version>1.6.1</version> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-enforcer-plugin</artifactId> <executions> <execution> <goals> <goal>enforce</goal> </goals> <id>ensure-no-container-api</id> <configuration> <rules> <bannedDependencies> <excludes> <exclude>org.codehaus.plexus:plexus-component-api</exclude> </excludes> <message>The new containers are not supported. You probably added a dependency that is missing the exclusions.</message> </bannedDependencies> <!-- <requirePluginVersions><banSnapshots>false</banSnapshots></requirePluginVersions>--> </rules> <fail>true</fail> </configuration> </execution> </executions> </plugin> </plugins> </build> </project> {noformat} > IIncompatibleClassChangeError > ----------------------------- > > Key: MNG-3438 > URL: http://jira.codehaus.org/browse/MNG-3438 > Project: Maven 2 > Issue Type: Bug > Components: General > Affects Versions: 2.0.9 > Reporter: Vincent Massol > Fix For: 2.0.9 > > > This is happening with 2.0.9-SNAPSHOT built on 5th of March 2008: > {noformat} > [INFO] > ------------------------------------------------------------------------ > [INFO] Building XWiki Platform - Applications - Selenium > [INFO] task-segment: [clean, install] > [INFO] > ------------------------------------------------------------------------ > [INFO] [clean:clean] > [INFO] Deleting directory > /Users/vmassol/dev/xwiki/trunks/xwiki-platform-applications/selenium/target > [INFO] [remote-resources:process {execution: xwiki-license-resources}] > [INFO] [resources:resources] > [INFO] Using default encoding to copy filtered resources. > [WARNING] Attempting to build MavenProject instance for Artifact > (com.xpn.xwiki.platform.tools:xwiki-xar-plugin:1.10-20080305.115158-11) of > type: maven-plugin; constructing POM artifact instead. > [INFO] [xwiki-xar:xar] > [INFO] Generating package.xml descriptor at > [/Users/vmassol/dev/xwiki/trunks/xwiki-platform-applications/selenium/target/classes/package.xml] > [FATAL ERROR] com.xpn.xwiki.tool.xar.XarMojo#execute() caused a linkage error > (java.lang.IncompatibleClassChangeError) and may be out-of-date. Check the > realms: > [FATAL ERROR] Plugin realm = > app0.child-container[com.xpn.xwiki.platform.tools:xwiki-xar-plugin] > urls[0] = > file:/Users/vmassol/.m2/repository/com/xpn/xwiki/platform/tools/xwiki-xar-plugin/1.10-SNAPSHOT/xwiki-xar-plugin-1.10-SNAPSHOT.jar > urls[1] = > file:/Users/vmassol/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar > urls[2] = > file:/Users/vmassol/.m2/repository/org/codehaus/plexus/plexus-archiver/1.0-alpha-9/plexus-archiver-1.0-alpha-9.jar > urls[3] = > file:/Users/vmassol/.m2/repository/org/codehaus/plexus/plexus-component-api/1.0-alpha-15/plexus-component-api-1.0-alpha-15.jar > urls[4] = > file:/Users/vmassol/.m2/repository/org/codehaus/plexus/plexus-classworlds/1.2-alpha-6/plexus-classworlds-1.2-alpha-6.jar > urls[5] = > file:/Users/vmassol/.m2/repository/org/codehaus/plexus/plexus-io/1.0-alpha-1/plexus-io-1.0-alpha-1.jar > urls[6] = file:/Users/vmassol/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar > urls[7] = > file:/Users/vmassol/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar > [FATAL ERROR] Container realm = plexus.core > urls[0] = > file:/Applications/apache-maven-2.0.9-SNAPSHOT/lib/maven-2.0.9-SNAPSHOT-uber.jar > urls[1] = > file:/Users/vmassol/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar > urls[2] = > file:/Users/vmassol/.m2/repository/com/xpn/xwiki/platform/tools/xwiki-xar-handlers/1.9-SNAPSHOT/xwiki-xar-handlers-1.9-SNAPSHOT.jar > [INFO] > ------------------------------------------------------------------------ > [ERROR] FATAL ERROR > [INFO] > ------------------------------------------------------------------------ > [INFO] null > [INFO] > ------------------------------------------------------------------------ > [INFO] Trace > java.lang.IncompatibleClassChangeError > at > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.createArchiveMain(AbstractZipArchiver.java:318) > at > org.codehaus.plexus.archiver.zip.AbstractZipArchiver.execute(AbstractZipArchiver.java:242) > at > org.codehaus.plexus.archiver.AbstractArchiver.createArchive(AbstractArchiver.java:673) > at com.xpn.xwiki.tool.xar.XarMojo.performArchive(XarMojo.java:129) > at com.xpn.xwiki.tool.xar.XarMojo.execute(XarMojo.java:90) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:575) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:507) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:479) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:331) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:292) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:331) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:124) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:285) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.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) > {noformat} > Note that this is not happening with 2.1-SNAPSHOT. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira