mirror of https://github.com/apache/maven.git
[MNG-4405] Uninterpolated expressions should cause an error for plugin versions
git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@829403 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
077c0be9a9
commit
67c7dc2168
|
@ -11,7 +11,7 @@
|
|||
<plugin>
|
||||
<groupId>org.codehaus.plexus</groupId>
|
||||
<artifactId>plexus-component-metadata</artifactId>
|
||||
<version>${plexus.version}</version>
|
||||
<version>1.4.0</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
|
|
|
@ -271,6 +271,8 @@ public class DefaultModelValidator
|
|||
validateStringNotEmpty( "build.plugins.plugin.version", problems, warnOnMissingPluginVersion,
|
||||
p.getVersion(), p.getKey() );
|
||||
|
||||
validateVersion( "build.plugins.plugin.version", problems, warnOnly, p.getVersion(), p.getKey() );
|
||||
|
||||
validateBoolean( "build.plugins.plugin.inherited", problems, warnOnly, p.getInherited(),
|
||||
p.getKey() );
|
||||
|
||||
|
|
|
@ -370,4 +370,14 @@ public class DefaultModelValidatorTest
|
|||
assertTrue( result.getErrors().get( 0 ).contains( "non-unique-id" ) );
|
||||
}
|
||||
|
||||
public void testBadPluginVersion()
|
||||
throws Exception
|
||||
{
|
||||
SimpleProblemCollector result = validate( "bad-plugin-version.xml" );
|
||||
|
||||
assertViolations( result, 1, 0 );
|
||||
|
||||
assertTrue( result.getErrors().get( 0 ).contains( "test:mip" ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
<!--
|
||||
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>
|
||||
<artifactId>aid</artifactId>
|
||||
<groupId>gid</groupId>
|
||||
<version>0.1</version>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>test</groupId>
|
||||
<artifactId>mip</artifactId>
|
||||
<version>${missing.property}</version>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
Loading…
Reference in New Issue