This is an automated email from the ASF dual-hosted git repository. rfscholte pushed a commit to branch MRELASE-985 in repository https://gitbox.apache.org/repos/asf/maven-release.git
commit e7a799598c230421b0e96777a2ecf2c239c82832 Author: rfscholte <rfscho...@apache.org> AuthorDate: Mon Oct 28 20:42:42 2019 +0100 [MRELEASE-985] Add integration test --- .../it/mrm/repository/dependency-1.0-SNAPSHOT.pom | 27 +++++++++ .../src/it/mrm/repository/parent-1-SNAPSHOT.pom | 28 ++++++++++ .../src/it/projects/prepare/MRELEASE-985/pom.xml | 65 ++++++++++++++++++++++ .../projects/prepare/MRELEASE-985/test.properties | 21 +++++++ .../it/projects/prepare/MRELEASE-985/verify.groovy | 36 ++++++++++++ 5 files changed, 177 insertions(+) diff --git a/maven-release-plugin/src/it/mrm/repository/dependency-1.0-SNAPSHOT.pom b/maven-release-plugin/src/it/mrm/repository/dependency-1.0-SNAPSHOT.pom new file mode 100644 index 0000000..6e26cf4 --- /dev/null +++ b/maven-release-plugin/src/it/mrm/repository/dependency-1.0-SNAPSHOT.pom @@ -0,0 +1,27 @@ +<?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>test</groupId> + <artifactId>dependency</artifactId> + <version>1.0-SNAPSHOT</version> + +</project> \ No newline at end of file diff --git a/maven-release-plugin/src/it/mrm/repository/parent-1-SNAPSHOT.pom b/maven-release-plugin/src/it/mrm/repository/parent-1-SNAPSHOT.pom new file mode 100644 index 0000000..7f49b44 --- /dev/null +++ b/maven-release-plugin/src/it/mrm/repository/parent-1-SNAPSHOT.pom @@ -0,0 +1,28 @@ +<?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>test</groupId> + <artifactId>parent</artifactId> + <version>1-SNAPSHOT</version> + <packaging>pom</packaging> + +</project> \ No newline at end of file diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-985/pom.xml b/maven-release-plugin/src/it/projects/prepare/MRELEASE-985/pom.xml new file mode 100644 index 0000000..284c0f5 --- /dev/null +++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-985/pom.xml @@ -0,0 +1,65 @@ +<?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> + + <parent> + <groupId>test</groupId> + <artifactId>parent</artifactId> + <version>1-SNAPSHOT</version> + </parent> + + <groupId>org.apache.maven.plugin.release.its</groupId> + <artifactId>mrelease-985</artifactId> + <version>1.0-SNAPSHOT</version> + + <scm> + <developerConnection>scm:dummy|nul</developerConnection> + </scm> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-release-plugin</artifactId> + <version>@project.version@</version> + <dependencies> + <dependency> + <groupId>org.apache.maven.its.release</groupId> + <artifactId>maven-scm-provider-dummy</artifactId> + <version>1.0</version> + </dependency> + </dependencies> + <configuration> + <connectionUrl>scm:dummy|nul</connectionUrl> + <username>perform_username</username> + <password>perform_password</password> + </configuration> + </plugin> + </plugins> + </build> + + <dependencies> + <dependency> + <groupId>test</groupId> + <artifactId>dependency</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + </dependencies> +</project> \ No newline at end of file diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-985/test.properties b/maven-release-plugin/src/it/projects/prepare/MRELEASE-985/test.properties new file mode 100644 index 0000000..7d79cfc --- /dev/null +++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-985/test.properties @@ -0,0 +1,21 @@ +# 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. + +dependency.rel.test\:parent=1 +dependency.dev.test\:parent=2-SNAPSHOT +dependency.rel.test\:dependency=1.0.RELEASE +dependency.dev.test\:dependency=2.0-SNAPSHOT diff --git a/maven-release-plugin/src/it/projects/prepare/MRELEASE-985/verify.groovy b/maven-release-plugin/src/it/projects/prepare/MRELEASE-985/verify.groovy new file mode 100644 index 0000000..4e05fc8 --- /dev/null +++ b/maven-release-plugin/src/it/projects/prepare/MRELEASE-985/verify.groovy @@ -0,0 +1,36 @@ + +/* + * 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. + */ + +def project = new XmlSlurper().parse( new File( basedir, "pom.xml" ) ) +assert project.version.text() == "1.0-SNAPSHOT" +assert project.parent.version.text() == "1-SNAPSHOT" +assert project.dependencies.dependency.version.text() == "1.0-SNAPSHOT" + +def projectTag = new XmlSlurper().parse( new File( basedir, "pom.xml.tag" ) ) +assert projectTag.version.text() == "1.0" +assert projectTag.parent.version.text() == "1" +assert projectTag.dependencies.dependency.version.text() == "1.0.RELEASE" + +def projectNext = new XmlSlurper().parse( new File( basedir, "pom.xml.next" ) ) +assert projectNext.version.text() == "1.1-SNAPSHOT" +assert projectNext.parent.version.text() == "2-SNAPSHOT" +assert projectNext.dependencies.dependency.version.text() == "2.0-SNAPSHOT" + +return true