diff --git a/src/main/java/org/springframework/cloud/release/PomUpdater.java b/src/main/java/org/springframework/cloud/release/PomUpdater.java index 881901d2..808c770b 100644 --- a/src/main/java/org/springframework/cloud/release/PomUpdater.java +++ b/src/main/java/org/springframework/cloud/release/PomUpdater.java @@ -15,6 +15,9 @@ */ package org.springframework.cloud.release; +import static org.springframework.cloud.release.SpringCloudConstants.BUILD_ARTIFACT_ID; +import static org.springframework.cloud.release.SpringCloudConstants.CLOUD_DEPENDENCIES_ARTIFACT_ID; + import java.io.File; import java.lang.invoke.MethodHandles; import java.util.Properties; @@ -25,9 +28,6 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.util.StringUtils; -import static org.springframework.cloud.release.SpringCloudConstants.BUILD_ARTIFACT_ID; -import static org.springframework.cloud.release.SpringCloudConstants.CLOUD_DEPENDENCIES_ARTIFACT_ID; - /** * @author Marcin Grzejszczak */ @@ -47,26 +47,38 @@ class PomUpdater { return true; } - ModelWrapper updatePom(File pom, Versions versions) { + ModelWrapper updateParentPom(File pom, Versions versions) { + Model model = this.pomReader.readPom(pom); + if (!isParentPom(model)) { + return new ModelWrapper(model, false); + } + boolean dirty = false; + dirty = updateRootParentIfPossible(versions, model) || dirty ; + dirty = updateVersionIfPossible(versions, model) || dirty ; + dirty = updateProperties(versions, model) || dirty; + return new ModelWrapper(model, dirty); + } + + ModelWrapper updateChildPom(String rootProjectName, File pom, Versions versions) { Model model = this.pomReader.readPom(pom); boolean dirty = false; if (isParentPom(model)) { dirty = updateRootParentIfPossible(versions, model) || dirty ; dirty = updateVersionIfPossible(versions, model) || dirty ; } else { - dirty = updateParentVersionIfPossible(versions, model) || dirty; + dirty = updateParentVersionIfPossible(rootProjectName, versions, model) || dirty; } dirty = updateProperties(versions, model) || dirty; return new ModelWrapper(model, dirty); } - private boolean updateParentVersionIfPossible(Versions versions, Model model) { - String version = versions.versionForProject(model.getArtifactId()); + private boolean updateParentVersionIfPossible(String rootProjectName, Versions versions, Model model) { + String version = versions.versionForProject(rootProjectName); if (StringUtils.isEmpty(version)) { - log.warn("There was no version set for project [{}], skipping parent version setting", model.getArtifactId()); + log.warn("There was no version set for project [{}], skipping parent version setting for project [{}]", rootProjectName, model.getArtifactId()); return false; } - log.info("Setting parent [{}] version to [{}]", model.getArtifactId(), version); + log.info("Setting parent [{}] version to [{}] for project [{}]", rootProjectName, version, model.getArtifactId()); model.getParent().setVersion(version); return true; } diff --git a/src/test/java/org/springframework/cloud/release/PomUpdaterTests.java b/src/test/java/org/springframework/cloud/release/PomUpdaterTests.java index 236c624f..24880ccf 100644 --- a/src/test/java/org/springframework/cloud/release/PomUpdaterTests.java +++ b/src/test/java/org/springframework/cloud/release/PomUpdaterTests.java @@ -16,6 +16,8 @@ package org.springframework.cloud.release; +import static org.assertj.core.api.BDDAssertions.then; + import java.io.File; import java.net.URISyntaxException; import java.util.HashSet; @@ -23,8 +25,6 @@ import java.util.Set; import org.junit.Test; -import static org.assertj.core.api.BDDAssertions.then; - /** * @author Marcin Grzejszczak */ @@ -51,7 +51,7 @@ public class PomUpdaterTests { public void should_not_update_the_model_if_no_changes_were_made() throws Exception { File nonMatchingPom = pom("/projects/project"); - ModelWrapper model = this.pomUpdater.updatePom(nonMatchingPom, this.versions); + ModelWrapper model = this.pomUpdater.updateParentPom(nonMatchingPom, this.versions); then(model.dirty).isFalse(); } @@ -60,7 +60,7 @@ public class PomUpdaterTests { public void should_update_the_model_if_only_artifact_id_is_matched_in_the_root_pom() throws Exception { File matchingArtifactId = pom("/projects/project", "pom_matching_artifact.xml"); - ModelWrapper model = this.pomUpdater.updatePom(matchingArtifactId, this.versions); + ModelWrapper model = this.pomUpdater.updateParentPom(matchingArtifactId, this.versions); then(model.dirty).isTrue(); then(model.model.getVersion()).isEqualTo("0.0.3.BUILD-SNAPSHOT"); @@ -75,7 +75,7 @@ public class PomUpdaterTests { public void should_update_the_model_if_parent_is_matched_via_sc_build() throws Exception { File matchingArtifactId = pom("/projects/project", "pom_matching_parent_v2.xml"); - ModelWrapper model = this.pomUpdater.updatePom(matchingArtifactId, this.versions); + ModelWrapper model = this.pomUpdater.updateParentPom(matchingArtifactId, this.versions); then(model.dirty).isTrue(); then(model.model.getVersion()).isEqualTo("0.0.3.BUILD-SNAPSHOT"); @@ -90,7 +90,7 @@ public class PomUpdaterTests { public void should_update_the_model_if_parent_is_matched_via_sc_dependencies_parent() throws Exception { File matchingArtifactId = pom("/projects/project", "pom_matching_parent.xml"); - ModelWrapper model = this.pomUpdater.updatePom(matchingArtifactId, this.versions); + ModelWrapper model = this.pomUpdater.updateParentPom(matchingArtifactId, this.versions); then(model.dirty).isTrue(); then(model.model.getVersion()).isEqualTo("0.0.3.BUILD-SNAPSHOT"); @@ -105,7 +105,7 @@ public class PomUpdaterTests { public void should_update_the_model_if_properties_are_matched() throws Exception { File matchingArtifactId = pom("/projects/project", "pom_matching_properties.xml"); - ModelWrapper model = this.pomUpdater.updatePom(matchingArtifactId, this.versions); + ModelWrapper model = this.pomUpdater.updateParentPom(matchingArtifactId, this.versions); then(model.dirty).isTrue(); then(model.model.getVersion()).isEqualTo("0.0.3.BUILD-SNAPSHOT"); @@ -133,7 +133,7 @@ public class PomUpdaterTests { public void should_not_update_the_child_model_if_no_changes_were_made() throws Exception { File nonMatchingPom = pom("/projects/project"); - ModelWrapper model = this.pomUpdater.updatePom(nonMatchingPom, this.versions); + ModelWrapper model = this.pomUpdater.updateChildPom("spring-cloud-sleuth", nonMatchingPom, this.versions); then(model.dirty).isFalse(); } @@ -142,7 +142,7 @@ public class PomUpdaterTests { public void should_update_the_child_model_if_parent_is_matched_via_sc_build() throws Exception { File matchingArtifactId = pom("/projects/project/children", "pom_matching_parent_v2.xml"); - ModelWrapper model = this.pomUpdater.updatePom(matchingArtifactId, this.versions); + ModelWrapper model = this.pomUpdater.updateChildPom("spring-cloud-sleuth", matchingArtifactId, this.versions); then(model.dirty).isTrue(); then(model.model.getParent().getVersion()).isEqualTo("0.0.3.BUILD-SNAPSHOT"); @@ -156,7 +156,7 @@ public class PomUpdaterTests { public void should_update_the_child_model_if_parent_is_matched_via_sc_dependencies_parent() throws Exception { File matchingArtifactId = pom("/projects/project/children", "pom_matching_parent.xml"); - ModelWrapper model = this.pomUpdater.updatePom(matchingArtifactId, this.versions); + ModelWrapper model = this.pomUpdater.updateChildPom("spring-cloud-sleuth", matchingArtifactId, this.versions); then(model.dirty).isTrue(); then(model.model.getParent().getVersion()).isEqualTo("0.0.3.BUILD-SNAPSHOT"); @@ -170,7 +170,7 @@ public class PomUpdaterTests { public void should_update_the_child_model_if_properties_are_matched() throws Exception { File matchingArtifactId = pom("/projects/project/children", "pom_matching_properties.xml"); - ModelWrapper model = this.pomUpdater.updatePom(matchingArtifactId, this.versions); + ModelWrapper model = this.pomUpdater.updateChildPom("spring-cloud-sleuth", matchingArtifactId, this.versions); then(model.dirty).isTrue(); then(model.model.getParent().getVersion()).isEqualTo("0.0.3.BUILD-SNAPSHOT"); diff --git a/src/test/resources/projects/spring-cloud-release b/src/test/resources/projects/spring-cloud-release deleted file mode 160000 index 320597b8..00000000 --- a/src/test/resources/projects/spring-cloud-release +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 320597b84bb0312c15228c4d42f46c189b86ed90 diff --git a/src/test/resources/projects/tmp/.gitignore b/src/test/resources/projects/tmp/.gitignore new file mode 100644 index 00000000..1667f838 --- /dev/null +++ b/src/test/resources/projects/tmp/.gitignore @@ -0,0 +1,17 @@ +*~ +#* +*# +.#* +.classpath +.project +.settings +.springBeans +.gradle +build +bin +target/ +.idea +*.iml +*.ipr +*.iws +.factorypath diff --git a/src/test/resources/projects/tmp/.settings.xml b/src/test/resources/projects/tmp/.settings.xml new file mode 100644 index 00000000..6c355129 --- /dev/null +++ b/src/test/resources/projects/tmp/.settings.xml @@ -0,0 +1,66 @@ + + + + + repo.spring.io + ${env.CI_DEPLOY_USERNAME} + ${env.CI_DEPLOY_PASSWORD} + + + + + + spring + true + + + spring-snapshots + Spring Snapshots + http://repo.spring.io/libs-snapshot-local + + true + + + + spring-milestones + Spring Milestones + http://repo.spring.io/libs-milestone-local + + false + + + + spring-releases + Spring Releases + http://repo.spring.io/release + + false + + + + + + spring-snapshots + Spring Snapshots + http://repo.spring.io/libs-snapshot-local + + true + + + + spring-milestones + Spring Milestones + http://repo.spring.io/libs-milestone-local + + false + + + + + + diff --git a/src/test/resources/projects/tmp/.travis.yml b/src/test/resources/projects/tmp/.travis.yml new file mode 100644 index 00000000..87c1ea4b --- /dev/null +++ b/src/test/resources/projects/tmp/.travis.yml @@ -0,0 +1,9 @@ +sudo: false +cache: + directories: + - $HOME/.m2 +language: java +before_install: + - gem install asciidoctor +script: +- ./mvnw clean install -P docs -q -U -Dmaven.test.redirectTestOutputToFile=true diff --git a/src/test/resources/projects/tmp/LICENSE.txt b/src/test/resources/projects/tmp/LICENSE.txt new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/src/test/resources/projects/tmp/LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/src/test/resources/projects/tmp/README.adoc b/src/test/resources/projects/tmp/README.adoc new file mode 100644 index 00000000..19ece70a --- /dev/null +++ b/src/test/resources/projects/tmp/README.adoc @@ -0,0 +1,85 @@ +// Do not edit this file (e.g. go instead to src/main/asciidoc) + +Spring Cloud Release Train is a curated set of dependencies across a +range of Spring Cloud projects. You consume it by using the +spring-cloud-dependencies POM to manage dependencies in Maven or +Gradle. The release trains have names, not versions, to avoid +confusion with the sub-projects. The names are an alphabetic sequence +(so you can sort them chronologically) with names of London Tube +stations ("Angel" is the first release, "Brixton" is the second). + +== Contributing + +Spring Cloud is released under the non-restrictive Apache 2.0 license, +and follows a very standard Github development process, using Github +tracker for issues and merging pull requests into master. If you want +to contribute even something trivial please do not hesitate, but +follow the guidelines below. + +=== Sign the Contributor License Agreement +Before we accept a non-trivial patch or pull request we will need you to sign the +https://cla.pivotal.io/sign/spring[Contributor License Agreement]. +Signing the contributor's agreement does not grant anyone commit rights to the main +repository, but it does mean that we can accept your contributions, and you will get an +author credit if we do. Active contributors might be asked to join the core team, and +given the ability to merge pull requests. + +=== Code of Conduct +This project adheres to the Contributor Covenant https://github.com/spring-cloud/spring-cloud-build/blob/master/docs/src/main/asciidoc/code-of-conduct.adoc[code of +conduct]. By participating, you are expected to uphold this code. Please report +unacceptable behavior to spring-code-of-conduct@pivotal.io. + +=== Code Conventions and Housekeeping +None of these is essential for a pull request, but they will all help. They can also be +added after the original pull request but before a merge. + +* Use the Spring Framework code format conventions. If you use Eclipse + you can import formatter settings using the + `eclipse-code-formatter.xml` file from the + https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/spring-cloud-dependencies-parent/eclipse-code-formatter.xml[Spring + Cloud Build] project. If using IntelliJ, you can use the + http://plugins.jetbrains.com/plugin/6546[Eclipse Code Formatter + Plugin] to import the same file. +* Make sure all new `.java` files to have a simple Javadoc class comment with at least an + `@author` tag identifying you, and preferably at least a paragraph on what the class is + for. +* Add the ASF license header comment to all new `.java` files (copy from existing files + in the project) +* Add yourself as an `@author` to the .java files that you modify substantially (more + than cosmetic changes). +* Add some Javadocs and, if you change the namespace, some XSD doc elements. +* A few unit tests would help a lot as well -- someone has to do it. +* If no-one else is using your branch, please rebase it against the current master (or + other target branch in the main project). +* When writing a commit message please follow http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html[these conventions], + if you are fixing an existing issue please add `Fixes gh-XXXX` at the end of the commit + message (where XXXX is the issue number). + +== Building and Deploying + +Since there is no code to compile in the starters they should do not need to compile, but a compiler has to be available because they are built and deployed as JAR artifacts. To install locally: + +---- + +$ mvn install -s .settings.xml +---- + +and to deploy snapshots to repo.spring.io: + +---- +$ mvn install -DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local +---- + +for a.BUILD-SNAPSHOT build use + +---- +$ mvn install -DaltReleaseDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-release-local +---- + +and for Maven Central use + +---- +$ mvn install -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2 +---- + +(the "central" profile is available for all projects in Spring Cloud and it sets up the gpg jar signing, and the repository has to be specified separately for this project because it is a parent of the starter parent which users in turn have as their own parent). \ No newline at end of file diff --git a/src/test/resources/projects/tmp/docs/pom.xml b/src/test/resources/projects/tmp/docs/pom.xml new file mode 100644 index 00000000..34780916 --- /dev/null +++ b/src/test/resources/projects/tmp/docs/pom.xml @@ -0,0 +1,54 @@ + + + 4.0.0 + org.springframework.cloud + spring-cloud-starter-docs + + org.springframework.cloud + spring-cloud-starter-build + Dalston.BUILD-SNAPSHOT + + pom + Spring Cloud Starter Docs + Spring Cloud Docs + + spring-cloud-starters + ${basedir}/.. + Brixton,Camden,Dalston + + + + + maven-deploy-plugin + + true + + + + + + + docs + + + + org.asciidoctor + asciidoctor-maven-plugin + false + + + org.apache.maven.plugins + maven-antrun-plugin + false + + + org.codehaus.mojo + build-helper-maven-plugin + false + + + + + + diff --git a/src/test/resources/projects/tmp/docs/src/main/asciidoc/README.adoc b/src/test/resources/projects/tmp/docs/src/main/asciidoc/README.adoc new file mode 100644 index 00000000..454dda11 --- /dev/null +++ b/src/test/resources/projects/tmp/docs/src/main/asciidoc/README.adoc @@ -0,0 +1,34 @@ +include::intro.adoc[] + +== Contributing + +include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/contributing.adoc[] + +== Building and Deploying + +Since there is no code to compile in the starters they should do not need to compile, but a compiler has to be available because they are built and deployed as JAR artifacts. To install locally: + +---- + +$ mvn install -s .settings.xml +---- + +and to deploy snapshots to repo.spring.io: + +---- +$ mvn install -DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local +---- + +for a.BUILD-SNAPSHOT build use + +---- +$ mvn install -DaltReleaseDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-release-local +---- + +and for Maven Central use + +---- +$ mvn install -P central -DaltReleaseDeploymentRepository=sonatype-nexus-staging::default::https://oss.sonatype.org/service/local/staging/deploy/maven2 +---- + +(the "central" profile is available for all projects in Spring Cloud and it sets up the gpg jar signing, and the repository has to be specified separately for this project because it is a parent of the starter parent which users in turn have as their own parent). diff --git a/src/test/resources/projects/tmp/docs/src/main/asciidoc/ghpages.sh b/src/test/resources/projects/tmp/docs/src/main/asciidoc/ghpages.sh new file mode 100755 index 00000000..a51d13c3 --- /dev/null +++ b/src/test/resources/projects/tmp/docs/src/main/asciidoc/ghpages.sh @@ -0,0 +1,330 @@ +#!/bin/bash -x + +set -e + +# Set default props like MAVEN_PATH, ROOT_FOLDER etc. +function set_default_props() { + # The script should be executed from the root folder + ROOT_FOLDER=`pwd` + echo "Current folder is ${ROOT_FOLDER}" + + if [[ ! -e "${ROOT_FOLDER}/.git" ]]; then + echo "You're not in the root folder of the project!" + exit 1 + fi + + # Prop that will let commit the changes + COMMIT_CHANGES="no" + MAVEN_PATH=${MAVEN_PATH:-} + echo "Path to Maven is [${MAVEN_PATH}]" + REPO_NAME=${PWD##*/} + echo "Repo name is [${REPO_NAME}]" + SPRING_CLOUD_STATIC_REPO=${SPRING_CLOUD_STATIC_REPO:-git@github.com:spring-cloud/spring-cloud-static.git} + echo "Spring Cloud Static repo is [${SPRING_CLOUD_STATIC_REPO}" +} + +# Check if gh-pages exists and docs have been built +function check_if_anything_to_sync() { + git remote set-url --push origin `git config remote.origin.url | sed -e 's/^git:/https:/'` + + if ! (git remote set-branches --add origin gh-pages && git fetch -q); then + echo "No gh-pages, so not syncing" + exit 0 + fi + + if ! [ -d docs/target/generated-docs ] && ! [ "${BUILD}" == "yes" ]; then + echo "No gh-pages sources in docs/target/generated-docs, so not syncing" + exit 0 + fi +} + +function retrieve_current_branch() { + # Code getting the name of the current branch. For master we want to publish as we did until now + # http://stackoverflow.com/questions/1593051/how-to-programmatically-determine-the-current-checked-out-git-branch + # If there is a branch already passed will reuse it - otherwise will try to find it + CURRENT_BRANCH=${BRANCH} + if [[ -z "${CURRENT_BRANCH}" ]] ; then + CURRENT_BRANCH=$(git symbolic-ref -q HEAD) + CURRENT_BRANCH=${CURRENT_BRANCH##refs/heads/} + CURRENT_BRANCH=${CURRENT_BRANCH:-HEAD} + fi + echo "Current branch is [${CURRENT_BRANCH}]" + git checkout ${CURRENT_BRANCH} || echo "Failed to check the branch... continuing with the script" +} + +# Switches to the provided value of the release version. We always prefix it with `v` +function switch_to_tag() { + git checkout v${VERSION} +} + +# Build the docs if switch is on +function build_docs_if_applicable() { + if [[ "${BUILD}" == "yes" ]] ; then + ./mvnw clean install -P docs -pl docs -DskipTests + fi +} + +# Get the name of the `docs.main` property +# Get whitelisted branches - assumes that a `docs` module is available under `docs` profile +function retrieve_doc_properties() { + MAIN_ADOC_VALUE=$("${MAVEN_PATH}"mvn -q \ + -Dexec.executable="echo" \ + -Dexec.args='${docs.main}' \ + --non-recursive \ + org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) + echo "Extracted 'main.adoc' from Maven build [${MAIN_ADOC_VALUE}]" + + + WHITELIST_PROPERTY=${WHITELIST_PROPERTY:-"docs.whitelisted.branches"} + WHITELISTED_BRANCHES_VALUE=$("${MAVEN_PATH}"mvn -q \ + -Dexec.executable="echo" \ + -Dexec.args="\${${WHITELIST_PROPERTY}}" \ + org.codehaus.mojo:exec-maven-plugin:1.3.1:exec \ + -P docs \ + -pl docs) + echo "Extracted '${WHITELIST_PROPERTY}' from Maven build [${WHITELISTED_BRANCHES_VALUE}]" +} + +# Stash any outstanding changes +function stash_changes() { + git diff-index --quiet HEAD && dirty=$? || (echo "Failed to check if the current repo is dirty. Assuming that it is." && dirty="1") + if [ "$dirty" != "0" ]; then git stash; fi +} + +# Switch to gh-pages branch to sync it with current branch +function add_docs_from_target() { + local DESTINATION_REPO_FOLDER + if [[ -z "${DESTINATION}" && -z "${CLONE}" ]] ; then + DESTINATION_REPO_FOLDER=${ROOT_FOLDER} + elif [[ "${CLONE}" == "yes" ]]; then + mkdir -p ${ROOT_FOLDER}/target + local clonedStatic=${ROOT_FOLDER}/target/spring-cloud-static + if [[ ! -e "${clonedStatic}/.git" ]]; then + echo "Cloning Spring Cloud Static to target" + git clone ${SPRING_CLOUD_STATIC_REPO} ${clonedStatic} && git checkout gh-pages + else + echo "Spring Cloud Static already cloned - will pull changes" + cd ${clonedStatic} && git checkout gh-pages && git pull origin gh-pages + fi + DESTINATION_REPO_FOLDER=${clonedStatic}/${REPO_NAME} + mkdir -p ${DESTINATION_REPO_FOLDER} + else + if [[ ! -e "${DESTINATION}/.git" ]]; then + echo "[${DESTINATION}] is not a git repository" + exit 1 + fi + DESTINATION_REPO_FOLDER=${DESTINATION}/${REPO_NAME} + mkdir -p ${DESTINATION_REPO_FOLDER} + echo "Destination was provided [${DESTINATION}]" + fi + cd ${DESTINATION_REPO_FOLDER} + git checkout gh-pages + git pull origin gh-pages + + # Add git branches + ################################################################### + if [[ -z "${VERSION}" ]] ; then + copy_docs_for_current_version + else + copy_docs_for_provided_version + fi + commit_changes_if_applicable +} + + +# Copies the docs by using the retrieved properties from Maven build +function copy_docs_for_current_version() { + if [[ "${CURRENT_BRANCH}" == "master" ]] ; then + echo -e "Current branch is master - will copy the current docs only to the root folder" + for f in docs/target/generated-docs/*; do + file=${f#docs/target/generated-docs/*} + if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then + # Not ignored... + cp -rf $f ${ROOT_FOLDER}/ + git add -A ${ROOT_FOLDER}/$file + fi + done + COMMIT_CHANGES="yes" + else + echo -e "Current branch is [${CURRENT_BRANCH}]" + # http://stackoverflow.com/questions/29300806/a-bash-script-to-check-if-a-string-is-present-in-a-comma-separated-list-of-strin + if [[ ",${WHITELISTED_BRANCHES_VALUE}," = *",${CURRENT_BRANCH},"* ]] ; then + mkdir -p ${ROOT_FOLDER}/${CURRENT_BRANCH} + echo -e "Branch [${CURRENT_BRANCH}] is whitelisted! Will copy the current docs to the [${CURRENT_BRANCH}] folder" + for f in docs/target/generated-docs/*; do + file=${f#docs/target/generated-docs/*} + if ! git ls-files -i -o --exclude-standard --directory | grep -q ^$file$; then + # Not ignored... + # We want users to access 1.0.0.BUILD-SNAPSHOT/ instead of 1.0.0.RELEASE/spring-cloud.sleuth.html + if [[ "${file}" == "${MAIN_ADOC_VALUE}.html" ]] ; then + # We don't want to copy the spring-cloud-sleuth.html + # we want it to be converted to index.html + cp -rf $f ${ROOT_FOLDER}/${CURRENT_BRANCH}/index.html + git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/index.html + else + cp -rf $f ${ROOT_FOLDER}/${CURRENT_BRANCH} + git add -A ${ROOT_FOLDER}/${CURRENT_BRANCH}/$file + fi + fi + done + COMMIT_CHANGES="yes" + else + echo -e "Branch [${CURRENT_BRANCH}] is not on the white list! Check out the Maven [${WHITELIST_PROPERTY}] property in + [docs] module available under [docs] profile. Won't commit any changes to gh-pages for this branch." + fi + fi +} + +# Copies the docs by using the explicitly provided version +function copy_docs_for_provided_version() { + local FOLDER=${DESTINATION_REPO_FOLDER}/${VERSION} + mkdir -p ${FOLDER} + echo -e "Current tag is [v${VERSION}] Will copy the current docs to the [${FOLDER}] folder" + for f in ${ROOT_FOLDER}/docs/target/generated-docs/*; do + file=${f#${ROOT_FOLDER}/docs/target/generated-docs/*} + copy_docs_for_branch ${file} ${FOLDER} + done + COMMIT_CHANGES="yes" + CURRENT_BRANCH="v${VERSION}" +} + +# Copies the docs from target to the provided destination +# Params: +# $1 - file from target +# $2 - destination to which copy the files +function copy_docs_for_branch() { + local file=$1 + local destination=$2 + if ! git ls-files -i -o --exclude-standard --directory | grep -q ^${file}$; then + # Not ignored... + # We want users to access 1.0.0.BUILD-SNAPSHOT/ instead of 1.0.0.RELEASE/spring-cloud.sleuth.html + if [[ ("${file}" == "${MAIN_ADOC_VALUE}.html") || ("${file}" == "${REPO_NAME}.html") ]] ; then + # We don't want to copy the spring-cloud-sleuth.html + # we want it to be converted to index.html + cp -rf $f ${destination}/index.html + git add -A ${destination}/index.html + else + cp -rf $f ${destination} + git add -A ${destination}/$file + fi + fi +} + +function commit_changes_if_applicable() { + if [[ "${COMMIT_CHANGES}" == "yes" ]] ; then + COMMIT_SUCCESSFUL="no" + git commit -a -m "Sync docs from ${CURRENT_BRANCH} to gh-pages" && COMMIT_SUCCESSFUL="yes" || echo "Failed to commit changes" + + # Uncomment the following push if you want to auto push to + # the gh-pages branch whenever you commit to master locally. + # This is a little extreme. Use with care! + ################################################################### + if [[ "${COMMIT_SUCCESSFUL}" == "yes" ]] ; then + git push origin gh-pages + fi + fi +} + +# Switch back to the previous branch and exit block +function checkout_previous_branch() { + # If -version was provided we need to come back to root project + cd ${ROOT_FOLDER} + git checkout ${CURRENT_BRANCH} || echo "Failed to check the branch... continuing with the script" + if [ "$dirty" != "0" ]; then git stash pop; fi + exit 0 +} + +# Assert if properties have been properly passed +function assert_properties() { +echo "VERSION [${VERSION}], DESTINATION [${DESTINATION}], CLONE [${CLONE}]" +if [[ "${VERSION}" != "" && (-z "${DESTINATION}" && -z "${CLONE}") ]] ; then echo "Version was set but destination / clone was not!"; exit 1;fi +if [[ ("${DESTINATION}" != "" && "${CLONE}" != "") && -z "${VERSION}" ]] ; then echo "Destination / clone was set but version was not!"; exit 1;fi +if [[ "${DESTINATION}" != "" && "${CLONE}" == "yes" ]] ; then echo "Destination and clone was set. Pick one!"; exit 1;fi +} + +# Prints the usage +function print_usage() { +cat </` +- if the destination switch is passed (-d) then the script will check if the provided dir is a git repo and then will + switch to gh-pages of that repo and copy the generated docs to `docs//` + +USAGE: + +You can use the following options: + +-v|--version - the script will apply the whole procedure for a particular library version +-d|--destination - the root of destination folder where the docs should be copied. You have to use the full path. + E.g. point to spring-cloud-static folder. Can't be used with (-c) +-b|--build - will run the standard build process after checking out the branch +-c|--clone - will automatically clone the spring-cloud-static repo instead of providing the destination. + Obviously can't be used with (-d) + +EOF +} + + +# ========================================== +# ____ ____ _____ _____ _____ _______ +# / ____|/ ____| __ \|_ _| __ \__ __| +# | (___ | | | |__) | | | | |__) | | | +# \___ \| | | _ / | | | ___/ | | +# ____) | |____| | \ \ _| |_| | | | +# |_____/ \_____|_| \_\_____|_| |_| +# +# ========================================== + +while [[ $# > 0 ]] +do +key="$1" +case ${key} in + -v|--version) + VERSION="$2" + shift # past argument + ;; + -d|--destination) + DESTINATION="$2" + shift # past argument + ;; + -b|--build) + BUILD="yes" + ;; + -c|--clone) + CLONE="yes" + ;; + -h|--help) + print_usage + exit 0 + ;; + *) + echo "Invalid option: [$1]" + print_usage + exit 1 + ;; +esac +shift # past argument or value +done + +assert_properties +set_default_props +check_if_anything_to_sync +if [[ -z "${VERSION}" ]] ; then + retrieve_current_branch +else + switch_to_tag +fi +build_docs_if_applicable +retrieve_doc_properties +stash_changes +add_docs_from_target +checkout_previous_branch \ No newline at end of file diff --git a/src/test/resources/projects/tmp/docs/src/main/asciidoc/intro.adoc b/src/test/resources/projects/tmp/docs/src/main/asciidoc/intro.adoc new file mode 100644 index 00000000..5ae66a35 --- /dev/null +++ b/src/test/resources/projects/tmp/docs/src/main/asciidoc/intro.adoc @@ -0,0 +1,7 @@ +Spring Cloud Release Train is a curated set of dependencies across a +range of Spring Cloud projects. You consume it by using the +spring-cloud-dependencies POM to manage dependencies in Maven or +Gradle. The release trains have names, not versions, to avoid +confusion with the sub-projects. The names are an alphabetic sequence +(so you can sort them chronologically) with names of London Tube +stations ("Angel" is the first release, "Brixton" is the second). \ No newline at end of file diff --git a/src/test/resources/projects/tmp/docs/src/main/asciidoc/spring-cloud-starters.adoc b/src/test/resources/projects/tmp/docs/src/main/asciidoc/spring-cloud-starters.adoc new file mode 100644 index 00000000..4d473a4a --- /dev/null +++ b/src/test/resources/projects/tmp/docs/src/main/asciidoc/spring-cloud-starters.adoc @@ -0,0 +1,65 @@ +:github: https://github.com/spring-cloud/spring-cloud-release +:githubmaster: {github}/tree/master +:docslink: {githubmaster}/docs/src/main/asciidoc +:springcloudversion: Dalston.BUILD-SNAPSHOT +:springioplatformversion: Brussels-BUILD-SNAPSHOT +:springBootVersion: 1.5.0.BUILD-SNAPSHOT + += Spring Cloud Release Train + +include::intro.adoc[] + +== Using Spring Cloud Dependencies with Spring IO Platform + +The Spring IO Platform is a modular, enterprise-grade curated set of dependencies. To use the Spring Cloud Starters with Spring IO Platform, you must import the Spring Cloud Dependencies bill of materials (BOM) first. + +To use version {springioplatformversion} of the Spring IO Platform and Spring Cloud Release Train {springcloudversion} with Maven, update the pom.xml as follows: + +[source,xml,indent=0,subs="verbatim,attributes"] +---- + + + + org.springframework.cloud + spring-cloud-dependencies + {springcloudversion} + pom + import + + + io.spring.platform + platform-bom + {springioplatformversion} + pom + import + + + +---- + +NOTE: The Spring Cloud Dependencies BOM must go first, so that its dependencies have precedence of the Spring IO Platform dependencies. + +For gradle, update the build.gradle as follows: + +[source,groovy,indent=0,subs="verbatim,attributes"] +---- +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath("org.springframework.boot:spring-boot-gradle-plugin:{springBootVersion}") + } +} + +apply plugin: 'spring-boot' + +dependencyManagement { + imports { + mavenBom "org.springframework.cloud:spring-cloud-dependencies:{springcloudversion}" + mavenBom 'io.spring.platform:platform-bom:{springioplatformversion}' + } +} +---- + +include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/master/docs/src/main/asciidoc/contributing-docs.adoc[] diff --git a/src/test/resources/projects/tmp/docs/src/main/ruby/generate_readme.sh b/src/test/resources/projects/tmp/docs/src/main/ruby/generate_readme.sh new file mode 100755 index 00000000..6d0ce9dc --- /dev/null +++ b/src/test/resources/projects/tmp/docs/src/main/ruby/generate_readme.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env ruby + +base_dir = File.join(File.dirname(__FILE__),'../../..') +src_dir = File.join(base_dir, "/src/main/asciidoc") +require 'asciidoctor' +require 'optparse' + +options = {} +file = "#{src_dir}/README.adoc" + +OptionParser.new do |o| + o.on('-o OUTPUT_FILE', 'Output file (default is stdout)') { |file| options[:to_file] = file unless file=='-' } + o.on('-h', '--help') { puts o; exit } + o.parse! +end + +file = ARGV[0] if ARGV.length>0 + +# Copied from https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/master/scripts/asciidoc-coalescer.rb +doc = Asciidoctor.load_file file, safe: :unsafe, header_only: true, attributes: options[:attributes] +header_attr_names = (doc.instance_variable_get :@attributes_modified).to_a +header_attr_names.each {|k| doc.attributes[%(#{k}!)] = '' unless doc.attr? k } +attrs = doc.attributes +attrs['allow-uri-read'] = true +puts attrs + +out = "// Do not edit this file (e.g. go instead to src/main/asciidoc)\n\n" +doc = Asciidoctor.load_file file, safe: :unsafe, parse: false, attributes: attrs +out << doc.reader.read + +unless options[:to_file] + puts out +else + File.open(options[:to_file],'w+') do |file| + file.write(out) + end +end diff --git a/src/test/resources/projects/tmp/git/COMMIT_EDITMSG b/src/test/resources/projects/tmp/git/COMMIT_EDITMSG new file mode 100644 index 00000000..31d703a2 --- /dev/null +++ b/src/test/resources/projects/tmp/git/COMMIT_EDITMSG @@ -0,0 +1,18 @@ +Going back to snapshots + +# Please enter the commit message for your changes. Lines starting +# with '#' will be ignored, and an empty message aborts the commit. +# +# Date: Mon Feb 6 12:02:16 2017 +0100 +# +# On branch Camden.x +# Your branch is ahead of 'origin/Camden.x' by 2 commits. +# (use "git push" to publish your local commits) +# +# Changes to be committed: +# modified: docs/pom.xml +# modified: docs/src/main/asciidoc/spring-cloud-starters.adoc +# modified: pom.xml +# modified: spring-cloud-dependencies/pom.xml +# modified: spring-cloud-starter-parent/pom.xml +# diff --git a/src/test/resources/projects/tmp/git/FETCH_HEAD b/src/test/resources/projects/tmp/git/FETCH_HEAD new file mode 100644 index 00000000..5330963c --- /dev/null +++ b/src/test/resources/projects/tmp/git/FETCH_HEAD @@ -0,0 +1,14 @@ +320597b84bb0312c15228c4d42f46c189b86ed90 branch 'master' of github.com:spring-cloud/spring-cloud-release +fb730db9b3999e45c350015c6cf83be35910a159 not-for-merge branch '1.0.0.M2' of github.com:spring-cloud/spring-cloud-release +474b03693496665434ab2615d6500bbb0b575a5b not-for-merge branch '1.0.0.M3' of github.com:spring-cloud/spring-cloud-release +7fdc875cb2b1620e8bc87ef8a27da2858eef7cd1 not-for-merge branch '1.0.0.RC1' of github.com:spring-cloud/spring-cloud-release +75d0bc7cc0995ac76b6cfad962ea54d05262a664 not-for-merge branch '1.0.0.RELEASE' of github.com:spring-cloud/spring-cloud-release +8e8a2d41b4beb8985919bc5a2bca2aa66374bdbb not-for-merge branch '1.0.1.RELEASE' of github.com:spring-cloud/spring-cloud-release +59414747ee8c095753a0b8c5641b328f80d47d33 not-for-merge branch '1.0.2.RELEASE' of github.com:spring-cloud/spring-cloud-release +73ec179d7ce96d5a98c2acd5697cd81c49dfd7d5 not-for-merge branch '1.0.x' of github.com:spring-cloud/spring-cloud-release +08c95747e807212c605d758bbb360f6d671b2932 not-for-merge branch 'Angel.SR3' of github.com:spring-cloud/spring-cloud-release +6882449721e48f955b102606ae3fc2535ebbd4cb not-for-merge branch 'Brixton' of github.com:spring-cloud/spring-cloud-release +7745834b138ffe1f647b14dd3c7d4d71eee8aac3 not-for-merge branch 'Brixton.M1' of github.com:spring-cloud/spring-cloud-release +f2036f13515dc6aa997cc15827919acec634eaae not-for-merge branch 'Brixton.M2' of github.com:spring-cloud/spring-cloud-release +928e0d8389dcee60189d6c0eb737ab9376e87f54 not-for-merge branch 'Camden.RC1' of github.com:spring-cloud/spring-cloud-release +b566ab3bea0506bccaa10f83784a41673606d6ee not-for-merge branch 'Camden.x' of github.com:spring-cloud/spring-cloud-release diff --git a/src/test/resources/projects/tmp/git/HEAD b/src/test/resources/projects/tmp/git/HEAD new file mode 100644 index 00000000..cb089cd8 --- /dev/null +++ b/src/test/resources/projects/tmp/git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/src/test/resources/projects/tmp/git/ORIG_HEAD b/src/test/resources/projects/tmp/git/ORIG_HEAD new file mode 100644 index 00000000..8bff2828 --- /dev/null +++ b/src/test/resources/projects/tmp/git/ORIG_HEAD @@ -0,0 +1 @@ +32ebcd2c317339400d65ad43999d4e5ddc05bd30 diff --git a/src/test/resources/projects/tmp/git/config b/src/test/resources/projects/tmp/git/config new file mode 100644 index 00000000..9499c086 --- /dev/null +++ b/src/test/resources/projects/tmp/git/config @@ -0,0 +1,7 @@ +[core] + repositoryformatversion = 0 + filemode = true + bare = false + logallrefupdates = true +[branch "master"] +[branch "Camden.x"] diff --git a/src/test/resources/projects/tmp/git/description b/src/test/resources/projects/tmp/git/description new file mode 100644 index 00000000..498b267a --- /dev/null +++ b/src/test/resources/projects/tmp/git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/src/test/resources/projects/tmp/git/hooks/applypatch-msg.sample b/src/test/resources/projects/tmp/git/hooks/applypatch-msg.sample new file mode 100755 index 00000000..a5d7b84a --- /dev/null +++ b/src/test/resources/projects/tmp/git/hooks/applypatch-msg.sample @@ -0,0 +1,15 @@ +#!/bin/sh +# +# An example hook script to check the commit log message taken by +# applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. The hook is +# allowed to edit the commit message file. +# +# To enable this hook, rename this file to "applypatch-msg". + +. git-sh-setup +commitmsg="$(git rev-parse --git-path hooks/commit-msg)" +test -x "$commitmsg" && exec "$commitmsg" ${1+"$@"} +: diff --git a/src/test/resources/projects/tmp/git/hooks/commit-msg.sample b/src/test/resources/projects/tmp/git/hooks/commit-msg.sample new file mode 100755 index 00000000..b58d1184 --- /dev/null +++ b/src/test/resources/projects/tmp/git/hooks/commit-msg.sample @@ -0,0 +1,24 @@ +#!/bin/sh +# +# An example hook script to check the commit log message. +# Called by "git commit" with one argument, the name of the file +# that has the commit message. The hook should exit with non-zero +# status after issuing an appropriate message if it wants to stop the +# commit. The hook is allowed to edit the commit message file. +# +# To enable this hook, rename this file to "commit-msg". + +# Uncomment the below to add a Signed-off-by line to the message. +# Doing this in a hook is a bad idea in general, but the prepare-commit-msg +# hook is more suited to it. +# +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" + +# This example catches duplicate Signed-off-by lines. + +test "" = "$(grep '^Signed-off-by: ' "$1" | + sort | uniq -c | sed -e '/^[ ]*1[ ]/d')" || { + echo >&2 Duplicate Signed-off-by lines. + exit 1 +} diff --git a/src/test/resources/projects/tmp/git/hooks/post-update.sample b/src/test/resources/projects/tmp/git/hooks/post-update.sample new file mode 100755 index 00000000..ec17ec19 --- /dev/null +++ b/src/test/resources/projects/tmp/git/hooks/post-update.sample @@ -0,0 +1,8 @@ +#!/bin/sh +# +# An example hook script to prepare a packed repository for use over +# dumb transports. +# +# To enable this hook, rename this file to "post-update". + +exec git update-server-info diff --git a/src/test/resources/projects/tmp/git/hooks/pre-applypatch.sample b/src/test/resources/projects/tmp/git/hooks/pre-applypatch.sample new file mode 100755 index 00000000..4142082b --- /dev/null +++ b/src/test/resources/projects/tmp/git/hooks/pre-applypatch.sample @@ -0,0 +1,14 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed +# by applypatch from an e-mail message. +# +# The hook should exit with non-zero status after issuing an +# appropriate message if it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-applypatch". + +. git-sh-setup +precommit="$(git rev-parse --git-path hooks/pre-commit)" +test -x "$precommit" && exec "$precommit" ${1+"$@"} +: diff --git a/src/test/resources/projects/tmp/git/hooks/pre-commit.sample b/src/test/resources/projects/tmp/git/hooks/pre-commit.sample new file mode 100755 index 00000000..68d62d54 --- /dev/null +++ b/src/test/resources/projects/tmp/git/hooks/pre-commit.sample @@ -0,0 +1,49 @@ +#!/bin/sh +# +# An example hook script to verify what is about to be committed. +# Called by "git commit" with no arguments. The hook should +# exit with non-zero status after issuing an appropriate message if +# it wants to stop the commit. +# +# To enable this hook, rename this file to "pre-commit". + +if git rev-parse --verify HEAD >/dev/null 2>&1 +then + against=HEAD +else + # Initial commit: diff against an empty tree object + against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 +fi + +# If you want to allow non-ASCII filenames set this variable to true. +allownonascii=$(git config --bool hooks.allownonascii) + +# Redirect output to stderr. +exec 1>&2 + +# Cross platform projects tend to avoid non-ASCII filenames; prevent +# them from being added to the repository. We exploit the fact that the +# printable range starts at the space character and ends with tilde. +if [ "$allownonascii" != "true" ] && + # Note that the use of brackets around a tr range is ok here, (it's + # even required, for portability to Solaris 10's /usr/bin/tr), since + # the square bracket bytes happen to fall in the designated range. + test $(git diff --cached --name-only --diff-filter=A -z $against | + LC_ALL=C tr -d '[ -~]\0' | wc -c) != 0 +then + cat <<\EOF +Error: Attempt to add a non-ASCII file name. + +This can cause problems if you want to work with people on other platforms. + +To be portable it is advisable to rename the file. + +If you know what you are doing you can disable this check using: + + git config hooks.allownonascii true +EOF + exit 1 +fi + +# If there are whitespace errors, print the offending file names and fail. +exec git diff-index --check --cached $against -- diff --git a/src/test/resources/projects/tmp/git/hooks/pre-push.sample b/src/test/resources/projects/tmp/git/hooks/pre-push.sample new file mode 100755 index 00000000..6187dbf4 --- /dev/null +++ b/src/test/resources/projects/tmp/git/hooks/pre-push.sample @@ -0,0 +1,53 @@ +#!/bin/sh + +# An example hook script to verify what is about to be pushed. Called by "git +# push" after it has checked the remote status, but before anything has been +# pushed. If this script exits with a non-zero status nothing will be pushed. +# +# This hook is called with the following parameters: +# +# $1 -- Name of the remote to which the push is being done +# $2 -- URL to which the push is being done +# +# If pushing without using a named remote those arguments will be equal. +# +# Information about the commits which are being pushed is supplied as lines to +# the standard input in the form: +# +# +# +# This sample shows how to prevent push of commits where the log message starts +# with "WIP" (work in progress). + +remote="$1" +url="$2" + +z40=0000000000000000000000000000000000000000 + +while read local_ref local_sha remote_ref remote_sha +do + if [ "$local_sha" = $z40 ] + then + # Handle delete + : + else + if [ "$remote_sha" = $z40 ] + then + # New branch, examine all commits + range="$local_sha" + else + # Update to existing branch, examine new commits + range="$remote_sha..$local_sha" + fi + + # Check for WIP commit + commit=`git rev-list -n 1 --grep '^WIP' "$range"` + if [ -n "$commit" ] + then + echo >&2 "Found WIP commit in $local_ref, not pushing" + exit 1 + fi + fi +done + +exit 0 diff --git a/src/test/resources/projects/tmp/git/hooks/pre-rebase.sample b/src/test/resources/projects/tmp/git/hooks/pre-rebase.sample new file mode 100755 index 00000000..33730ca6 --- /dev/null +++ b/src/test/resources/projects/tmp/git/hooks/pre-rebase.sample @@ -0,0 +1,169 @@ +#!/bin/sh +# +# Copyright (c) 2006, 2008 Junio C Hamano +# +# The "pre-rebase" hook is run just before "git rebase" starts doing +# its job, and can prevent the command from running by exiting with +# non-zero status. +# +# The hook is called with the following parameters: +# +# $1 -- the upstream the series was forked from. +# $2 -- the branch being rebased (or empty when rebasing the current branch). +# +# This sample shows how to prevent topic branches that are already +# merged to 'next' branch from getting rebased, because allowing it +# would result in rebasing already published history. + +publish=next +basebranch="$1" +if test "$#" = 2 +then + topic="refs/heads/$2" +else + topic=`git symbolic-ref HEAD` || + exit 0 ;# we do not interrupt rebasing detached HEAD +fi + +case "$topic" in +refs/heads/??/*) + ;; +*) + exit 0 ;# we do not interrupt others. + ;; +esac + +# Now we are dealing with a topic branch being rebased +# on top of master. Is it OK to rebase it? + +# Does the topic really exist? +git show-ref -q "$topic" || { + echo >&2 "No such branch $topic" + exit 1 +} + +# Is topic fully merged to master? +not_in_master=`git rev-list --pretty=oneline ^master "$topic"` +if test -z "$not_in_master" +then + echo >&2 "$topic is fully merged to master; better remove it." + exit 1 ;# we could allow it, but there is no point. +fi + +# Is topic ever merged to next? If so you should not be rebasing it. +only_next_1=`git rev-list ^master "^$topic" ${publish} | sort` +only_next_2=`git rev-list ^master ${publish} | sort` +if test "$only_next_1" = "$only_next_2" +then + not_in_topic=`git rev-list "^$topic" master` + if test -z "$not_in_topic" + then + echo >&2 "$topic is already up-to-date with master" + exit 1 ;# we could allow it, but there is no point. + else + exit 0 + fi +else + not_in_next=`git rev-list --pretty=oneline ^${publish} "$topic"` + /usr/bin/perl -e ' + my $topic = $ARGV[0]; + my $msg = "* $topic has commits already merged to public branch:\n"; + my (%not_in_next) = map { + /^([0-9a-f]+) /; + ($1 => 1); + } split(/\n/, $ARGV[1]); + for my $elem (map { + /^([0-9a-f]+) (.*)$/; + [$1 => $2]; + } split(/\n/, $ARGV[2])) { + if (!exists $not_in_next{$elem->[0]}) { + if ($msg) { + print STDERR $msg; + undef $msg; + } + print STDERR " $elem->[1]\n"; + } + } + ' "$topic" "$not_in_next" "$not_in_master" + exit 1 +fi + +<<\DOC_END + +This sample hook safeguards topic branches that have been +published from being rewound. + +The workflow assumed here is: + + * Once a topic branch forks from "master", "master" is never + merged into it again (either directly or indirectly). + + * Once a topic branch is fully cooked and merged into "master", + it is deleted. If you need to build on top of it to correct + earlier mistakes, a new topic branch is created by forking at + the tip of the "master". This is not strictly necessary, but + it makes it easier to keep your history simple. + + * Whenever you need to test or publish your changes to topic + branches, merge them into "next" branch. + +The script, being an example, hardcodes the publish branch name +to be "next", but it is trivial to make it configurable via +$GIT_DIR/config mechanism. + +With this workflow, you would want to know: + +(1) ... if a topic branch has ever been merged to "next". Young + topic branches can have stupid mistakes you would rather + clean up before publishing, and things that have not been + merged into other branches can be easily rebased without + affecting other people. But once it is published, you would + not want to rewind it. + +(2) ... if a topic branch has been fully merged to "master". + Then you can delete it. More importantly, you should not + build on top of it -- other people may already want to + change things related to the topic as patches against your + "master", so if you need further changes, it is better to + fork the topic (perhaps with the same name) afresh from the + tip of "master". + +Let's look at this example: + + o---o---o---o---o---o---o---o---o---o "next" + / / / / + / a---a---b A / / + / / / / + / / c---c---c---c B / + / / / \ / + / / / b---b C \ / + / / / / \ / + ---o---o---o---o---o---o---o---o---o---o---o "master" + + +A, B and C are topic branches. + + * A has one fix since it was merged up to "next". + + * B has finished. It has been fully merged up to "master" and "next", + and is ready to be deleted. + + * C has not merged to "next" at all. + +We would want to allow C to be rebased, refuse A, and encourage +B to be deleted. + +To compute (1): + + git rev-list ^master ^topic next + git rev-list ^master next + + if these match, topic has not merged in next at all. + +To compute (2): + + git rev-list master..topic + + if this is empty, it is fully merged to "master". + +DOC_END diff --git a/src/test/resources/projects/tmp/git/hooks/prepare-commit-msg.sample b/src/test/resources/projects/tmp/git/hooks/prepare-commit-msg.sample new file mode 100755 index 00000000..f093a02e --- /dev/null +++ b/src/test/resources/projects/tmp/git/hooks/prepare-commit-msg.sample @@ -0,0 +1,36 @@ +#!/bin/sh +# +# An example hook script to prepare the commit log message. +# Called by "git commit" with the name of the file that has the +# commit message, followed by the description of the commit +# message's source. The hook's purpose is to edit the commit +# message file. If the hook fails with a non-zero status, +# the commit is aborted. +# +# To enable this hook, rename this file to "prepare-commit-msg". + +# This hook includes three examples. The first comments out the +# "Conflicts:" part of a merge commit. +# +# The second includes the output of "git diff --name-status -r" +# into the message, just before the "git status" output. It is +# commented because it doesn't cope with --amend or with squashed +# commits. +# +# The third example adds a Signed-off-by line to the message, that can +# still be edited. This is rarely a good idea. + +case "$2,$3" in + merge,) + /usr/bin/perl -i.bak -ne 's/^/# /, s/^# #/#/ if /^Conflicts/ .. /#/; print' "$1" ;; + +# ,|template,) +# /usr/bin/perl -i.bak -pe ' +# print "\n" . `git diff --cached --name-status -r` +# if /^#/ && $first++ == 0' "$1" ;; + + *) ;; +esac + +# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') +# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" diff --git a/src/test/resources/projects/tmp/git/hooks/update.sample b/src/test/resources/projects/tmp/git/hooks/update.sample new file mode 100755 index 00000000..80ba9413 --- /dev/null +++ b/src/test/resources/projects/tmp/git/hooks/update.sample @@ -0,0 +1,128 @@ +#!/bin/sh +# +# An example hook script to block unannotated tags from entering. +# Called by "git receive-pack" with arguments: refname sha1-old sha1-new +# +# To enable this hook, rename this file to "update". +# +# Config +# ------ +# hooks.allowunannotated +# This boolean sets whether unannotated tags will be allowed into the +# repository. By default they won't be. +# hooks.allowdeletetag +# This boolean sets whether deleting tags will be allowed in the +# repository. By default they won't be. +# hooks.allowmodifytag +# This boolean sets whether a tag may be modified after creation. By default +# it won't be. +# hooks.allowdeletebranch +# This boolean sets whether deleting branches will be allowed in the +# repository. By default they won't be. +# hooks.denycreatebranch +# This boolean sets whether remotely creating branches will be denied +# in the repository. By default this is allowed. +# + +# --- Command line +refname="$1" +oldrev="$2" +newrev="$3" + +# --- Safety check +if [ -z "$GIT_DIR" ]; then + echo "Don't run this script from the command line." >&2 + echo " (if you want, you could supply GIT_DIR then run" >&2 + echo " $0 )" >&2 + exit 1 +fi + +if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then + echo "usage: $0 " >&2 + exit 1 +fi + +# --- Config +allowunannotated=$(git config --bool hooks.allowunannotated) +allowdeletebranch=$(git config --bool hooks.allowdeletebranch) +denycreatebranch=$(git config --bool hooks.denycreatebranch) +allowdeletetag=$(git config --bool hooks.allowdeletetag) +allowmodifytag=$(git config --bool hooks.allowmodifytag) + +# check for no description +projectdesc=$(sed -e '1q' "$GIT_DIR/description") +case "$projectdesc" in +"Unnamed repository"* | "") + echo "*** Project description file hasn't been set" >&2 + exit 1 + ;; +esac + +# --- Check types +# if $newrev is 0000...0000, it's a commit to delete a ref. +zero="0000000000000000000000000000000000000000" +if [ "$newrev" = "$zero" ]; then + newrev_type=delete +else + newrev_type=$(git cat-file -t $newrev) +fi + +case "$refname","$newrev_type" in + refs/tags/*,commit) + # un-annotated tag + short_refname=${refname##refs/tags/} + if [ "$allowunannotated" != "true" ]; then + echo "*** The un-annotated tag, $short_refname, is not allowed in this repository" >&2 + echo "*** Use 'git tag [ -a | -s ]' for tags you want to propagate." >&2 + exit 1 + fi + ;; + refs/tags/*,delete) + # delete tag + if [ "$allowdeletetag" != "true" ]; then + echo "*** Deleting a tag is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/tags/*,tag) + # annotated tag + if [ "$allowmodifytag" != "true" ] && git rev-parse $refname > /dev/null 2>&1 + then + echo "*** Tag '$refname' already exists." >&2 + echo "*** Modifying a tag is not allowed in this repository." >&2 + exit 1 + fi + ;; + refs/heads/*,commit) + # branch + if [ "$oldrev" = "$zero" -a "$denycreatebranch" = "true" ]; then + echo "*** Creating a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/heads/*,delete) + # delete branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + refs/remotes/*,commit) + # tracking branch + ;; + refs/remotes/*,delete) + # delete tracking branch + if [ "$allowdeletebranch" != "true" ]; then + echo "*** Deleting a tracking branch is not allowed in this repository" >&2 + exit 1 + fi + ;; + *) + # Anything else (is there anything else?) + echo "*** Update hook: unknown type of update to ref $refname of type $newrev_type" >&2 + exit 1 + ;; +esac + +# --- Finished +exit 0 diff --git a/src/test/resources/projects/tmp/git/index b/src/test/resources/projects/tmp/git/index new file mode 100644 index 00000000..80297578 Binary files /dev/null and b/src/test/resources/projects/tmp/git/index differ diff --git a/src/test/resources/projects/tmp/git/info/exclude b/src/test/resources/projects/tmp/git/info/exclude new file mode 100644 index 00000000..a5196d1b --- /dev/null +++ b/src/test/resources/projects/tmp/git/info/exclude @@ -0,0 +1,6 @@ +# git ls-files --others --exclude-from=.git/info/exclude +# Lines that start with '#' are comments. +# For a project mostly in C, the following would be a good set of +# exclude patterns (uncomment them if you want to use them): +# *.[oa] +# *~ diff --git a/src/test/resources/projects/tmp/git/logs/HEAD b/src/test/resources/projects/tmp/git/logs/HEAD new file mode 100644 index 00000000..c8d610e8 --- /dev/null +++ b/src/test/resources/projects/tmp/git/logs/HEAD @@ -0,0 +1,12 @@ +0000000000000000000000000000000000000000 e1248f716b5656af04ded489b481db45ad3dfc8f Marcin Grzejszczak 1473364042 +0200 clone: from git@github.com:spring-cloud/spring-cloud-release.git +e1248f716b5656af04ded489b481db45ad3dfc8f 1ab978f42299811efa4953b98a923699c95f6776 Marcin Grzejszczak 1474826109 +0200 checkout: moving from master to vCamden.RELEASE +1ab978f42299811efa4953b98a923699c95f6776 e1248f716b5656af04ded489b481db45ad3dfc8f Marcin Grzejszczak 1474826610 +0200 checkout: moving from 1ab978f42299811efa4953b98a923699c95f6776 to master +e1248f716b5656af04ded489b481db45ad3dfc8f b05cdc5318cbc5c049a391fe67ac4a8cf763689d Marcin Grzejszczak 1486373153 +0100 checkout: moving from master to Camden.x +b05cdc5318cbc5c049a391fe67ac4a8cf763689d 25af4f2162cdf0642c78ea8e63c1744158b6ad1b Marcin Grzejszczak 1486377649 +0100 commit: Bumping versions before release +25af4f2162cdf0642c78ea8e63c1744158b6ad1b a29f784a15fc3d039d4dfec619ebcddaf0ef8b8a Marcin Grzejszczak 1486378936 +0100 revert: Going back to snapshots +a29f784a15fc3d039d4dfec619ebcddaf0ef8b8a b566ab3bea0506bccaa10f83784a41673606d6ee Marcin Grzejszczak 1486379057 +0100 commit (amend): Going back to snapshots +b566ab3bea0506bccaa10f83784a41673606d6ee e1248f716b5656af04ded489b481db45ad3dfc8f Marcin Grzejszczak 1486379087 +0100 checkout: moving from Camden.x to master +e1248f716b5656af04ded489b481db45ad3dfc8f 32ebcd2c317339400d65ad43999d4e5ddc05bd30 Marcin Grzejszczak 1486379095 +0100 pull --rebase origin master: checkout 32ebcd2c317339400d65ad43999d4e5ddc05bd30 +32ebcd2c317339400d65ad43999d4e5ddc05bd30 32ebcd2c317339400d65ad43999d4e5ddc05bd30 Marcin Grzejszczak 1486379095 +0100 rebase finished: returning to refs/heads/master +32ebcd2c317339400d65ad43999d4e5ddc05bd30 320597b84bb0312c15228c4d42f46c189b86ed90 Marcin Grzejszczak 1488827673 +0100 pull --rebase origin master: checkout 320597b84bb0312c15228c4d42f46c189b86ed90 +320597b84bb0312c15228c4d42f46c189b86ed90 320597b84bb0312c15228c4d42f46c189b86ed90 Marcin Grzejszczak 1488827673 +0100 rebase finished: returning to refs/heads/master diff --git a/src/test/resources/projects/tmp/git/logs/refs/heads/Camden.x b/src/test/resources/projects/tmp/git/logs/refs/heads/Camden.x new file mode 100644 index 00000000..4885b95f --- /dev/null +++ b/src/test/resources/projects/tmp/git/logs/refs/heads/Camden.x @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 b05cdc5318cbc5c049a391fe67ac4a8cf763689d Marcin Grzejszczak 1486373153 +0100 branch: Created from refs/remotes/origin/Camden.x +b05cdc5318cbc5c049a391fe67ac4a8cf763689d 25af4f2162cdf0642c78ea8e63c1744158b6ad1b Marcin Grzejszczak 1486377649 +0100 commit: Bumping versions before release +25af4f2162cdf0642c78ea8e63c1744158b6ad1b a29f784a15fc3d039d4dfec619ebcddaf0ef8b8a Marcin Grzejszczak 1486378936 +0100 revert: Going back to snapshots +a29f784a15fc3d039d4dfec619ebcddaf0ef8b8a b566ab3bea0506bccaa10f83784a41673606d6ee Marcin Grzejszczak 1486379057 +0100 commit (amend): Going back to snapshots diff --git a/src/test/resources/projects/tmp/git/logs/refs/heads/master b/src/test/resources/projects/tmp/git/logs/refs/heads/master new file mode 100644 index 00000000..b68bfdb1 --- /dev/null +++ b/src/test/resources/projects/tmp/git/logs/refs/heads/master @@ -0,0 +1,3 @@ +0000000000000000000000000000000000000000 e1248f716b5656af04ded489b481db45ad3dfc8f Marcin Grzejszczak 1473364042 +0200 clone: from git@github.com:spring-cloud/spring-cloud-release.git +e1248f716b5656af04ded489b481db45ad3dfc8f 32ebcd2c317339400d65ad43999d4e5ddc05bd30 Marcin Grzejszczak 1486379095 +0100 rebase finished: refs/heads/master onto 32ebcd2c317339400d65ad43999d4e5ddc05bd30 +32ebcd2c317339400d65ad43999d4e5ddc05bd30 320597b84bb0312c15228c4d42f46c189b86ed90 Marcin Grzejszczak 1488827673 +0100 rebase finished: refs/heads/master onto 320597b84bb0312c15228c4d42f46c189b86ed90 diff --git a/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/Brixton b/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/Brixton new file mode 100644 index 00000000..9462eaac --- /dev/null +++ b/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/Brixton @@ -0,0 +1,2 @@ +ccc57368d5e766e493c57f44333deae7eca6d864 7ac1649d4b941fdc03f877ab7d929a52018a1f75 Marcin Grzejszczak 1474826096 +0200 fetch: fast-forward +7ac1649d4b941fdc03f877ab7d929a52018a1f75 6882449721e48f955b102606ae3fc2535ebbd4cb Marcin Grzejszczak 1486372922 +0100 fetch: fast-forward diff --git a/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/Camden.RC1 b/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/Camden.RC1 new file mode 100644 index 00000000..4b689fa5 --- /dev/null +++ b/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/Camden.RC1 @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 928e0d8389dcee60189d6c0eb737ab9376e87f54 Marcin Grzejszczak 1474826096 +0200 fetch: storing head diff --git a/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/Camden.x b/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/Camden.x new file mode 100644 index 00000000..76c7e191 --- /dev/null +++ b/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/Camden.x @@ -0,0 +1,2 @@ +0000000000000000000000000000000000000000 b05cdc5318cbc5c049a391fe67ac4a8cf763689d Marcin Grzejszczak 1486372922 +0100 fetch: storing head +b05cdc5318cbc5c049a391fe67ac4a8cf763689d b566ab3bea0506bccaa10f83784a41673606d6ee Marcin Grzejszczak 1486379066 +0100 update by push diff --git a/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/HEAD b/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/HEAD new file mode 100644 index 00000000..6e6747de --- /dev/null +++ b/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/HEAD @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 e1248f716b5656af04ded489b481db45ad3dfc8f Marcin Grzejszczak 1473364042 +0200 clone: from git@github.com:spring-cloud/spring-cloud-release.git diff --git a/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/master b/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/master new file mode 100644 index 00000000..4b630bbe --- /dev/null +++ b/src/test/resources/projects/tmp/git/logs/refs/remotes/origin/master @@ -0,0 +1,3 @@ +e1248f716b5656af04ded489b481db45ad3dfc8f 530a739b2abeaae75c267dec70ba03d507afe81b Marcin Grzejszczak 1474826096 +0200 fetch: fast-forward +530a739b2abeaae75c267dec70ba03d507afe81b 32ebcd2c317339400d65ad43999d4e5ddc05bd30 Marcin Grzejszczak 1486372922 +0100 fetch: fast-forward +32ebcd2c317339400d65ad43999d4e5ddc05bd30 320597b84bb0312c15228c4d42f46c189b86ed90 Marcin Grzejszczak 1488827673 +0100 pull --rebase origin master: fast-forward diff --git a/src/test/resources/projects/tmp/git/logs/refs/stash b/src/test/resources/projects/tmp/git/logs/refs/stash new file mode 100644 index 00000000..031c568d --- /dev/null +++ b/src/test/resources/projects/tmp/git/logs/refs/stash @@ -0,0 +1 @@ +0000000000000000000000000000000000000000 dd40ebe950c0a0cd5de542e3d0e7a0e1ac4e70aa Marcin Grzejszczak 1474826091 +0200 WIP on master: e1248f7 Revert to snapshots diff --git a/src/test/resources/projects/tmp/git/objects/02/bfd7c14f411309d0d710ca84c77cc68a1425e3 b/src/test/resources/projects/tmp/git/objects/02/bfd7c14f411309d0d710ca84c77cc68a1425e3 new file mode 100644 index 00000000..1435f7c7 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/02/bfd7c14f411309d0d710ca84c77cc68a1425e3 differ diff --git a/src/test/resources/projects/tmp/git/objects/05/2c269bb095f70ce6174838c2032ab8f9cf7bb3 b/src/test/resources/projects/tmp/git/objects/05/2c269bb095f70ce6174838c2032ab8f9cf7bb3 new file mode 100644 index 00000000..07aab2ad Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/05/2c269bb095f70ce6174838c2032ab8f9cf7bb3 differ diff --git a/src/test/resources/projects/tmp/git/objects/06/e0dc5816eb2b5c2a377d61848d9de4a3644ea5 b/src/test/resources/projects/tmp/git/objects/06/e0dc5816eb2b5c2a377d61848d9de4a3644ea5 new file mode 100644 index 00000000..7eebed5f Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/06/e0dc5816eb2b5c2a377d61848d9de4a3644ea5 differ diff --git a/src/test/resources/projects/tmp/git/objects/08/ca4797e9798630d33eb8977c25c48b1ad7002c b/src/test/resources/projects/tmp/git/objects/08/ca4797e9798630d33eb8977c25c48b1ad7002c new file mode 100644 index 00000000..a885daf9 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/08/ca4797e9798630d33eb8977c25c48b1ad7002c differ diff --git a/src/test/resources/projects/tmp/git/objects/09/33b69db0d39065595fe474ccdf590e95fcc984 b/src/test/resources/projects/tmp/git/objects/09/33b69db0d39065595fe474ccdf590e95fcc984 new file mode 100644 index 00000000..75a397a3 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/09/33b69db0d39065595fe474ccdf590e95fcc984 differ diff --git a/src/test/resources/projects/tmp/git/objects/09/46dce6d42e6209822f9ef1b36033b0af1a8309 b/src/test/resources/projects/tmp/git/objects/09/46dce6d42e6209822f9ef1b36033b0af1a8309 new file mode 100644 index 00000000..e099b60d Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/09/46dce6d42e6209822f9ef1b36033b0af1a8309 differ diff --git a/src/test/resources/projects/tmp/git/objects/0a/7dac221c045701bf3c08f4d49ba80755e278af b/src/test/resources/projects/tmp/git/objects/0a/7dac221c045701bf3c08f4d49ba80755e278af new file mode 100644 index 00000000..434b334e Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/0a/7dac221c045701bf3c08f4d49ba80755e278af differ diff --git a/src/test/resources/projects/tmp/git/objects/0c/d5c212471c054044677265d0306b6b8c281d60 b/src/test/resources/projects/tmp/git/objects/0c/d5c212471c054044677265d0306b6b8c281d60 new file mode 100644 index 00000000..fd486d61 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/0c/d5c212471c054044677265d0306b6b8c281d60 differ diff --git a/src/test/resources/projects/tmp/git/objects/0e/73ce5907174c1734d1878f8f40899ee2df7d1f b/src/test/resources/projects/tmp/git/objects/0e/73ce5907174c1734d1878f8f40899ee2df7d1f new file mode 100644 index 00000000..3e995ba8 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/0e/73ce5907174c1734d1878f8f40899ee2df7d1f differ diff --git a/src/test/resources/projects/tmp/git/objects/10/7afe2f2cfa57952648aecf534d4b7bf5253800 b/src/test/resources/projects/tmp/git/objects/10/7afe2f2cfa57952648aecf534d4b7bf5253800 new file mode 100644 index 00000000..352610e0 --- /dev/null +++ b/src/test/resources/projects/tmp/git/objects/10/7afe2f2cfa57952648aecf534d4b7bf5253800 @@ -0,0 +1 @@ +xν0@a>MLMqsr.-PH _FJtGZFWkVJFC\9lRqdqJQEkf*1 3 y ݼЂO8 [4v3TʮÞ m%䱴>){*3i=V \ No newline at end of file diff --git a/src/test/resources/projects/tmp/git/objects/10/f3c204347a6430d32435f25058cadd954f9b1a b/src/test/resources/projects/tmp/git/objects/10/f3c204347a6430d32435f25058cadd954f9b1a new file mode 100644 index 00000000..d31efbc8 --- /dev/null +++ b/src/test/resources/projects/tmp/git/objects/10/f3c204347a6430d32435f25058cadd954f9b1a @@ -0,0 +1,3 @@ +x+)JMU013g040031QK,L/JeKa*~9vf]M @A/,aq]~Y,|\8y0DZ< fHqjIIf^z^EnCi7KʹNtٴϧ0%Eez@e_ygoPg'*tv v+(aVl2uNƺ\|C:%'3Hyε@ٓ1Quמ q]8EOxSÛ/vK0@t\L/-Rkdї/` Sa̯[n!Uac@6;h¶ḽ +]]M sZ\H!׎!X +NH'o1d1ŝ+g@Jιon6hw|lE2 ir1IDMU_Cxz^@.Vg u- +݅ + QwՊQ]UOVCĿW_5я #M1K_+S&ַHqo~I W. 9_jl;|Ȭp j8z)tOQ.wqCpFEҚ +j c vbYq)]#F螙b "hͦw #G%,ٔ~'+zf)<ۿDs4ݱ`wc \ No newline at end of file diff --git a/src/test/resources/projects/tmp/git/objects/29/c61ee1a6d625b44cc7e23d086a8cf2adf2542a b/src/test/resources/projects/tmp/git/objects/29/c61ee1a6d625b44cc7e23d086a8cf2adf2542a new file mode 100644 index 00000000..cff53bab Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/29/c61ee1a6d625b44cc7e23d086a8cf2adf2542a differ diff --git a/src/test/resources/projects/tmp/git/objects/2e/3905698baa4969a8e27d6d347146c4f10b662d b/src/test/resources/projects/tmp/git/objects/2e/3905698baa4969a8e27d6d347146c4f10b662d new file mode 100644 index 00000000..ae2ffa59 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/2e/3905698baa4969a8e27d6d347146c4f10b662d differ diff --git a/src/test/resources/projects/tmp/git/objects/32/0597b84bb0312c15228c4d42f46c189b86ed90 b/src/test/resources/projects/tmp/git/objects/32/0597b84bb0312c15228c4d42f46c189b86ed90 new file mode 100644 index 00000000..f751df95 --- /dev/null +++ b/src/test/resources/projects/tmp/git/objects/32/0597b84bb0312c15228c4d42f46c189b86ed90 @@ -0,0 +1 @@ +xmMJ@a9E]`ADEpQ!]gILe _IE"cߑl8mI\>qlE&$v981ac]e*)gVf܁ ]rWu3S]dٌl?9 \ No newline at end of file diff --git a/src/test/resources/projects/tmp/git/objects/57/8e15047403e46a1a05f7d45ced53dc89eb59b7 b/src/test/resources/projects/tmp/git/objects/57/8e15047403e46a1a05f7d45ced53dc89eb59b7 new file mode 100644 index 00000000..d742afad Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/57/8e15047403e46a1a05f7d45ced53dc89eb59b7 differ diff --git a/src/test/resources/projects/tmp/git/objects/59/9d7f6c393d6dada17584ef3af4cd9e4ed432d6 b/src/test/resources/projects/tmp/git/objects/59/9d7f6c393d6dada17584ef3af4cd9e4ed432d6 new file mode 100644 index 00000000..7280d774 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/59/9d7f6c393d6dada17584ef3af4cd9e4ed432d6 differ diff --git a/src/test/resources/projects/tmp/git/objects/59/dce50b38ffedd9a73b50278faab9b041d1bd62 b/src/test/resources/projects/tmp/git/objects/59/dce50b38ffedd9a73b50278faab9b041d1bd62 new file mode 100644 index 00000000..4fc82210 --- /dev/null +++ b/src/test/resources/projects/tmp/git/objects/59/dce50b38ffedd9a73b50278faab9b041d1bd62 @@ -0,0 +1,4 @@ +xYo6ޫWhF_%m1d?2@q[hD +$-HI,%q"t "yu;/3 ~{/}wT*&tͦH_O?}#h]!;#RdC#!z jΞn˷$Eo>|.z}GḱaJu8PJU"Ya/L;b-YqBT34kRJuHNDєٷ;"Wd-7{ΣyGxkYXe]|V"pm0`Oj %O宅dÖ`+Bt_Ǿ~XVdM&)*(5 = : +ZÒf ƒ% D#RY CLm&"@K+nN^0hoSQӻVA>.1 !5FȲ<Т/V2d])yqR߹xJ)sɨHCN>!]en<]/5Q7#n +~ yb|i o;Yւ9739{el灔;ϥm3?U&ڵάXVfAU<}I n@ivU3N/Tj#r`M!PlQ,6mA}J_7"&PƖ3-TRi ,3ZfTo9yl.+.z7KY\VC]>o^뽄0_>Z` p5 \ No newline at end of file diff --git a/src/test/resources/projects/tmp/git/objects/5a/99c301214c9ada535c348cb2b7f4f30284d4cc b/src/test/resources/projects/tmp/git/objects/5a/99c301214c9ada535c348cb2b7f4f30284d4cc new file mode 100644 index 00000000..59da09ef Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/5a/99c301214c9ada535c348cb2b7f4f30284d4cc differ diff --git a/src/test/resources/projects/tmp/git/objects/5a/a5242ea769c7569430fd907bdcbc572f4f7665 b/src/test/resources/projects/tmp/git/objects/5a/a5242ea769c7569430fd907bdcbc572f4f7665 new file mode 100644 index 00000000..1baef7ab Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/5a/a5242ea769c7569430fd907bdcbc572f4f7665 differ diff --git a/src/test/resources/projects/tmp/git/objects/5b/04c02e88cd7cdd8efefd1b17f02ca34c041959 b/src/test/resources/projects/tmp/git/objects/5b/04c02e88cd7cdd8efefd1b17f02ca34c041959 new file mode 100644 index 00000000..f785fb25 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/5b/04c02e88cd7cdd8efefd1b17f02ca34c041959 differ diff --git a/src/test/resources/projects/tmp/git/objects/5b/090665fff8df7954b22b4beb18a99f170f576b b/src/test/resources/projects/tmp/git/objects/5b/090665fff8df7954b22b4beb18a99f170f576b new file mode 100644 index 00000000..5df6adf4 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/5b/090665fff8df7954b22b4beb18a99f170f576b differ diff --git a/src/test/resources/projects/tmp/git/objects/5d/081b3e2509c34df5aa04d3049ce2d1f45c0039 b/src/test/resources/projects/tmp/git/objects/5d/081b3e2509c34df5aa04d3049ce2d1f45c0039 new file mode 100644 index 00000000..2898fc16 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/5d/081b3e2509c34df5aa04d3049ce2d1f45c0039 differ diff --git a/src/test/resources/projects/tmp/git/objects/60/8e99c011c5fb1bb65c5f8cdac873713dd9cb44 b/src/test/resources/projects/tmp/git/objects/60/8e99c011c5fb1bb65c5f8cdac873713dd9cb44 new file mode 100644 index 00000000..5aa972a1 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/60/8e99c011c5fb1bb65c5f8cdac873713dd9cb44 differ diff --git a/src/test/resources/projects/tmp/git/objects/62/fee2ccbbfde3f2a0b3c45ec0f4810899e0a909 b/src/test/resources/projects/tmp/git/objects/62/fee2ccbbfde3f2a0b3c45ec0f4810899e0a909 new file mode 100644 index 00000000..1f3ecfda Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/62/fee2ccbbfde3f2a0b3c45ec0f4810899e0a909 differ diff --git a/src/test/resources/projects/tmp/git/objects/63/5432508693f70b5c86b2fd99c3d47cdddf47e8 b/src/test/resources/projects/tmp/git/objects/63/5432508693f70b5c86b2fd99c3d47cdddf47e8 new file mode 100644 index 00000000..08310f59 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/63/5432508693f70b5c86b2fd99c3d47cdddf47e8 differ diff --git a/src/test/resources/projects/tmp/git/objects/65/4c098d3851d941610ff7b0c65e2b15d3bf6f7d b/src/test/resources/projects/tmp/git/objects/65/4c098d3851d941610ff7b0c65e2b15d3bf6f7d new file mode 100644 index 00000000..5e0895b9 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/65/4c098d3851d941610ff7b0c65e2b15d3bf6f7d differ diff --git a/src/test/resources/projects/tmp/git/objects/65/fa6b9d62e05721e2ef7a5d5d6e09065d6a27b9 b/src/test/resources/projects/tmp/git/objects/65/fa6b9d62e05721e2ef7a5d5d6e09065d6a27b9 new file mode 100644 index 00000000..7c987b2e Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/65/fa6b9d62e05721e2ef7a5d5d6e09065d6a27b9 differ diff --git a/src/test/resources/projects/tmp/git/objects/67/b74141ad29eb4676494c232a2d402478905915 b/src/test/resources/projects/tmp/git/objects/67/b74141ad29eb4676494c232a2d402478905915 new file mode 100644 index 00000000..5ce83661 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/67/b74141ad29eb4676494c232a2d402478905915 differ diff --git a/src/test/resources/projects/tmp/git/objects/68/40fa58604ecee5ad2a08fc04730bb35159640a b/src/test/resources/projects/tmp/git/objects/68/40fa58604ecee5ad2a08fc04730bb35159640a new file mode 100644 index 00000000..10991003 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/68/40fa58604ecee5ad2a08fc04730bb35159640a differ diff --git a/src/test/resources/projects/tmp/git/objects/68/8242a18f61f28db9f31338898bdd89d2ab6b0a b/src/test/resources/projects/tmp/git/objects/68/8242a18f61f28db9f31338898bdd89d2ab6b0a new file mode 100644 index 00000000..7c9082ab Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/68/8242a18f61f28db9f31338898bdd89d2ab6b0a differ diff --git a/src/test/resources/projects/tmp/git/objects/69/36086c2801660a55909bdc38cc2926b3e44318 b/src/test/resources/projects/tmp/git/objects/69/36086c2801660a55909bdc38cc2926b3e44318 new file mode 100644 index 00000000..dc507c18 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/69/36086c2801660a55909bdc38cc2926b3e44318 differ diff --git a/src/test/resources/projects/tmp/git/objects/69/5c2fdc3829a9e6acc43d220102b861997b69e9 b/src/test/resources/projects/tmp/git/objects/69/5c2fdc3829a9e6acc43d220102b861997b69e9 new file mode 100644 index 00000000..2a5e9873 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/69/5c2fdc3829a9e6acc43d220102b861997b69e9 differ diff --git a/src/test/resources/projects/tmp/git/objects/6b/49ef3e032baf487eb496da619849900e05a4f5 b/src/test/resources/projects/tmp/git/objects/6b/49ef3e032baf487eb496da619849900e05a4f5 new file mode 100644 index 00000000..48f36d7d Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/6b/49ef3e032baf487eb496da619849900e05a4f5 differ diff --git a/src/test/resources/projects/tmp/git/objects/6d/9542e0dc33a0feee4d4015963e20f99ab0ef6a b/src/test/resources/projects/tmp/git/objects/6d/9542e0dc33a0feee4d4015963e20f99ab0ef6a new file mode 100644 index 00000000..fb1949e1 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/6d/9542e0dc33a0feee4d4015963e20f99ab0ef6a differ diff --git a/src/test/resources/projects/tmp/git/objects/70/48cca600ee2068ed9636eee91dad375874293c b/src/test/resources/projects/tmp/git/objects/70/48cca600ee2068ed9636eee91dad375874293c new file mode 100644 index 00000000..5b21ea73 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/70/48cca600ee2068ed9636eee91dad375874293c differ diff --git a/src/test/resources/projects/tmp/git/objects/71/27a157f38952adf42ecf6d77fa87221ff48e06 b/src/test/resources/projects/tmp/git/objects/71/27a157f38952adf42ecf6d77fa87221ff48e06 new file mode 100644 index 00000000..317378f6 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/71/27a157f38952adf42ecf6d77fa87221ff48e06 differ diff --git a/src/test/resources/projects/tmp/git/objects/71/af8d00fbc4e977c05e0e9826c0d45c1b1da5a7 b/src/test/resources/projects/tmp/git/objects/71/af8d00fbc4e977c05e0e9826c0d45c1b1da5a7 new file mode 100644 index 00000000..48390888 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/71/af8d00fbc4e977c05e0e9826c0d45c1b1da5a7 differ diff --git a/src/test/resources/projects/tmp/git/objects/72/1ca1835023196f893b54de196de569625ff0ea b/src/test/resources/projects/tmp/git/objects/72/1ca1835023196f893b54de196de569625ff0ea new file mode 100644 index 00000000..77d246fd Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/72/1ca1835023196f893b54de196de569625ff0ea differ diff --git a/src/test/resources/projects/tmp/git/objects/72/f9c3796c120ae5775b3839544e845e17381578 b/src/test/resources/projects/tmp/git/objects/72/f9c3796c120ae5775b3839544e845e17381578 new file mode 100644 index 00000000..99adb8b2 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/72/f9c3796c120ae5775b3839544e845e17381578 differ diff --git a/src/test/resources/projects/tmp/git/objects/73/3865c10b0c4b2357437a8116c58c57d4730460 b/src/test/resources/projects/tmp/git/objects/73/3865c10b0c4b2357437a8116c58c57d4730460 new file mode 100644 index 00000000..2858f9b8 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/73/3865c10b0c4b2357437a8116c58c57d4730460 differ diff --git a/src/test/resources/projects/tmp/git/objects/74/9fbf3d85c7db1c8ea51866435d5b8dba317218 b/src/test/resources/projects/tmp/git/objects/74/9fbf3d85c7db1c8ea51866435d5b8dba317218 new file mode 100644 index 00000000..a82b6bb8 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/74/9fbf3d85c7db1c8ea51866435d5b8dba317218 differ diff --git a/src/test/resources/projects/tmp/git/objects/75/c32f6484c2869474190924df4dd3bec4134a96 b/src/test/resources/projects/tmp/git/objects/75/c32f6484c2869474190924df4dd3bec4134a96 new file mode 100644 index 00000000..b5cf608b Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/75/c32f6484c2869474190924df4dd3bec4134a96 differ diff --git a/src/test/resources/projects/tmp/git/objects/77/8d8e2c9ea14820f6fd8fe123ccf84c93f3bada b/src/test/resources/projects/tmp/git/objects/77/8d8e2c9ea14820f6fd8fe123ccf84c93f3bada new file mode 100644 index 00000000..86b3eef0 --- /dev/null +++ b/src/test/resources/projects/tmp/git/objects/77/8d8e2c9ea14820f6fd8fe123ccf84c93f3bada @@ -0,0 +1,2 @@ +xK +1D]$t :3QojQWyǾ1aWVs.a\l[ĖdbZe*[jz49>iM[d6Iѫ<.~d#o5K ~>A6Z߻Rq0*j&mOH> \ No newline at end of file diff --git a/src/test/resources/projects/tmp/git/objects/78/ff75c9d467bc21df73be00747548f987ea5738 b/src/test/resources/projects/tmp/git/objects/78/ff75c9d467bc21df73be00747548f987ea5738 new file mode 100644 index 00000000..33ca9ebf Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/78/ff75c9d467bc21df73be00747548f987ea5738 differ diff --git a/src/test/resources/projects/tmp/git/objects/7a/bffc74caa8761c6cb924e6294a7adfceb4ed7a b/src/test/resources/projects/tmp/git/objects/7a/bffc74caa8761c6cb924e6294a7adfceb4ed7a new file mode 100644 index 00000000..3c1428eb Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/7a/bffc74caa8761c6cb924e6294a7adfceb4ed7a differ diff --git a/src/test/resources/projects/tmp/git/objects/7a/c1649d4b941fdc03f877ab7d929a52018a1f75 b/src/test/resources/projects/tmp/git/objects/7a/c1649d4b941fdc03f877ab7d929a52018a1f75 new file mode 100644 index 00000000..246c676d --- /dev/null +++ b/src/test/resources/projects/tmp/git/objects/7a/c1649d4b941fdc03f877ab7d929a52018a1f75 @@ -0,0 +1 @@ +xAj0E)f_(hdk .rhB e䉡 x_1 ҇uU8 ުČ\X"B"qC`Z.Ƅ$TFd[r,SJ<:ˮp{5o49N繋 u7 {F \ No newline at end of file diff --git a/src/test/resources/projects/tmp/git/objects/7b/069f0d9a9e695980d5d6119162c21433f91619 b/src/test/resources/projects/tmp/git/objects/7b/069f0d9a9e695980d5d6119162c21433f91619 new file mode 100644 index 00000000..d8c7b72b Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/7b/069f0d9a9e695980d5d6119162c21433f91619 differ diff --git a/src/test/resources/projects/tmp/git/objects/7e/8e8c6fa3a7b2636d0994718aaba9e670c9d546 b/src/test/resources/projects/tmp/git/objects/7e/8e8c6fa3a7b2636d0994718aaba9e670c9d546 new file mode 100644 index 00000000..bf033f45 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/7e/8e8c6fa3a7b2636d0994718aaba9e670c9d546 differ diff --git a/src/test/resources/projects/tmp/git/objects/7e/eebe7b497706c09c37955274496227f1ffc67f b/src/test/resources/projects/tmp/git/objects/7e/eebe7b497706c09c37955274496227f1ffc67f new file mode 100644 index 00000000..26a231ff Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/7e/eebe7b497706c09c37955274496227f1ffc67f differ diff --git a/src/test/resources/projects/tmp/git/objects/83/1e2d55306d37b6d64d39abe2e5384c2341f787 b/src/test/resources/projects/tmp/git/objects/83/1e2d55306d37b6d64d39abe2e5384c2341f787 new file mode 100644 index 00000000..471c1355 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/83/1e2d55306d37b6d64d39abe2e5384c2341f787 differ diff --git a/src/test/resources/projects/tmp/git/objects/83/3b84acf1b3e49e5f8a1fa7a77e4cd9848f2852 b/src/test/resources/projects/tmp/git/objects/83/3b84acf1b3e49e5f8a1fa7a77e4cd9848f2852 new file mode 100644 index 00000000..a5da3aff Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/83/3b84acf1b3e49e5f8a1fa7a77e4cd9848f2852 differ diff --git a/src/test/resources/projects/tmp/git/objects/84/26abee6d3454eb54ef646dda09bf4fae08c321 b/src/test/resources/projects/tmp/git/objects/84/26abee6d3454eb54ef646dda09bf4fae08c321 new file mode 100644 index 00000000..937641f0 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/84/26abee6d3454eb54ef646dda09bf4fae08c321 differ diff --git a/src/test/resources/projects/tmp/git/objects/8a/c5515bd0a29bd78efc3cf3f7a9c5e927ce5e60 b/src/test/resources/projects/tmp/git/objects/8a/c5515bd0a29bd78efc3cf3f7a9c5e927ce5e60 new file mode 100644 index 00000000..2864cfd9 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/8a/c5515bd0a29bd78efc3cf3f7a9c5e927ce5e60 differ diff --git a/src/test/resources/projects/tmp/git/objects/8b/cc54388eb056928602c4d5e90d8aa66559b8cc b/src/test/resources/projects/tmp/git/objects/8b/cc54388eb056928602c4d5e90d8aa66559b8cc new file mode 100644 index 00000000..5b2a4278 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/8b/cc54388eb056928602c4d5e90d8aa66559b8cc differ diff --git a/src/test/resources/projects/tmp/git/objects/8e/4d2dcba74998a7e145a7e674b097b1fa230d7c b/src/test/resources/projects/tmp/git/objects/8e/4d2dcba74998a7e145a7e674b097b1fa230d7c new file mode 100644 index 00000000..101ad3c1 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/8e/4d2dcba74998a7e145a7e674b097b1fa230d7c differ diff --git a/src/test/resources/projects/tmp/git/objects/8f/b29ffc7bef3477067a4e865b81b9caf47e90b2 b/src/test/resources/projects/tmp/git/objects/8f/b29ffc7bef3477067a4e865b81b9caf47e90b2 new file mode 100644 index 00000000..03471cd9 --- /dev/null +++ b/src/test/resources/projects/tmp/git/objects/8f/b29ffc7bef3477067a4e865b81b9caf47e90b2 @@ -0,0 +1,2 @@ +xA +0E]$M  jJoo?rM6u=SO#9eG(2Sj+d4} @oT97po:׳0b O:9S.'"{J>2,4NR*QK6YF\*|KMycg.O/Z_i'Xw &=jӣO9`tV`[dΥmT \ No newline at end of file diff --git a/src/test/resources/projects/tmp/git/objects/b5/d1634b81813fba3b356ff23ce7f06798c89bdd b/src/test/resources/projects/tmp/git/objects/b5/d1634b81813fba3b356ff23ce7f06798c89bdd new file mode 100644 index 00000000..952dc680 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/b5/d1634b81813fba3b356ff23ce7f06798c89bdd differ diff --git a/src/test/resources/projects/tmp/git/objects/b8/00fa18aa31215ff3eee46a55724c0556ad054b b/src/test/resources/projects/tmp/git/objects/b8/00fa18aa31215ff3eee46a55724c0556ad054b new file mode 100644 index 00000000..f27c0625 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/b8/00fa18aa31215ff3eee46a55724c0556ad054b differ diff --git a/src/test/resources/projects/tmp/git/objects/bb/17d0d5383d4c0a9e8b0a0cdde9d93aeccd09c8 b/src/test/resources/projects/tmp/git/objects/bb/17d0d5383d4c0a9e8b0a0cdde9d93aeccd09c8 new file mode 100644 index 00000000..053069fe Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/bb/17d0d5383d4c0a9e8b0a0cdde9d93aeccd09c8 differ diff --git a/src/test/resources/projects/tmp/git/objects/bc/b89f67890069c033195cc11e9fe763d28deffd b/src/test/resources/projects/tmp/git/objects/bc/b89f67890069c033195cc11e9fe763d28deffd new file mode 100644 index 00000000..5afc74a5 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/bc/b89f67890069c033195cc11e9fe763d28deffd differ diff --git a/src/test/resources/projects/tmp/git/objects/c3/de752a4e5cffac3e3cac117647bced5f1a51c3 b/src/test/resources/projects/tmp/git/objects/c3/de752a4e5cffac3e3cac117647bced5f1a51c3 new file mode 100644 index 00000000..c0bdf1f6 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/c3/de752a4e5cffac3e3cac117647bced5f1a51c3 differ diff --git a/src/test/resources/projects/tmp/git/objects/c4/f020bb7e203e13ad0a21dc1d806cfb4d9f99f0 b/src/test/resources/projects/tmp/git/objects/c4/f020bb7e203e13ad0a21dc1d806cfb4d9f99f0 new file mode 100644 index 00000000..15efc1e7 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/c4/f020bb7e203e13ad0a21dc1d806cfb4d9f99f0 differ diff --git a/src/test/resources/projects/tmp/git/objects/c5/007a615807cdb57b5cc7530edd9d4c29f7f24d b/src/test/resources/projects/tmp/git/objects/c5/007a615807cdb57b5cc7530edd9d4c29f7f24d new file mode 100644 index 00000000..d9943a6e Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/c5/007a615807cdb57b5cc7530edd9d4c29f7f24d differ diff --git a/src/test/resources/projects/tmp/git/objects/ca/bb24b5e21ac27e89dc04e412d74e03aa76f380 b/src/test/resources/projects/tmp/git/objects/ca/bb24b5e21ac27e89dc04e412d74e03aa76f380 new file mode 100644 index 00000000..4125edd9 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/ca/bb24b5e21ac27e89dc04e412d74e03aa76f380 differ diff --git a/src/test/resources/projects/tmp/git/objects/cd/5bb1cb7e32ad4b5f4d8eb0aa04f7eddbb603ae b/src/test/resources/projects/tmp/git/objects/cd/5bb1cb7e32ad4b5f4d8eb0aa04f7eddbb603ae new file mode 100644 index 00000000..f1d0d64f Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/cd/5bb1cb7e32ad4b5f4d8eb0aa04f7eddbb603ae differ diff --git a/src/test/resources/projects/tmp/git/objects/d2/af663c095050933c10d57125fe6158fad4fe2c b/src/test/resources/projects/tmp/git/objects/d2/af663c095050933c10d57125fe6158fad4fe2c new file mode 100644 index 00000000..18161b20 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/d2/af663c095050933c10d57125fe6158fad4fe2c differ diff --git a/src/test/resources/projects/tmp/git/objects/d9/7c5378fda25bd0280c942dc304d218bf2a0816 b/src/test/resources/projects/tmp/git/objects/d9/7c5378fda25bd0280c942dc304d218bf2a0816 new file mode 100644 index 00000000..a1195dfb Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/d9/7c5378fda25bd0280c942dc304d218bf2a0816 differ diff --git a/src/test/resources/projects/tmp/git/objects/db/abd636abb1f110493884620b2f075987c54f70 b/src/test/resources/projects/tmp/git/objects/db/abd636abb1f110493884620b2f075987c54f70 new file mode 100644 index 00000000..53a27bd6 Binary files /dev/null and b/src/test/resources/projects/tmp/git/objects/db/abd636abb1f110493884620b2f075987c54f70 differ diff --git a/src/test/resources/projects/tmp/git/objects/dd/40ebe950c0a0cd5de542e3d0e7a0e1ac4e70aa b/src/test/resources/projects/tmp/git/objects/dd/40ebe950c0a0cd5de542e3d0e7a0e1ac4e70aa new file mode 100644 index 00000000..c9c097c4 --- /dev/null +++ b/src/test/resources/projects/tmp/git/objects/dd/40ebe950c0a0cd5de542e3d0e7a0e1ac4e70aa @@ -0,0 +1 @@ +xJ1F)$? Al'w,x}z/N + + 4.0.0 + spring-cloud-starter-build + pom + Spring Cloud Starter Build + Spring Cloud Starter Build + Dalston.BUILD-SNAPSHOT + + org.springframework.cloud + spring-cloud-build + 1.3.1.BUILD-SNAPSHOT + + + + + https://github.com/spring-cloud/spring-cloud-starters + scm:git:git://github.com/spring-cloud/spring-cloud-starters.git + scm:git:ssh://git@github.com/spring-cloud/spring-cloud-starters.git + HEAD + + + + starters + + + + spring-cloud-dependencies + spring-cloud-starter-parent + docs + + + + + + org.apache.maven.plugins + maven-enforcer-plugin + + + enforce-rules + + enforce + + + + + + commons-logging:*:* + + true + + + + true + + + + + + + + + + spring + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/libs-snapshot-local + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/libs-milestone-local + + false + + + + spring-releases + Spring Releases + https://repo.spring.io/release + + false + + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/libs-snapshot-local + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/libs-milestone-local + + false + + + + + + + diff --git a/src/test/resources/projects/tmp/spring-cloud-dependencies/pom.xml b/src/test/resources/projects/tmp/spring-cloud-dependencies/pom.xml new file mode 100644 index 00000000..a136f9eb --- /dev/null +++ b/src/test/resources/projects/tmp/spring-cloud-dependencies/pom.xml @@ -0,0 +1,185 @@ + + + 4.0.0 + + org.springframework.cloud + spring-cloud-dependencies-parent + 1.3.1.BUILD-SNAPSHOT + + + spring-cloud-dependencies + Dalston.BUILD-SNAPSHOT + spring-cloud-dependencies + Spring Cloud Dependencies + pom + + ${basedir}/../.. + 1.2.0.BUILD-SNAPSHOT + 1.3.0.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT + 1.2.0.BUILD-SNAPSHOT + 1.3.0.BUILD-SNAPSHOT + 1.3.0.BUILD-SNAPSHOT + 1.2.0.BUILD-SNAPSHOT + 1.2.0.BUILD-SNAPSHOT + 1.2.0.BUILD-SNAPSHOT + Chelsea.BUILD-SNAPSHOT + 1.1.2.BUILD-SNAPSHOT + 1.0.0.BUILD-SNAPSHOT + 1.1.0.BUILD-SNAPSHOT + + + + + + org.springframework.cloud + spring-cloud-commons-dependencies + ${spring-cloud-commons.version} + pom + import + + + org.springframework.cloud + spring-cloud-netflix-dependencies + ${spring-cloud-netflix.version} + pom + import + + + org.springframework.cloud + spring-cloud-stream-dependencies + ${spring-cloud-stream.version} + pom + import + + + org.springframework.cloud + spring-cloud-task-dependencies + ${spring-cloud-task.version} + pom + import + + + org.springframework.cloud + spring-cloud-config-dependencies + ${spring-cloud-config.version} + pom + import + + + org.springframework.cloud + spring-cloud-consul-dependencies + ${spring-cloud-consul.version} + pom + import + + + org.springframework.cloud + spring-cloud-sleuth-dependencies + ${spring-cloud-sleuth.version} + pom + import + + + org.springframework.cloud + spring-cloud-vault-dependencies + ${spring-cloud-vault.version} + pom + import + + + org.springframework.cloud + spring-cloud-zookeeper-dependencies + ${spring-cloud-zookeeper.version} + pom + import + + + org.springframework.cloud + spring-cloud-security-dependencies + ${spring-cloud-security.version} + pom + import + + + org.springframework.cloud + spring-cloud-cloudfoundry-dependencies + ${spring-cloud-cloudfoundry.version} + pom + import + + + org.springframework.cloud + spring-cloud-bus-dependencies + ${spring-cloud-bus.version} + pom + import + + + org.springframework.cloud + spring-cloud-contract-dependencies + ${spring-cloud-contract.version} + pom + import + + + org.springframework.cloud + spring-cloud-aws-dependencies + ${spring-cloud-aws.version} + pom + import + + + + + + spring + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/libs-snapshot-local + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/libs-milestone-local + + false + + + + spring-releases + Spring Releases + https://repo.spring.io/release + + false + + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/libs-snapshot-local + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/libs-milestone-local + + false + + + + + + diff --git a/src/test/resources/projects/tmp/spring-cloud-dependencies/src/main/resources/META-INF/spring.provides b/src/test/resources/projects/tmp/spring-cloud-dependencies/src/main/resources/META-INF/spring.provides new file mode 100644 index 00000000..3628be6e --- /dev/null +++ b/src/test/resources/projects/tmp/spring-cloud-dependencies/src/main/resources/META-INF/spring.provides @@ -0,0 +1 @@ +provides: spring-cloud-config-client \ No newline at end of file diff --git a/src/test/resources/projects/tmp/spring-cloud-starter-parent/pom.xml b/src/test/resources/projects/tmp/spring-cloud-starter-parent/pom.xml new file mode 100644 index 00000000..578e1504 --- /dev/null +++ b/src/test/resources/projects/tmp/spring-cloud-starter-parent/pom.xml @@ -0,0 +1,155 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 1.5.1.BUILD-SNAPSHOT + + org.springframework.cloud + spring-cloud-starter-parent + Dalston.BUILD-SNAPSHOT + spring-cloud-starter-parent + Spring Cloud Starter Parent + pom + https://projects.spring.io/spring-cloud + + Pivotal Software, Inc. + https://www.spring.io + + + ${basedir}/../.. + Dalston.BUILD-SNAPSHOT + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + https://github.com/spring-cloud + + spring-docs + scp://static.springframework.org/var/www/domains/springframework.org/static/htdocs/spring-cloud/docs/${project.artifactId}/${project.version} + + + + repo.spring.io + Spring Release Repository + https://repo.spring.io/libs-release-local + + + repo.spring.io + Spring Snapshot Repository + https://repo.spring.io/libs-snapshot-local + + + + + spring + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/libs-snapshot-local + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/libs-milestone-local + + false + + + + spring-releases + Spring Releases + https://repo.spring.io/release + + false + + + + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/libs-snapshot-local + + true + + + + spring-milestones + Spring Milestones + https://repo.spring.io/libs-milestone-local + + false + + + + + + milestone + + + repo.spring.io + Spring Milestone Repository + https://repo.spring.io/libs-milestone-local + + + + + bintray + + + bintray + Jcenter Repository + https://api.bintray.com/maven/spring/jars/org.springframework.cloud:${bintray.package} + + + + + central + + + + org.apache.maven.plugins + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + + + + + + sonatype-nexus-snapshots + Sonatype Nexus Snapshots + https://oss.sonatype.org/content/repositories/snapshots/ + + + sonatype-nexus-staging + Nexus Release Repository + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + diff --git a/src/test/resources/projects/tmp/spring-cloud-starter-parent/src/main/resources/META-INF/spring.provides b/src/test/resources/projects/tmp/spring-cloud-starter-parent/src/main/resources/META-INF/spring.provides new file mode 100644 index 00000000..3628be6e --- /dev/null +++ b/src/test/resources/projects/tmp/spring-cloud-starter-parent/src/main/resources/META-INF/spring.provides @@ -0,0 +1 @@ +provides: spring-cloud-config-client \ No newline at end of file