Skip to content

Commit

Permalink
Rename samples to smoke tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhave committed Jun 25, 2019
1 parent 0b720b9 commit d5c0009
Show file tree
Hide file tree
Showing 743 changed files with 1,440 additions and 2,134 deletions.
10 changes: 5 additions & 5 deletions CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ find the process a little slower than the standard build.

[TIP]
====
If you want to run a build without the samples and integration tests, building the
If you want to run a build without the smoke tests and integration tests, building the
`spring-boot-project` module is enough. You can cd there and run the same command, or you
can run this from the top-level directory:
Expand Down Expand Up @@ -196,7 +196,7 @@ changes just won't be automatically formatted.

With the requisite eclipse plugins installed you can select
`import existing maven projects` from the `file` menu to import the code. You will
need to import the root `spring-boot` pom and the `spring-boot-samples` pom separately.
need to import the root `spring-boot` pom and the `spring-boot-smoke-tests` pom separately.



Expand Down Expand Up @@ -241,11 +241,11 @@ Maven is well supported by most Java IDEs. Refer to your vendor documentation.


== Integration Tests
The sample applications are used as integration tests during the build (when you
`./mvnw install`). Due to the fact that they make use of the `spring-boot-maven-plugin`
The smoke tests run as part of the build when you `./mvnw install`.
Due to the fact that they make use of the `spring-boot-maven-plugin`
they cannot be called directly, and so instead are launched via the
`maven-invoker-plugin`. If you encounter build failures running the integration tests,
check the `build.log` file in the appropriate sample directory.
check the `build.log` file in the appropriate smoke test directory.


== Cloning the git repository on Windows
Expand Down
3 changes: 0 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,6 @@ Groovy samples for use with the command line application are available in
link:spring-boot-project/spring-boot-cli/samples[spring-boot-cli/samples]. To run the CLI samples type
`spring run <sample>.groovy` from samples directory.

Java samples are available in link:spring-boot-samples[spring-boot-samples] and should
be built with maven and run by invoking `java -jar target/<sample>.jar`.



== Guides
Expand Down
2 changes: 1 addition & 1 deletion ci/scripts/build-samples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ source $(dirname $0)/common.sh
repository=$(pwd)/distribution-repository

pushd git-repo > /dev/null
run_maven -f spring-boot-samples/pom.xml clean install -U -Dfull -Drepository=file://${repository}
run_maven -f spring-boot-smoke-tests/pom.xml clean install -U -Dfull -Drepository=file://${repository}
popd > /dev/null
2 changes: 1 addition & 1 deletion ci/scripts/stage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ git commit -m"Release v$stageVersion" > /dev/null
git tag -a "v$stageVersion" -m"Release v$stageVersion" > /dev/null

run_maven -f spring-boot-project/pom.xml clean deploy -U -Dfull -DaltDeploymentRepository=distribution::default::file://${repository}
run_maven -f spring-boot-samples/pom.xml clean install -U -Dfull -Drepository=file://${repository}
run_maven -f spring-boot-smoke-tests/pom.xml clean install -U -Dfull -Drepository=file://${repository}
run_maven -f spring-boot-tests/spring-boot-integration-tests/pom.xml clean install -U -Dfull -Drepository=file://${repository}
run_maven -f spring-boot-tests/spring-boot-deployment-tests/pom.xml clean install -U -Dfull -Drepository=file://${repository}

Expand Down
4 changes: 2 additions & 2 deletions eclipse/spring-boot-project.setup
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@
pattern="spring-boot-starter(s|-.*)"/>
</workingSet>
<workingSet
name="spring-boot-samples">
name="spring-boot-smoke-tests">
<predicate
xsi:type="predicates:NamePredicate"
pattern="spring-boot-sample(s|-.*)"/>
pattern="spring-boot-smoke-test(s|-.*)"/>
</workingSet>
<workingSet
name="spring-boot-tests">
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@
</build>
<modules>
<module>spring-boot-project</module>
<!-- Samples are built via the invoker plugin -->
<module>spring-boot-samples-invoker</module>
<!-- Smoke tests are built via the invoker plugin -->
<module>spring-boot-smoke-tests-invoker</module>
<module>spring-boot-tests</module>
</modules>
</profile>
Expand All @@ -121,7 +121,7 @@
</activation>
<modules>
<module>spring-boot-project</module>
<module>spring-boot-samples</module>
<module>spring-boot-smoke-tests</module>
<module>spring-boot-tests</module>
</modules>
</profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ editor for this example.
[[getting-started-first-application-dependencies]]
=== Adding Classpath Dependencies
Spring Boot provides a number of "`Starters`" that let you add jars to your classpath.
Our sample application has already used `spring-boot-starter-parent` in the `parent`
Our applications for smoke tests use the `spring-boot-starter-parent` in the `parent`
section of the POM. The `spring-boot-starter-parent` is a special starter that provides
useful Maven defaults. It also provides a
<<using-spring-boot.adoc#using-boot-dependency-management,`dependency-management`>>
Expand Down Expand Up @@ -819,11 +819,6 @@ https://spring.io/guides/[getting started] guides that solve specific "`How do I
with Spring?`" problems. We also have Spring Boot-specific
"`<<howto.adoc#howto, How-to>>`" reference documentation.

The https://github.com/{github-repo}[Spring Boot repository] also has a
{github-code}/spring-boot-samples[bunch of samples] you can run. The samples are
independent of the rest of the code (that is, you do not need to build the rest to run or
use the samples).

Otherwise, the next logical step is to read _<<using-spring-boot.adoc#using-boot>>_. If
you are really impatient, you could also jump ahead and read about
_<<spring-boot-features.adoc#boot-features, Spring Boot features>>_.
38 changes: 3 additions & 35 deletions spring-boot-project/spring-boot-docs/src/main/asciidoc/howto.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -699,9 +699,7 @@ a plain HTTP connector at port 8080. Spring Boot does not support the configurat
both an HTTP connector and an HTTPS connector through `application.properties`. If you
want to have both, you need to configure one of them programmatically. We recommend using
`application.properties` to configure HTTPS, as the HTTP connector is the easier of the
two to configure programmatically. See the
{github-code}/spring-boot-samples/spring-boot-sample-tomcat-multi-connectors[`spring-boot-sample-tomcat-multi-connectors`]
sample project for an example.
two to configure programmatically.



Expand Down Expand Up @@ -1668,9 +1666,7 @@ And the following example shows one way to set up the starters in Gradle:

NOTE: The Log4j starters gather together the dependencies for common logging
requirements (such as having Tomcat use `java.util.logging` but configuring the
output using Log4j 2). See the
{github-code}/spring-boot-samples/spring-boot-sample-actuator-log4j2[Actuator Log4j 2]
samples for more detail and to see it in action.
output using Log4j 2).

NOTE: To ensure that debug logging performed using `java.util.logging` is routed into
Log4j 2, configure its https://logging.apache.org/log4j/2.0/log4j-jul/index.html[JDK
Expand Down Expand Up @@ -1895,9 +1891,7 @@ the same package (or a sub-package) of your `@EnableAutoConfiguration` class.
For many applications, all you need is to put the right Spring Data dependencies on
your classpath (there is a `spring-boot-starter-data-jpa` for JPA and a
`spring-boot-starter-data-mongodb` for Mongodb) and create some repository interfaces to
handle your `@Entity` objects. Examples are in the
{github-code}/spring-boot-samples/spring-boot-sample-data-jpa[JPA sample] and the
{github-code}/spring-boot-samples/spring-boot-sample-data-mongodb[Mongodb sample].
handle your `@Entity` objects.

Spring Boot tries to guess the location of your `@Repository` definitions, based on the
`@EnableAutoConfiguration` it finds. To get more control, use the `@EnableJpaRepositories`
Expand Down Expand Up @@ -2356,8 +2350,6 @@ is sufficient to cause Flyway to use its own `DataSource`. If any of the three
properties has not be set, the value of its equivalent `spring.datasource` property will
be used.

There is a {github-code}/spring-boot-samples/spring-boot-sample-flyway[Flyway sample] so
that you can see how to set things up.

You can also use Flyway to provide data for specific scenarios. For example, you can
place test-specific migrations in `src/test/resources` and they are run only when your
Expand Down Expand Up @@ -2399,9 +2391,6 @@ See
{sc-spring-boot-autoconfigure}/liquibase/LiquibaseProperties.{sc-ext}[`LiquibaseProperties`]
for details about available settings such as contexts, the default schema, and others.

There is a {github-code}/spring-boot-samples/spring-boot-sample-liquibase[Liquibase
sample] so that you can see how to set things up.



[[howto-messaging]]
Expand Down Expand Up @@ -3049,22 +3038,6 @@ The following example shows how to build an executable archive with Ant:
</target>
----

The {github-code}/spring-boot-samples/spring-boot-sample-ant[Ant Sample] has a
`build.xml` file with a `manual` task that should work if you run it with the following
command:

[indent=0,subs="verbatim,quotes,attributes"]
----
$ ant -lib <folder containing ivy-2.2.jar> clean manual
----

Then you can run the application with the following command:

[indent=0,subs="verbatim,quotes,attributes"]
----
$ java -jar target/*.jar
----



[[howto-traditional-deployment]]
Expand Down Expand Up @@ -3166,11 +3139,6 @@ file with the provided dependencies packaged in a `lib-provided` directory. This
that, in addition to being deployable to a servlet container, you can also run your
application by using `java -jar` on the command line.

TIP: Take a look at Spring Boot's sample applications for a
{github-code}/spring-boot-samples/spring-boot-sample-traditional/pom.xml[Maven-based
example] of the previously described configuration.




[[howto-convert-an-existing-application-to-spring-boot]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1586,9 +1586,7 @@ You can also add a custom Spring `Validator` by creating a bean definition calle
configuration properties validator is created very early in the application's lifecycle,
and declaring the `@Bean` method as static lets the bean be created without having to
instantiate the `@Configuration` class. Doing so avoids any problems that may be caused
by early instantiation. There is a
{github-code}/spring-boot-samples/spring-boot-sample-property-validation[property
validation sample] that shows how to set things up.
by early instantiation.

TIP: The `spring-boot-actuator` module includes an endpoint that exposes all
`@ConfigurationProperties` beans. Point your web browser to
Expand Down Expand Up @@ -3212,9 +3210,6 @@ an `@Order`, which you can set with `spring.jersey.filter.order`. Both the servl
the filter registrations can be given init parameters by using `spring.jersey.init.*` to
specify a map of properties.

There is a {github-code}/spring-boot-samples/spring-boot-sample-jersey[Jersey sample] so
that you can see how to set things up.



[[boot-features-embedded-container]]
Expand Down Expand Up @@ -3422,9 +3417,6 @@ packaged as an executable archive), there are some limitations in the JSP suppor
<<boot-features-error-handling-custom-error-pages,Custom error pages>> should be used
instead.

There is a {github-code}/spring-boot-samples/spring-boot-sample-web-jsp[JSP sample] so
that you can see how to set things up.



[[boot-features-reactive-server]]
Expand Down Expand Up @@ -3646,8 +3638,6 @@ so does not disable the `UserDetailsService` configuration or Actuator's securit

To also switch off the `UserDetailsService` configuration, you can add a bean of type
`UserDetailsService`, `AuthenticationProvider`, or `AuthenticationManager`.
There are several secure applications in the {github-code}/spring-boot-samples/[Spring
Boot samples] to get you started with common use cases.

Access rules can be overridden by adding a custom `WebSecurityConfigurerAdapter`. Spring
Boot provides convenience methods that can be used to override access rules for actuator
Expand Down
Loading

0 comments on commit d5c0009

Please sign in to comment.