Add "integration" profile in Maven build
By default it is on, but you can switch it off (`-P '!integration'`) to ignore integration tests and get a faster build. .travis.yml uses this feature so that it doesn't keep failing on a timeout.
This commit is contained in:
parent
dac470a8fc
commit
8cb0211dce
17
.travis.yml
17
.travis.yml
|
@ -1,18 +1,5 @@
|
|||
language: java
|
||||
services: mongodb
|
||||
|
||||
install: mvn install -U -DskipTests=true -Pspring-snapshot
|
||||
before_script:
|
||||
- "gem install travis-artifacts"
|
||||
- "mvn -version"
|
||||
script: mvn install -nsu -Dmaven.test.redirectTestOutputToFile=true
|
||||
|
||||
after_failure:
|
||||
- "for f in `find . -name build.log`; do travis-artifacts upload --path $f; done"
|
||||
|
||||
env:
|
||||
global:
|
||||
- "ARTIFACTS_AWS_REGION=us-east-1"
|
||||
- "ARTIFACTS_S3_BUCKET=temp.springsource.com/spring-boot"
|
||||
- secure: "JCQ1uz/rfrtMiUAvxeMznVB2wTX/f7lrCBa6oOsskDPt1dMzxD4aEuOfq3QlROLPDhYyu3dnWh1+ABla3Dx4+dCVA9ASgFCq5ivO5Vkxr4c6g8tb7hp14EitGEnWfEpdn64K6mZ7e7a/yjaXU3Ry4AisvPSk7wCcbHisBbj1LzE="
|
||||
- secure: "Dcya9JSXSa9qXDBXUihYxfCBL8VKCoIj5SQARMshYGLrs1zN2C4EcO4lcMkePTHWrGjpSqNdgnChUeg9YphWqODCcy2XhaMlSxwBYBDTye3hLGwKNdMKnrl/4yE+GoBg6Zaj9bB46Ua/GwLgZpOgM/b/VuCqnp6JC+hYOZKBhdg="
|
||||
install: mvn install -U -DskipTests=true -P spring-snapshot
|
||||
script: mvn install -nsu -P '!integration'
|
||||
|
|
8
pom.xml
8
pom.xml
|
@ -37,6 +37,14 @@
|
|||
<module>spring-boot-actuator</module>
|
||||
<module>spring-boot-starters</module>
|
||||
<module>spring-boot-cli</module>
|
||||
</modules>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>integration</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<modules>
|
||||
<module>spring-boot-integration-tests</module>
|
||||
</modules>
|
||||
</profile>
|
||||
|
|
|
@ -13,7 +13,19 @@
|
|||
<properties>
|
||||
<main.basedir>${basedir}/..</main.basedir>
|
||||
<start-class>org.springframework.boot.cli.SpringCli</start-class>
|
||||
<spring.profiles.active>default</spring.profiles.active>
|
||||
</properties>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>integration</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<properties>
|
||||
<spring.profiles.active>integration</spring.profiles.active>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
@ -152,9 +164,12 @@
|
|||
<additionalClasspathElements>
|
||||
<additionalClasspathElement>${project.build.directory}/generated-resources</additionalClasspathElement>
|
||||
</additionalClasspathElements>
|
||||
<systemPropertyVariables>
|
||||
<spring.profiles.active>${spring.profiles.active}</spring.profiles.active>
|
||||
</systemPropertyVariables>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!-- Build an executable JAR manually since we can't easily depend on
|
||||
<!-- Build an executable JAR manually since we can't easily depend on
|
||||
a maven plugin that is part of the reactor -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
@ -263,7 +278,7 @@
|
|||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings
|
||||
only. It has no influence on the Maven build itself. -->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
|
|
|
@ -12,6 +12,39 @@
|
|||
<properties>
|
||||
<main.basedir>${basedir}/../..</main.basedir>
|
||||
</properties>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>integration</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-invoker-plugin</artifactId>
|
||||
<configuration>
|
||||
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
|
||||
<settingsFile>src/it/settings.xml</settingsFile>
|
||||
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
|
||||
<postBuildHookScript>verify</postBuildHookScript>
|
||||
<addTestClassPath>true</addTestClassPath>
|
||||
<skipInvocation>${skipTests}</skipInvocation>
|
||||
<streamLogs>true</streamLogs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>integration-test</id>
|
||||
<goals>
|
||||
<goal>install</goal>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
|
@ -24,29 +57,4 @@
|
|||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-invoker-plugin</artifactId>
|
||||
<configuration>
|
||||
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
|
||||
<settingsFile>src/it/settings.xml</settingsFile>
|
||||
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
|
||||
<postBuildHookScript>verify</postBuildHookScript>
|
||||
<addTestClassPath>true</addTestClassPath>
|
||||
<skipInvocation>${skipTests}</skipInvocation>
|
||||
<streamLogs>true</streamLogs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>integration-test</id>
|
||||
<goals>
|
||||
<goal>install</goal>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
|
@ -12,6 +12,39 @@
|
|||
<properties>
|
||||
<main.basedir>${basedir}/../..</main.basedir>
|
||||
</properties>
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>integration</id>
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
</activation>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-invoker-plugin</artifactId>
|
||||
<configuration>
|
||||
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
|
||||
<settingsFile>src/it/settings.xml</settingsFile>
|
||||
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
|
||||
<postBuildHookScript>verify</postBuildHookScript>
|
||||
<addTestClassPath>true</addTestClassPath>
|
||||
<skipInvocation>${skipTests}</skipInvocation>
|
||||
<streamLogs>true</streamLogs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>integration-test</id>
|
||||
<goals>
|
||||
<goal>install</goal>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
<dependencies>
|
||||
<!-- Compile -->
|
||||
<dependency>
|
||||
|
@ -102,27 +135,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-invoker-plugin</artifactId>
|
||||
<configuration>
|
||||
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
|
||||
<settingsFile>src/it/settings.xml</settingsFile>
|
||||
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
|
||||
<postBuildHookScript>verify</postBuildHookScript>
|
||||
<addTestClassPath>true</addTestClassPath>
|
||||
<skipInvocation>${skipTests}</skipInvocation>
|
||||
<streamLogs>true</streamLogs>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>integration-test</id>
|
||||
<goals>
|
||||
<goal>install</goal>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue