[ https://issues.apache.org/jira/browse/MENFORCER-281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16220107#comment-16220107 ]
ASF GitHub Bot commented on MENFORCER-281: ------------------------------------------ asfgit closed pull request #28: [MENFORCER-281] added IT to show the issue. URL: https://github.com/apache/maven-enforcer/pull/28 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/maven-enforcer-plugin/src/it/projects/require-plugin-versions-mm-ci-friendly/invoker.properties b/maven-enforcer-plugin/src/it/projects/require-plugin-versions-mm-ci-friendly/invoker.properties new file mode 100644 index 0000000..a07d2f1 --- /dev/null +++ b/maven-enforcer-plugin/src/it/projects/require-plugin-versions-mm-ci-friendly/invoker.properties @@ -0,0 +1,17 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +invoker.goals = install -Drevision=0.10.0-SNAPSHOT \ No newline at end of file diff --git a/maven-enforcer-plugin/src/it/projects/require-plugin-versions-mm-ci-friendly/menforcer281-module/pom.xml b/maven-enforcer-plugin/src/it/projects/require-plugin-versions-mm-ci-friendly/menforcer281-module/pom.xml new file mode 100644 index 0000000..a6807af --- /dev/null +++ b/maven-enforcer-plugin/src/it/projects/require-plugin-versions-mm-ci-friendly/menforcer281-module/pom.xml @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<project> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.maven.its.enforcer</groupId> + <artifactId>menforcer281-parent</artifactId> + <version>${revision}</version> + </parent> + + <artifactId>menforcer281-module</artifactId> + <packaging>pom</packaging> + + <description> + </description> + +</project> diff --git a/maven-enforcer-plugin/src/it/projects/require-plugin-versions-mm-ci-friendly/pom.xml b/maven-enforcer-plugin/src/it/projects/require-plugin-versions-mm-ci-friendly/pom.xml new file mode 100644 index 0000000..e9d613b --- /dev/null +++ b/maven-enforcer-plugin/src/it/projects/require-plugin-versions-mm-ci-friendly/pom.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<project> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.maven.its.enforcer</groupId> + <artifactId>menforcer281-parent</artifactId> + <version>${revision}</version> + <packaging>pom</packaging> + + <description> + </description> + + <properties> + <revision>0.0.1-SNAPSHOT</revision> + </properties> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clean-plugin</artifactId> + <version>2.5</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>2.6</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.5.1</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.12.4</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>2.4</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-install-plugin</artifactId> + <version>2.4</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-deploy-plugin</artifactId> + <version>2.7</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.2</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <version>@project.version@</version> + <executions> + <execution> + <id>test</id> + <goals> + <goal>enforce</goal> + </goals> + <configuration> + <rules> + <requirePluginVersions> + <banSnapshots>false</banSnapshots> + </requirePluginVersions> + </rules> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </pluginManagement> + + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-enforcer-plugin</artifactId> + <version>@project.version@</version> + </plugin> + </plugins> + </build> + + <modules> + <module>menforcer281-module</module> + </modules> +</project> ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > RequirePluginVersions broken with "CI Friendly versions" > -------------------------------------------------------- > > Key: MENFORCER-281 > URL: https://issues.apache.org/jira/browse/MENFORCER-281 > Project: Maven Enforcer Plugin > Issue Type: Bug > Components: Standard Rules > Affects Versions: 1.4.1, 3.0.0-M1 > Reporter: James Nord > Priority: Critical > > Maven > [3.5.0|https://maven.apache.org/docs/3.5.0/release-notes.html#Overview_about_the_changes] > [introduced CI friendly > versions|https://maven.apache.org/maven-ci-friendly.html]. > However when used with [multi module > project|https://maven.apache.org/maven-ci-friendly.html#Multi_Module_Setup] > the enforcer fails the build as it can not resolve the parent. > The bug is that the parent resolution of a module in the reactor is > attempting to use the untransposed version. > e.g. > {noformat} > INFO] --- maven-enforcer-plugin:3.0.0-M1:enforce (display-info) @ sub-module > --- > [WARNING] Rule 1: org.apache.maven.plugins.enforcer.RequirePluginVersions > failed with message: > Failure to find com.acme.product:parent:pom:0.9.8-${revision}SNAPSHOT in > https://repo.acme.com/content/groups/all was cached in the local repository, > resolution will not be reattempted until the update interval of acme-internal > has elapsed or updates are forced > com.acme.product:parent:pom:0.9.8-${revision}SNAPSHOT > from the specified remote repositories: > acme-internal (https://repo.acme.com/content/groups/all, releases=true, > snapshots=true) > {noformat} > to reproduce create a new multi module project as per the linked page above. > Add the enforcer plugin and rule to the build > run {{mvn -Drevision=1.2.3-SNAPSHOT}} and watch the build fail. -- This message was sent by Atlassian JIRA (v6.4.14#64029)