Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?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 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.plugin.release.it</groupId>
<artifactId>semver-major-release-policy</artifactId>
<version>1.0.1-SNAPSHOT</version>

<description>Make sure that, package visibility policy is working</description>

<scm>
<connection>scm:dummy|nul</connection>
<developerConnection>scm:dummy|nul</developerConnection>
</scm>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>@project.version@</version>
<configuration>
<projectVersionPolicyId>SemVerMajorRelease</projectVersionPolicyId>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.its.release</groupId>
<artifactId>maven-scm-provider-dummy</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -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.
*/

import groovy.xml.XmlSlurper

// The pom based version is NOT related to what the actual version will be.
File pomXml = new File(basedir, 'pom.xml')
assert pomXml.exists()
assert new XmlSlurper().parse(pomXml).version.text() == "1.0.1-SNAPSHOT"

// The actual version is hard coded
File pomXmlTag = new File(basedir, 'pom.xml.tag')
assert pomXmlTag.exists()
assert new XmlSlurper().parse(pomXmlTag).version.text() == "2.0.0"

// The next development version is hard coded
File pomXmlNext = new File(basedir, 'pom.xml.next')
assert pomXmlNext.exists()
assert new XmlSlurper().parse(pomXmlNext).version.text() == "2.0.1-SNAPSHOT"
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
@Singleton
@Named("SemVerMajorDevelopment")
public class SemVerMajorDevelopmentVersionPolicy extends AbstractSemVerVersionPolicy {
class SemVerMajorDevelopmentVersionPolicy extends AbstractSemVerVersionPolicy {

@Override
public VersionPolicyResult getReleaseVersion(VersionPolicyRequest request) throws VersionParseException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
@Singleton
@Named("SemVerMajorRelease")
public class SemVerMajorReleaseVersionPolicy extends AbstractSemVerVersionPolicy {
class SemVerMajorReleaseVersionPolicy extends AbstractSemVerVersionPolicy {

@Override
public VersionPolicyResult getReleaseVersion(VersionPolicyRequest request) throws VersionParseException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
@Singleton
@Named("SemVerMinorDevelopment")
public class SemVerMinorDevelopmentVersionPolicy extends AbstractSemVerVersionPolicy {
class SemVerMinorDevelopmentVersionPolicy extends AbstractSemVerVersionPolicy {

@Override
public VersionPolicyResult getReleaseVersion(VersionPolicyRequest request) throws VersionParseException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
@Singleton
@Named("SemVerMinorRelease")
public class SemVerMinorReleaseVersionPolicy extends AbstractSemVerVersionPolicy {
class SemVerMinorReleaseVersionPolicy extends AbstractSemVerVersionPolicy {

@Override
public VersionPolicyResult getReleaseVersion(VersionPolicyRequest request) throws VersionParseException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
*/
@Singleton
@Named("SemVerPatchDevelopment")
public class SemVerPatchDevelopmentVersionPolicy extends AbstractSemVerVersionPolicy {
class SemVerPatchDevelopmentVersionPolicy extends AbstractSemVerVersionPolicy {

@Override
public VersionPolicyResult getReleaseVersion(VersionPolicyRequest request) throws VersionParseException {
Expand Down