Moved release tool into dedicated sub-folder.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release;
|
||||
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(classes = TestConfig.class)
|
||||
public abstract class AbstractIntegrationTests {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.release.maven.Artifact;
|
||||
import org.springframework.data.release.model.ArtifactVersion;
|
||||
import org.springframework.data.release.model.Iteration;
|
||||
import org.springframework.data.release.model.ReleaseTrains;
|
||||
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class ArtifactUnitTests {
|
||||
|
||||
@Test
|
||||
public void testname() {
|
||||
|
||||
Artifact artifact = new Artifact(ReleaseTrains.DIJKSTRA.getModuleIteration(Iteration.M1, "JPA"));
|
||||
|
||||
assertThat(artifact.getArtifactId(), is("spring-data-jpa"));
|
||||
assertThat(artifact.getVersion(), is(ArtifactVersion.parse("1.6.0.M1")));
|
||||
assertThat(artifact.getNextDevelopmentVersion(), is(ArtifactVersion.parse("1.6.0.BUILD-SNAPSHOT")));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
public class TestConfig {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release.cli;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.release.AbstractIntegrationTests;
|
||||
import org.springframework.data.release.git.GitOperations;
|
||||
import org.springframework.data.release.model.ReleaseTrains;
|
||||
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class ReleaseCommandsIntegrationTests extends AbstractIntegrationTests {
|
||||
|
||||
@Autowired ReleaseCommands releaseCommands;
|
||||
@Autowired GitOperations git;
|
||||
|
||||
@Test
|
||||
public void predictsReleaseTrainCorrectly() throws Exception {
|
||||
|
||||
git.update(ReleaseTrains.DIJKSTRA);
|
||||
|
||||
assertThat(releaseCommands.predictTrainAndIteration(), is("Dijkstra"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release.git;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.release.model.Iteration;
|
||||
import org.springframework.data.release.model.IterationVersion;
|
||||
import org.springframework.data.release.model.SimpleIterationVersion;
|
||||
import org.springframework.data.release.model.Version;
|
||||
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class BranchUnitTests {
|
||||
|
||||
@Test
|
||||
public void testname() {
|
||||
|
||||
IterationVersion iterationVersion = new SimpleIterationVersion(new Version(1, 4), Iteration.RC1);
|
||||
assertThat(Branch.from(iterationVersion).toString(), is("master"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createsBugfixBranchForServiceRelease() {
|
||||
|
||||
IterationVersion iterationVersion = new SimpleIterationVersion(new Version(1, 4), Iteration.SR1);
|
||||
assertThat(Branch.from(iterationVersion).toString(), is("1.4.x"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release.git;
|
||||
|
||||
import static org.springframework.data.release.model.Projects.*;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.release.AbstractIntegrationTests;
|
||||
import org.springframework.data.release.model.ReleaseTrains;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class GitOperationsIntegrationTests extends AbstractIntegrationTests {
|
||||
|
||||
@Autowired GitOperations gitOperations;
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void testname() throws Exception {
|
||||
gitOperations.update(ReleaseTrains.CODD);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void showTags() throws Exception {
|
||||
|
||||
Tags tags = gitOperations.getTags(COMMONS);
|
||||
System.out.println(StringUtils.collectionToDelimitedString(tags.asList(), "\n"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void foo() throws Exception {
|
||||
|
||||
gitOperations.update(ReleaseTrains.EVANS);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release.git;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.release.model.ReleaseTrains;
|
||||
import org.springframework.data.release.model.Train;
|
||||
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class GitProjectUnitTests {
|
||||
|
||||
@Test
|
||||
public void testname() {
|
||||
|
||||
Train codd = ReleaseTrains.CODD;
|
||||
GitProject project = new GitProject(codd.getModule("Commons").getProject(), new GitServer());
|
||||
|
||||
assertThat(project.getProjectUri(), is("https://www.github.com/spring-projects/spring-data-commons"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Copyright 2015 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release.io;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.release.AbstractIntegrationTests;
|
||||
import org.springframework.data.release.model.Projects;
|
||||
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class CommonsExecOsCommandOperationsIntegegrationTests extends AbstractIntegrationTests {
|
||||
|
||||
@Autowired OsCommandOperations operations;
|
||||
|
||||
@Test
|
||||
public void testname() throws Exception {
|
||||
|
||||
// CommandResult result = operations
|
||||
// .executeCommand("export GIT_TRACE=1 && git clone https://github.com/spring-projects/spring-data-build").get();
|
||||
|
||||
// CommandResult result = operations.executeCommand("git pull", Projects.BUILD).get();
|
||||
|
||||
CommandResult result = operations.executeCommand("git remote -v", Projects.BUILD).get();
|
||||
// .get();
|
||||
|
||||
if (result.hasError()) {
|
||||
|
||||
System.out.println(result.getStatus());
|
||||
System.out.println(result.getOutput());
|
||||
System.out.println(result.getException().getMessage());
|
||||
|
||||
throw result.getException();
|
||||
} else {
|
||||
System.out.println(result.getOutput());
|
||||
}
|
||||
|
||||
assertThat(result.hasError(), is(false));
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release.jira;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.release.model.Iteration;
|
||||
import org.springframework.data.release.model.ModuleIteration;
|
||||
import org.springframework.data.release.model.ReleaseTrains;
|
||||
|
||||
/**
|
||||
* Unit tests for {@link JiraVersion}.
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class JiraVersionUnitTests {
|
||||
|
||||
@Test
|
||||
public void rendersJiraGaVersionCorrectly() {
|
||||
|
||||
assertIterationVersion(Iteration.M1, "1.8 M1 (Dijkstra)");
|
||||
assertIterationVersion(Iteration.RC1, "1.8 RC1 (Dijkstra)");
|
||||
assertIterationVersion(Iteration.GA, "1.8 GA (Dijkstra)");
|
||||
|
||||
assertIterationVersion(Iteration.SR1, "1.8.1 (Dijkstra SR1)");
|
||||
assertIterationVersion(Iteration.SR2, "1.8.2 (Dijkstra SR2)");
|
||||
assertIterationVersion(Iteration.SR3, "1.8.3 (Dijkstra SR3)");
|
||||
assertIterationVersion(Iteration.SR4, "1.8.4 (Dijkstra SR4)");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void usesCustomModuleIterationStartVersion() {
|
||||
|
||||
ModuleIteration module = ReleaseTrains.DIJKSTRA.getModuleIteration(Iteration.M1, "Elasticsearch");
|
||||
|
||||
JiraVersion version = new JiraVersion(module);
|
||||
assertThat(version.toString(), is("1.0 M2 (Dijkstra)"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void doesNotUseCustomIterationOnNonFirstiterations() {
|
||||
|
||||
ModuleIteration module = ReleaseTrains.DIJKSTRA.getModuleIteration(Iteration.RC1, "Elasticsearch");
|
||||
|
||||
JiraVersion version = new JiraVersion(module);
|
||||
assertThat(version.toString(), is("1.0 RC1 (Dijkstra)"));
|
||||
}
|
||||
|
||||
private void assertIterationVersion(Iteration iteration, String expected) {
|
||||
|
||||
ModuleIteration module = ReleaseTrains.DIJKSTRA.getModuleIteration(iteration, "Commons");
|
||||
|
||||
JiraVersion version = new JiraVersion(module);
|
||||
assertThat(version.toString(), is(expected));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release.maven;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.data.release.AbstractIntegrationTests;
|
||||
import org.springframework.data.release.io.Workspace;
|
||||
import org.springframework.data.release.model.ArtifactVersion;
|
||||
import org.xmlbeam.ProjectionFactory;
|
||||
import org.xmlbeam.io.XBFileIO;
|
||||
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class MavenIntegrationTests extends AbstractIntegrationTests {
|
||||
|
||||
@Autowired Workspace workspace;
|
||||
@Autowired ProjectionFactory projection;
|
||||
|
||||
public @Rule TemporaryFolder folder = new TemporaryFolder();
|
||||
|
||||
@Test
|
||||
public void modifiesParentPomCorrectly() throws IOException {
|
||||
|
||||
XBFileIO io = projection.io().file(new ClassPathResource("parent-pom.xml").getFile());
|
||||
|
||||
ParentPom pom = io.read(ParentPom.class);
|
||||
pom.setSharedResourcesVersion(ArtifactVersion.parse("1.2.0.RELEASE"));
|
||||
|
||||
// System.out.println(projection.asString(pom));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void updatesRepositoriesCorrectly() throws Exception {
|
||||
|
||||
XBFileIO io = projection.io().file(new ClassPathResource("sample-pom.xml").getFile());
|
||||
|
||||
Pom pom = io.read(Pom.class);
|
||||
|
||||
pom.setRepositoryId("spring-libs-snapshot", "spring-libs-release");
|
||||
pom.setRepositoryUrl("spring-libs-release", "https://repo.spring.io/libs-release");
|
||||
|
||||
// System.out.println(projection.asString(pom));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release.model;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.data.release.model.ArtifactVersion;
|
||||
import org.springframework.data.release.model.Iteration;
|
||||
import org.springframework.data.release.model.IterationVersion;
|
||||
import org.springframework.data.release.model.Version;
|
||||
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class ArtifactVersionUnitTests {
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void rejectsInvalidVersionSuffix() {
|
||||
ArtifactVersion.parse("1.4.5.GA");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void parsesReleaseVersionCorrectly() {
|
||||
|
||||
ArtifactVersion version = ArtifactVersion.parse("1.4.5.RELEASE");
|
||||
|
||||
assertThat(version.isReleaseVersion(), is(true));
|
||||
assertThat(version.getNextDevelopmentVersion(), is(ArtifactVersion.parse("1.4.6.BUILD-SNAPSHOT")));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createsMilestoneVersionCorrectly() {
|
||||
|
||||
ArtifactVersion version = ArtifactVersion.parse("1.4.5.M1");
|
||||
|
||||
assertThat(version.isReleaseVersion(), is(false));
|
||||
assertThat(version.isMilestoneVersion(), is(true));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createsReleaseVersionByDefault() {
|
||||
|
||||
ArtifactVersion version = new ArtifactVersion(new Version(1, 4, 5));
|
||||
|
||||
assertThat(version.isReleaseVersion(), is(true));
|
||||
assertThat(version.toString(), is("1.4.5.RELEASE"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createsMilestoneVersionFromIteration() {
|
||||
|
||||
IterationVersion oneFourMilestoneOne = new SimpleIterationVersion(new Version(1, 4), Iteration.M1);
|
||||
ArtifactVersion version = ArtifactVersion.from(oneFourMilestoneOne);
|
||||
|
||||
assertThat(version.isMilestoneVersion(), is(true));
|
||||
assertThat(version.toString(), is("1.4.0.M1"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createsReleaseVersionFromIteration() {
|
||||
|
||||
IterationVersion oneFourGA = new SimpleIterationVersion(new Version(1, 4), Iteration.GA);
|
||||
ArtifactVersion version = ArtifactVersion.from(oneFourGA);
|
||||
|
||||
assertThat(version.isReleaseVersion(), is(true));
|
||||
assertThat(version.toString(), is("1.4.0.RELEASE"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void createsServiceReleaseVersionFromIteration() {
|
||||
|
||||
IterationVersion oneFourServiceReleaseTwo = new SimpleIterationVersion(new Version(1, 4), Iteration.SR2);
|
||||
ArtifactVersion version = ArtifactVersion.from(oneFourServiceReleaseTwo);
|
||||
|
||||
assertThat(version.isReleaseVersion(), is(true));
|
||||
assertThat(version.toString(), is("1.4.2.RELEASE"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release.model;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class IterationUnitTests {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release.model;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.*;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public class ModuleIterationUnitTests {
|
||||
|
||||
@Test
|
||||
public void abbreviatesTrailingZerosForNonServiceReleases() {
|
||||
|
||||
TrainIteration iteration = new TrainIteration(ReleaseTrains.DIJKSTRA, Iteration.M1);
|
||||
ModuleIteration module = iteration.getModule(Projects.JPA);
|
||||
|
||||
assertThat(module.getVersionString(), is("1.6 M1"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void doesNotListIterationSuffixForServiceReleases() {
|
||||
|
||||
TrainIteration iteration = new TrainIteration(ReleaseTrains.DIJKSTRA, Iteration.SR1);
|
||||
ModuleIteration module = iteration.getModule(Projects.JPA);
|
||||
|
||||
assertThat(module.getVersionString(), is("1.6.1"));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright 2014 the original author or authors.
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
package org.springframework.data.release.model;
|
||||
|
||||
import lombok.Value;
|
||||
|
||||
@Value
|
||||
public class SimpleIterationVersion implements IterationVersion {
|
||||
|
||||
private final Version version;
|
||||
private final Iteration iteration;
|
||||
}
|
||||
745
release-tools/src/test/resources/parent-pom.xml
Normal file
745
release-tools/src/test/resources/parent-pom.xml
Normal file
@@ -0,0 +1,745 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
<!--
|
||||
|
||||
Global parent pom.xml for Spring Data modules to inherit from.
|
||||
|
||||
- Shared resources are pulled in from the spring-data-build-resources dependency (images, CSS, XSLTs for documentation generation)
|
||||
- Renders reference documentation from Asciidoctor file named index.adoc within src/main/asciidoc
|
||||
- In the "distribute" profile, an assembly is generated:
|
||||
- one to be uploaded to static.springsource.org (incl. javadoc (browsable), reference docs as described before)
|
||||
|
||||
Preconfigures the following:
|
||||
|
||||
- Logging dependencies: SLF4j + Commons Logging bridge and Logback as test dependency
|
||||
- Test dependencies: JUnit / Hamcrest / Mockito
|
||||
- Dependency versions for commonly used dependencies
|
||||
|
||||
-->
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>spring-data-parent</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.data.build</groupId>
|
||||
<artifactId>spring-data-build</artifactId>
|
||||
<version>1.6.2.BUILD-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<name>Spring Data Build - General parent module</name>
|
||||
<description>Global parent pom.xml to be used by Spring Data modules</description>
|
||||
<url>http://www.spring.io/spring-data</url>
|
||||
<inceptionYear>2011-2015</inceptionYear>
|
||||
|
||||
<organization>
|
||||
<name>Pivotal Software, Inc.</name>
|
||||
<url>http://www.spring.io</url>
|
||||
</organization>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<id>ogierke</id>
|
||||
<name>Oliver Gierke</name>
|
||||
<email>ogierke at pivotal.io</email>
|
||||
<organization>Pivotal Software, Inc.</organization>
|
||||
<organizationUrl>http://www.spring.io</organizationUrl>
|
||||
<roles>
|
||||
<role>Project lead</role>
|
||||
</roles>
|
||||
<timezone>+1</timezone>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<licenses>
|
||||
<license>
|
||||
<name>Apache License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0</url>
|
||||
<comments>
|
||||
Copyright 2008-2013 the original author or authors.
|
||||
|
||||
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.
|
||||
</comments>
|
||||
</license>
|
||||
</licenses>
|
||||
|
||||
<properties>
|
||||
|
||||
<bundlor.enabled>true</bundlor.enabled>
|
||||
<bundlor.failOnWarnings>true</bundlor.failOnWarnings>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.root>${basedir}</project.root>
|
||||
<source.level>1.6</source.level>
|
||||
<dist.id>${project.artifactId}</dist.id>
|
||||
|
||||
<apt>1.1.3</apt>
|
||||
<aspectj>1.8.5</aspectj>
|
||||
<cdi>1.0</cdi>
|
||||
<hamcrest>1.3</hamcrest>
|
||||
<jackson>2.5.1</jackson>
|
||||
<jodatime>2.7</jodatime>
|
||||
<junit>4.12</junit>
|
||||
<logback>1.1.2</logback>
|
||||
<mockito>1.10.19</mockito>
|
||||
<querydsl>3.6.3</querydsl>
|
||||
<slf4j>1.7.10</slf4j>
|
||||
<spring>4.0.9.RELEASE</spring>
|
||||
<threetenbp>1.2</threetenbp>
|
||||
<webbeans>1.2.7</webbeans>
|
||||
|
||||
<releasetrain>Fowler-BUILD-SNAPSHOT</releasetrain>
|
||||
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
|
||||
<profile>
|
||||
|
||||
<!-- Profile to be run on the CI server, JARs JavaDocs -->
|
||||
|
||||
<id>ci</id>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>package-javadoc</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
|
||||
<!--
|
||||
Profile to be activated when building the distribution atrifacts.
|
||||
|
||||
Generates reference documentation, aggregates JavaDoc etc. Has to be combined with
|
||||
profiles "release" or "milestone" to deploy artifacts into the appropriate places.
|
||||
-->
|
||||
|
||||
<id>distribute</id>
|
||||
|
||||
<properties>
|
||||
<shared.resources>${project.build.directory}/shared-resources</shared.resources>
|
||||
<maven.install.skip>true</maven.install.skip>
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data.build</groupId>
|
||||
<artifactId>spring-data-build-resources</artifactId>
|
||||
<version>1.6.2.BUILD-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<type>zip</type>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
<plugins>
|
||||
|
||||
<!--
|
||||
Unpacks the content of spring-data-build-resources into the shared resources folder.
|
||||
-->
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>unpack-shared-resources</id>
|
||||
<goals>
|
||||
<goal>unpack-dependencies</goal>
|
||||
</goals>
|
||||
<phase>generate-resources</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<includeGroupIds>${project.groupId}</includeGroupIds>
|
||||
<includeArtifacIds>spring-data-build-resources</includeArtifacIds>
|
||||
<includeTypes>zip</includeTypes>
|
||||
<excludeTransitive>true</excludeTransitive>
|
||||
<outputDirectory>${shared.resources}</outputDirectory>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!--
|
||||
Configures JavaDoc generation.
|
||||
-->
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>aggregate-javadoc</id>
|
||||
<goals>
|
||||
<goal>aggregate</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!--
|
||||
Copies all namespaces schemas to target/schemas flatten the directory structure.
|
||||
Depended on by the site.xml assembly descriptor.
|
||||
-->
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.7</version>
|
||||
<executions>
|
||||
|
||||
<execution>
|
||||
<id>copy-documentation-resources</id>
|
||||
<phase>generate-resources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<copy todir="${project.root}/target/site/reference/html">
|
||||
<fileset dir="${shared.resources}/asciidoc" erroronmissingdir="false">
|
||||
<include name="**/*.css"/>
|
||||
</fileset>
|
||||
<flattenmapper/>
|
||||
</copy>
|
||||
<copy todir="${project.root}/target/site/reference/html/images">
|
||||
<fileset dir="${basedir}/src/main/asciidoc" erroronmissingdir="false">
|
||||
<include name="**/*.png"/>
|
||||
<include name="**/*.gif"/>
|
||||
<include name="**/*.jpg"/>
|
||||
</fileset>
|
||||
<flattenmapper/>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>collect-schema-files</id>
|
||||
<phase>process-resources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<copy todir="${project.build.directory}/schemas">
|
||||
<fileset dir="${basedir}" erroronmissingdir="false">
|
||||
<include name="**/src/main/resources/**/config/spring-*.xsd"/>
|
||||
</fileset>
|
||||
<flattenmapper/>
|
||||
</copy>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>rename-reference-docs</id>
|
||||
<phase>process-resources</phase>
|
||||
<configuration>
|
||||
<target>
|
||||
<copy failonerror="false" file="${project.build.directory}/generated-docs/index.pdf" tofile="${project.root}/target/site/reference/pdf/${dist.id}-reference.pdf"/>
|
||||
<copy failonerror="false" file="${project.build.directory}/generated-docs/index.epub" tofile="${project.root}/target/site/reference/epub/${dist.id}-reference.epub"/>
|
||||
</target>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
|
||||
</executions>
|
||||
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
|
||||
<!--
|
||||
Asciidoctor
|
||||
-->
|
||||
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>1.5.2</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctorj-pdf</artifactId>
|
||||
<version>1.5.0-alpha.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctorj-epub3</artifactId>
|
||||
<version>1.5.0-alpha.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<executions>
|
||||
|
||||
<execution>
|
||||
<id>html</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>html5</backend>
|
||||
<outputDirectory>${project.root}/target/site/reference/html</outputDirectory>
|
||||
<sectids>false</sectids>
|
||||
<sourceHighlighter>prettify</sourceHighlighter>
|
||||
<attributes>
|
||||
<linkcss>true</linkcss>
|
||||
<icons>font</icons>
|
||||
<sectanchors>true</sectanchors>
|
||||
<stylesheet>spring.css</stylesheet>
|
||||
</attributes>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>epub</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>epub3</backend>
|
||||
<sourceHighlighter>coderay</sourceHighlighter>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<execution>
|
||||
<id>pdf</id>
|
||||
<phase>generate-resources</phase>
|
||||
<goals>
|
||||
<goal>process-asciidoc</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<backend>pdf</backend>
|
||||
<sourceHighlighter>coderay</sourceHighlighter>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
</executions>
|
||||
|
||||
<configuration>
|
||||
<sourceDirectory>${project.root}/src/main/asciidoc</sourceDirectory>
|
||||
<sourceDocumentName>index.adoc</sourceDocumentName>
|
||||
<doctype>book</doctype>
|
||||
<attributes>
|
||||
<version>${project.version}</version>
|
||||
<projectName>${project.name}</projectName>
|
||||
<projectVersion>${project.version}</projectVersion>
|
||||
<aspectjVersion>${aspectj}</aspectjVersion>
|
||||
<querydslVersion>${querydsl}</querydslVersion>
|
||||
<springVersion>${spring}</springVersion>
|
||||
<releasetrainVersion>${releasetrain}</releasetrainVersion>
|
||||
<allow-uri-read>true</allow-uri-read>
|
||||
<toclevels>3</toclevels>
|
||||
<numbered>true</numbered>
|
||||
</attributes>
|
||||
</configuration>
|
||||
|
||||
</plugin>
|
||||
|
||||
<!--
|
||||
Creates two zip files for download as well as API and reference documentation distribution.
|
||||
-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-assembly-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>static</id>
|
||||
<goals>
|
||||
<goal>single</goal>
|
||||
</goals>
|
||||
<phase>package</phase>
|
||||
<configuration>
|
||||
<descriptors>
|
||||
<descriptor>${shared.resources}/assemblies/static-resources.xml</descriptor>
|
||||
</descriptors>
|
||||
<finalName>static-resources</finalName>
|
||||
<appendAssemblyId>false</appendAssemblyId>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>wagon-maven-plugin</artifactId>
|
||||
<version>1.0-beta-5</version>
|
||||
<configuration>
|
||||
<fromDir>${project.build.directory}</fromDir>
|
||||
</configuration>
|
||||
<executions>
|
||||
|
||||
<!-- Upload namespace XSDs -->
|
||||
|
||||
<execution>
|
||||
<id>upload-schema</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>upload</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<fromDir>${project.root}/target/schemas</fromDir>
|
||||
<includes>*.xsd,.autoschemaln</includes>
|
||||
<serverId>static-dot-s2</serverId>
|
||||
<url>scp://static.springsource.org</url>
|
||||
<toDir>/var/www/domains/springsource.org/www/htdocs/autorepo/schema/${dist.id}/${project.version}</toDir>
|
||||
<optimize>true</optimize>
|
||||
</configuration>
|
||||
</execution>
|
||||
|
||||
<!-- Distribute static resources -->
|
||||
|
||||
<execution>
|
||||
<id>upload-static-resources</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>upload</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<fromDir>${project.build.directory}/static-resources</fromDir>
|
||||
<includes>**</includes>
|
||||
<serverId>static-dot-s2</serverId>
|
||||
<url>scp://static.springsource.org</url>
|
||||
<toDir>/var/www/domains/springsource.org/www/htdocs/autorepo/docs/${dist.id}/${project.version}</toDir>
|
||||
<optimize>true</optimize>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
|
||||
<id>spring41</id>
|
||||
|
||||
<properties>
|
||||
<spring>4.1.6.RELEASE</spring>
|
||||
</properties>
|
||||
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
|
||||
<id>spring41-next</id>
|
||||
|
||||
<properties>
|
||||
<spring>4.1.7.BUILD-SNAPSHOT</spring>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-libs-snapshot</id>
|
||||
<url>http://repo.spring.io/libs-snapshot</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
|
||||
<id>spring42-next</id>
|
||||
|
||||
<properties>
|
||||
<spring>4.2.0.BUILD-SNAPSHOT</spring>
|
||||
</properties>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-libs-snapshot</id>
|
||||
<url>http://repo.spring.io/libs-snapshot</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>querydsl-next</id>
|
||||
<properties>
|
||||
<querydsl>3.6.2.BUILD-SNAPSHOT</querydsl>
|
||||
</properties>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>oss-nexus-snapshots</id>
|
||||
<url>http://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
|
||||
</profiles>
|
||||
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-framework-bom</artifactId>
|
||||
<version>${spring}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- Test -->
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-library</artifactId>
|
||||
<version>${hamcrest}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.hamcrest</groupId>
|
||||
<artifactId>hamcrest-core</artifactId>
|
||||
<version>${hamcrest}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>${junit}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-core</artifactId>
|
||||
<version>${mockito}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Logging -->
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
<version>${slf4j}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>jcl-over-slf4j</artifactId>
|
||||
<version>${slf4j}</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>${logback}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
<extensions>
|
||||
<extension>
|
||||
<groupId>org.apache.maven.wagon</groupId>
|
||||
<artifactId>wagon-ssh</artifactId>
|
||||
<version>2.5</version>
|
||||
</extension>
|
||||
</extensions>
|
||||
|
||||
<!--
|
||||
Default versioned declarations of managed plugins
|
||||
to be overridden when the distribute profile is active.
|
||||
If this section was missing, Maven would complain about
|
||||
missing version numbers for executions without the
|
||||
profile active.
|
||||
-->
|
||||
|
||||
<pluginManagement>
|
||||
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>wagon-maven-plugin</artifactId>
|
||||
<version>1.0-beta-5</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.asciidoctor</groupId>
|
||||
<artifactId>asciidoctor-maven-plugin</artifactId>
|
||||
<version>0.1.4</version>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
|
||||
</pluginManagement>
|
||||
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.8</version>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.1</version>
|
||||
<configuration>
|
||||
<source>${source.level}</source>
|
||||
<target>${source.level}</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.17</version>
|
||||
<configuration>
|
||||
<useFile>false</useFile>
|
||||
<includes>
|
||||
<include>**/*Tests.java</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
<useDefaultManifestFile>true</useDefaultManifestFile>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<artifactId>maven-source-plugin</artifactId>
|
||||
<version>2.2.1</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>attach-sources</id>
|
||||
<goals>
|
||||
<goal>jar</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>com.springsource.bundlor</groupId>
|
||||
<artifactId>com.springsource.bundlor.maven</artifactId>
|
||||
<version>1.0.0.RELEASE</version>
|
||||
<configuration>
|
||||
<enabled>${bundlor.enabled}</enabled>
|
||||
<failOnWarnings>${bundlor.failOnWarnings}</failOnWarnings>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>bundlor</id>
|
||||
<goals>
|
||||
<goal>bundlor</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<configuration>
|
||||
<breakiterator>true</breakiterator>
|
||||
<header>${project.name}</header>
|
||||
<source>${source.level}</source>
|
||||
<quiet>true</quiet>
|
||||
<javadocDirectory>${shared.resources}/javadoc</javadocDirectory>
|
||||
<overview>${shared.resources}/javadoc/overview.html</overview>
|
||||
<stylesheetfile>${shared.resources}/javadoc/spring-javadoc.css</stylesheetfile>
|
||||
<!-- copies doc-files subdirectory which contains image resources -->
|
||||
<docfilessubdirs>true</docfilessubdirs>
|
||||
<additionalparam>-Xdoclint:none</additionalparam>
|
||||
<links>
|
||||
<link>http://docs.spring.io/spring/docs/3.2.x/javadoc-api/</link>
|
||||
<link>http://docs.spring.io/spring-data/data-commons/docs/current/api/</link>
|
||||
<link>http://docs.oracle.com/javase/6/docs/api</link>
|
||||
</links>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-deploy-plugin</artifactId>
|
||||
<version>2.8.1</version>
|
||||
<configuration>
|
||||
<skip>true</skip>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-libs-release</id>
|
||||
<url>https://repo.spring.io/libs-release</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<pluginRepositories>
|
||||
<pluginRepository>
|
||||
<id>spring-plugins-release</id>
|
||||
<url>https://repo.spring.io/plugins-release</url>
|
||||
</pluginRepository>
|
||||
</pluginRepositories>
|
||||
|
||||
</project>
|
||||
112
release-tools/src/test/resources/sample-pom.xml
Normal file
112
release-tools/src/test/resources/sample-pom.xml
Normal file
@@ -0,0 +1,112 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.springframework.data.build</groupId>
|
||||
<artifactId>spring-data-release-cli</artifactId>
|
||||
<version>1.0.0.BUILD-SNAPSHOT</version>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.0.0.RC4</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<jar.mainclass>org.springframework.shell.Bootstrap</jar.mainclass>
|
||||
</properties>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>profile</id>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-libs-snapshot</id>
|
||||
<url>http://repo.spring.io/libs-snapshot</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-logging</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.shell</groupId>
|
||||
<artifactId>spring-shell</artifactId>
|
||||
<version>1.1.0.BUILD-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.xmlbeam</groupId>
|
||||
<artifactId>xmlprojector</artifactId>
|
||||
<version>1.1.0</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.12.4</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<configuration>
|
||||
<source>1.7</source>
|
||||
<target>1.7</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Shell packaging -->
|
||||
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>appassembler-maven-plugin</artifactId>
|
||||
<version>1.7</version>
|
||||
<configuration>
|
||||
<programs>
|
||||
<program>
|
||||
<mainClass>org.springframework.shell.Bootstrap</mainClass>
|
||||
<id>spring-data-release-shell</id>
|
||||
</program>
|
||||
</programs>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>spring-libs-snapshot</id>
|
||||
<url>http://repo.spring.io/libs-snapshot</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
||||
Reference in New Issue
Block a user