Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[MRELEASE-808] Add unittest for finalName

git-svn-id: https://svn.apache.org/repos/asf/maven/release/trunk@1417615 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit a603d071a0f48bb9c1952ad1088ca305ea364f36 1 parent 55dcd08
@rfscholte rfscholte authored
View
11 maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhaseTest.java
@@ -125,6 +125,17 @@ public void testSuppressCommitBeforeTagOrBranchAndReomoteTagging() throws Except
verifyNoMoreInteractions( scmProviderMock );
}
+ // MRELEASE-808
+ public void testFinalName() throws Exception
+ {
+ List<MavenProject> reactorProjects = createReactorProjects( "pom-with-finalname" );
+ ReleaseDescriptor config = createConfigurationForWithParentNextVersion( reactorProjects );
+ config.setGenerateReleasePoms( true );
+
+ phase.execute( config, new DefaultReleaseEnvironment(), reactorProjects );
+
+ assertTrue( comparePomFiles( reactorProjects ) );
+ }
/*
* @see org.apache.maven.shared.release.phase.AbstractRewritingReleasePhaseTestCase#createDescriptorFromProjects(java.util.List)
View
55 ...se-manager/src/test/resources/projects/generate-release-poms/pom-with-finalname/expected-release-pom.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>groupId</groupId>
+ <artifactId>artifactId</artifactId>
+ <version>1.0</version>
+ <scm>
+ <connection>scm:svn:file://localhost/tmp/scm-repo/tags/release-label</connection>
+ <developerConnection>scm:svn:file://localhost/tmp/scm-repo/tags/release-label</developerConnection>
+ <url>file://localhost/tmp/scm-repo/tags/release-label</url>
+ </scm>
+ <build>
+ <sourceDirectory>${project.basedir}/src/main/java</sourceDirectory>
+ <scriptSourceDirectory>src/main/scripts</scriptSourceDirectory>
+ <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory>
+ <outputDirectory>${project.build.directory}/classes</outputDirectory>
+ <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
+ <resources>
+ <resource>
+ <directory>${project.basedir}/src/main/resources</directory>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>${project.basedir}/src/test/resources</directory>
+ </testResource>
+ </testResources>
+ <directory>${project.basedir}/target</directory>
+ <finalName>${project.groupId}.${project.artifactId}-${project.version}</finalName>
+ </build>
+ <repositories>
+ <repository>
+ <id>central</id>
+ <url>${remoterepo}</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <releases>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ <id>central</id>
+ <name>Maven Plugin Repository</name>
+ <url>http://repo1.maven.org/maven2</url>
+ </pluginRepository>
+ </pluginRepositories>
+ <reporting>
+ <excludeDefaults>false</excludeDefaults>
+ <outputDirectory>target/site</outputDirectory>
+ </reporting>
+</project>
View
34 maven-release-manager/src/test/resources/projects/generate-release-poms/pom-with-finalname/pom.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Copyright 2005-2006 The Apache Software Foundation.
+ ~
+ ~ Licensed 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>groupId</groupId>
+ <artifactId>artifactId</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+
+ <scm>
+ <connection>scm:svn:file://localhost/tmp/scm-repo/trunk</connection>
+ <developerConnection>scm:svn:file://localhost/tmp/scm-repo/trunk</developerConnection>
+ <url>file://localhost/tmp/scm-repo/trunk</url>
+ </scm>
+
+ <build>
+ <finalName>${project.groupId}.${project.artifactId}-${project.version}</finalName>
+ </build>
+</project>
Please sign in to comment.
Something went wrong with that request. Please try again.