Hi Marc,
The "<version>2.1.4</version>" line should be left out. Clearly the authors
are not following standard practice for managing dependencies, so do not
assume that they know what they're doing.
Change the version in the dependencyManagement section if you need it to be
v2.1.4.
Delany


On Wed, 12 Jan 2022 at 12:13, Marc Hoppins <marc.hopp...@eset.com> wrote:

> HI all,
>
> I get a ‘overriding managed version 2.0.1 for rpm-maven.plugin’ message
> and I see two plugin definitions for this artifact, with two versions, in
> the same ‘build’ block in the top-level (ambari-2.7.6.0.0) POM. From what I
> see, does this mean that the plugin must be declared in both places:
>
> build>pluginManagement>plugins>plugin>rpm-maven-plugin
> and
> build>plugins>plugin>rpm-maven-plugin?
>
> In any case, why is the version different for these declarations?
>
>   <build>
>     <pluginManagement>
>       <plugins>
>         <plugin>
>           <groupId>org.apache.rat</groupId>
>           <artifactId>apache-rat-plugin</artifactId>
>           <version>0.12</version>
>         </plugin>
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <version>2.20</version>
>         </plugin>
>         <plugin>
>           <groupId>org.codehaus.mojo</groupId>
>           <artifactId>rpm-maven-plugin</artifactId>
>           <version>2.0.1</version>
>         </plugin>
>         <plugin>
>           <groupId>org.vafer</groupId>
>           <artifactId>jdeb</artifactId>
>           <version>1.8</version>
>         </plugin>
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-clean-plugin</artifactId>
>           <version>2.5</version>
>         </plugin>
>         <plugin>
>           <artifactId>maven-assembly-plugin</artifactId>
>           <version>2.2-beta-5</version>
>         </plugin>
>       </plugins>
>     </pluginManagement>
>     <plugins>
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>build-helper-maven-plugin</artifactId>
>         <version>1.8</version>
>         <executions>
>           <execution>
>             <id>parse-package-version</id>
>             <goals>
>               <goal>regex-property</goal>
>             </goals>
>             <configuration>
>               <name>package-version</name>
>               <value>${project.version}</value>
>
> <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)((\.|-).*)?</regex>
>               <replacement>$1.$2.$3.$4</replacement>
>               <failIfNoMatch>true</failIfNoMatch>
>             </configuration>
>           </execution>
>           <execution>
>             <id>parse-package-release</id>
>             <goals>
>               <goal>regex-property</goal>
>             </goals>
>             <configuration>
>               <name>package-release</name>
>               <value>${project.version}</value>
>
> <regex>^([0-9]+)\.([0-9]+)\.([0-9]+)\.([0-9]+)((\.|-)(([0-9]+)|(SNAPSHOT)|(techwin)).*)?</regex>
>               <replacement>$7</replacement>
>               <failIfNoMatch>true</failIfNoMatch>
>             </configuration>
>           </execution>
>         </executions>
>       </plugin>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-compiler-plugin</artifactId>
>         <version>3.2</version>
>         <configuration>
>           <source>1.8</source>
>           <target>1.8</target>
>         </configuration>
>       </plugin>
>       <plugin>
>         <artifactId>maven-assembly-plugin</artifactId>
>         <configuration>
>           <descriptors>
>
> <descriptor>${ambari.dir}/ambari-project/src/main/assemblies/empty.xml</descriptor>
>           </descriptors>
>         </configuration>
>         <executions>
>           <execution>
>             <id>make-assembly</id>
>             <phase>package</phase>
>             <goals>
>               <goal>single</goal>
>             </goals>
>           </execution>
>         </executions>
>       </plugin>
>       <plugin>
>         <groupId>org.codehaus.mojo</groupId>
>         <artifactId>rpm-maven-plugin</artifactId>
>         <version>2.1.4</version>
>         <executions>
>           <execution>
>             <!-- unbinds rpm creation from maven lifecycle -->
>             <phase>none</phase>
>             <goals>
>               <goal>attached-rpm</goal>
>             </goals>
>           </execution>
>         </executions>
>         <configuration>
>           <license>2012, Apache Software Foundation</license>
>           <group>Development</group>
>           <description>Maven Recipe: RPM Package.</description>
>           <release>${package-release}</release>
>           <version>${package-version}</version>
>           <mappings/>
>         </configuration>
>       </plugin>
>

Reply via email to