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
|
language: java
|
||||||
services: mongodb
|
services: mongodb
|
||||||
|
|
||||||
install: mvn install -U -DskipTests=true -Pspring-snapshot
|
install: mvn install -U -DskipTests=true -P spring-snapshot
|
||||||
before_script:
|
script: mvn install -nsu -P '!integration'
|
||||||
- "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="
|
|
||||||
|
|
|
||||||
8
pom.xml
8
pom.xml
|
|
@ -37,6 +37,14 @@
|
||||||
<module>spring-boot-actuator</module>
|
<module>spring-boot-actuator</module>
|
||||||
<module>spring-boot-starters</module>
|
<module>spring-boot-starters</module>
|
||||||
<module>spring-boot-cli</module>
|
<module>spring-boot-cli</module>
|
||||||
|
</modules>
|
||||||
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>integration</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<modules>
|
||||||
<module>spring-boot-integration-tests</module>
|
<module>spring-boot-integration-tests</module>
|
||||||
</modules>
|
</modules>
|
||||||
</profile>
|
</profile>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,19 @@
|
||||||
<properties>
|
<properties>
|
||||||
<main.basedir>${basedir}/..</main.basedir>
|
<main.basedir>${basedir}/..</main.basedir>
|
||||||
<start-class>org.springframework.boot.cli.SpringCli</start-class>
|
<start-class>org.springframework.boot.cli.SpringCli</start-class>
|
||||||
|
<spring.profiles.active>default</spring.profiles.active>
|
||||||
</properties>
|
</properties>
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>integration</id>
|
||||||
|
<activation>
|
||||||
|
<activeByDefault>true</activeByDefault>
|
||||||
|
</activation>
|
||||||
|
<properties>
|
||||||
|
<spring.profiles.active>integration</spring.profiles.active>
|
||||||
|
</properties>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
@ -152,9 +164,12 @@
|
||||||
<additionalClasspathElements>
|
<additionalClasspathElements>
|
||||||
<additionalClasspathElement>${project.build.directory}/generated-resources</additionalClasspathElement>
|
<additionalClasspathElement>${project.build.directory}/generated-resources</additionalClasspathElement>
|
||||||
</additionalClasspathElements>
|
</additionalClasspathElements>
|
||||||
|
<systemPropertyVariables>
|
||||||
|
<spring.profiles.active>${spring.profiles.active}</spring.profiles.active>
|
||||||
|
</systemPropertyVariables>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</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 -->
|
a maven plugin that is part of the reactor -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
|
@ -263,7 +278,7 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
<pluginManagement>
|
<pluginManagement>
|
||||||
<plugins>
|
<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. -->
|
only. It has no influence on the Maven build itself. -->
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.eclipse.m2e</groupId>
|
<groupId>org.eclipse.m2e</groupId>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,39 @@
|
||||||
<properties>
|
<properties>
|
||||||
<main.basedir>${basedir}/../..</main.basedir>
|
<main.basedir>${basedir}/../..</main.basedir>
|
||||||
</properties>
|
</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>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.slf4j</groupId>
|
<groupId>org.slf4j</groupId>
|
||||||
|
|
@ -24,29 +57,4 @@
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</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>
|
</project>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,39 @@
|
||||||
<properties>
|
<properties>
|
||||||
<main.basedir>${basedir}/../..</main.basedir>
|
<main.basedir>${basedir}/../..</main.basedir>
|
||||||
</properties>
|
</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>
|
<dependencies>
|
||||||
<!-- Compile -->
|
<!-- Compile -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
@ -102,27 +135,6 @@
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue