Done: https://jira.codehaus.org/browse/MOJO-2039

Feel free to modify fields to taste, thanks Robert.

Cheers,
Tom


-----Original Message-----
From: Robert Scholte [mailto:codeh...@sourcegrounds.com] 
Sent: Thursday, 2014-07-31 15:18
To: user@mojo.codehaus.org
Subject: Re: [mojo-user] Maven 3.2 build error with flatten plugin

The contract of the ModelResolver has been broken:

http://maven.apache.org/ref/3.2.2/maven-model-builder/apidocs/org/apache/maven/model/resolution/ModelResolver.html#resolveModel(org.apache.maven.model.Parent)

This method has been added to the interface since Maven 3.2.2

Please create an issue at https://jira.codehaus.org/browse/MOJO

thanks,
Robert

Op Wed, 30 Jul 2014 17:45:09 +0200 schreef <tom.mitch...@vaisala.com>:

> Hello,
>
> I'm using the maven-flatten plugin with success in a project at the  
> moment, but have stumbled upon something with Maven 3.2.2.
>
> Given the following pom.xml file, the resultant output is observed in  
> Maven 3.1.0 and 3.2.2:
>
> 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/xsd/maven-4.0.0.xsd";>
>     <modelVersion>4.0.0</modelVersion>
>
>     <groupId>mygroup</groupId>
>     <artifactId>FlattenPluginTest</artifactId>
>     <version>DEV-SNAPSHOT</version>
>     <packaging>pom</packaging>
>
>     <build>
>         <plugins>
>             <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
>                 <artifactId>flatten-maven-plugin</artifactId>
>                 <!--<version>1.0.0</version>-->
>                 <configuration>
>                 </configuration>
>                 <executions>
>                     <!-- enable flattening -->
>                     <execution>
>                         <id>flatten</id>
>                         <phase>process-resources</phase>
>                         <goals>
>                             <goal>flatten</goal>
>                         </goals>
>                     </execution>
>                     <!-- ensure proper cleanup -->
>                     <execution>
>                         <id>flatten.clean</id>
>                         <phase>clean</phase>
>                         <goals>
>                             <goal>clean</goal>
>                         </goals>
>                     </execution>
>                 </executions>
>             </plugin>
>         </plugins>
>     </build>
> </project>
>
>
> Maven 3.1.0:
>
> [INFO] Scanning for projects...
> [WARNING]
> [WARNING] Some problems were encountered while building the effective  
> model for mygroup:FlattenPluginTest:pom:DEV-SNAPSHOT
> [WARNING] 'build.plugins.plugin.version' for  
> org.codehaus.mojo:flatten-maven-plugin is missing. @ line 14, column 21
> [WARNING]
> [WARNING] It is highly recommended to fix these problems because they  
> threaten the stability of your build.
> [WARNING]
> [WARNING] For this reason, future Maven versions might no longer support  
> building such malformed projects.
> [WARNING]
> [INFO]
> [INFO]  
> ------------------------------------------------------------------------
> [INFO] Building FlattenPluginTest DEV-SNAPSHOT
> [INFO]  
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @  
> FlattenPluginTest ---
> [INFO]
> [INFO] --- flatten-maven-plugin:1.0.0-beta-2:clean (flatten.clean) @  
> FlattenPluginTest ---
> [INFO]
> [INFO] --- flatten-maven-plugin:1.0.0-beta-2:flatten (flatten) @  
> FlattenPluginTest ---
> [INFO] Generating flattened POM of project  
> mygroup:FlattenPluginTest:pom:DEV-SNAPSHOT...
> [INFO]
> [INFO] --- maven-install-plugin:2.4:install (default-install) @  
> FlattenPluginTest ---
> [INFO] Installing c:\Users\tmit\IdeaProjects\FlattenPluginTest\pom.xml  
> to  
> C:\Users\tmit\.m2\repository\mygroup\FlattenPluginTest\DEV-SNAPSHOT\FlattenPluginTest-DEV-SNAPSHOT.pom
> [INFO]  
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]  
> ------------------------------------------------------------------------
> [INFO] Total time: 0.646s
> [INFO] Finished at: Wed Jul 30 11:09:36 EDT 2014
> [INFO] Final Memory: 9M/384M
> [INFO]  
> ------------------------------------------------------------------------
>
>
> Maven 3.2.2:
>
> [INFO] Scanning for projects...
> [WARNING]
> [WARNING] Some problems were encountered while building the effective  
> model for mygroup:FlattenPluginTest:pom:DEV-SNAPSHOT
> [WARNING] 'build.plugins.plugin.version' for  
> org.codehaus.mojo:flatten-maven-plugin is missing. @ line 14, column 21
> [WARNING]
> [WARNING] It is highly recommended to fix these problems because they  
> threaten the stability of your build.
> [WARNING]
> [WARNING] For this reason, future Maven versions might no longer support  
> building such malformed projects.
> [WARNING]
> [INFO]
> [INFO]  
> ------------------------------------------------------------------------
> [INFO] Building FlattenPluginTest DEV-SNAPSHOT
> [INFO]  
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @  
> FlattenPluginTest ---
> [INFO]
> [INFO] --- flatten-maven-plugin:1.0.0-beta-2:clean (flatten.clean) @  
> FlattenPluginTest ---
> [INFO] Deleting  
> c:\Users\tmit\IdeaProjects\FlattenPluginTest\.flattened-pom.xml
> [INFO]
> [INFO] --- flatten-maven-plugin:1.0.0-beta-2:flatten (flatten) @  
> FlattenPluginTest ---
> [INFO] Generating flattened POM of project  
> mygroup:FlattenPluginTest:pom:DEV-SNAPSHOT...
> [INFO]  
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]  
> ------------------------------------------------------------------------
> [INFO] Total time: 0.498 s
> [INFO] Finished at: 2014-07-30T11:09:42-04:00
> [INFO] Final Memory: 8M/384M
> [INFO]  
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal  
> org.codehaus.mojo:flatten-maven-plugin:1.0.0-beta-2:flatten (flatten) on  
> project FlattenPluginTest: Execution flatten of goal  
> org.codehaus.mojo:flatten-maven-plugin:1.0.0-beta-2:f
> [ERROR] -----------------------------------------------------
> [ERROR] realm =     
> plugin>org.codehaus.mojo:flatten-maven-plugin:1.0.0-beta-2
> [ERROR] strategy =  
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
> [ERROR] urls[0] =  
> file:/C:/Users/tmit/.m2/repository/org/codehaus/mojo/flatten-maven-plugin/1.0.0-beta-2/flatten-maven-plugin-1.0.0-beta-2.jar
> [ERROR] urls[1] =  
> file:/C:/Users/tmit/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
> [ERROR] urls[2] =  
> file:/C:/Users/tmit/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
> [ERROR] urls[3] =  
> file:/C:/Users/tmit/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
> [ERROR] urls[4] =  
> file:/C:/Users/tmit/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
> [ERROR] urls[5] =  
> file:/C:/Users/tmit/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
> [ERROR] urls[6] =  
> file:/C:/Users/tmit/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
> [ERROR] urls[7] =  
> file:/C:/Users/tmit/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
> [ERROR] urls[8] =  
> file:/C:/Users/tmit/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.17/plexus-utils-3.0.17.jar
> [ERROR] Number of foreign imports: 1
> [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent:  
> null]]
> [ERROR]
> [ERROR] -----------------------------------------------------
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the  
> -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,  
> please read the following articles:
> [ERROR] [Help 1]  
> http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
>
>
> Thanks,
> Tom Mitchell
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to