Skip to content

Commit 4539d32

Browse files
committed
README fixes
1 parent fd25d68 commit 4539d32

File tree

2 files changed

+88
-3
lines changed

2 files changed

+88
-3
lines changed

README.adoc

Lines changed: 87 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,92 @@ image::https://codecov.io/gh/spring-cloud/spring-cloud-gateway/branch/main/graph
2727
[[building]]
2828
= Building
2929

30-
Unresolved directive in <stdin> - include::https:///raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/partials/building.adoc[]
30+
:jdkversion: 17
31+
32+
[[basic-compile-and-test]]
33+
== Basic Compile and Test
34+
35+
To build the source you will need to install JDK {jdkversion}.
36+
37+
Spring Cloud uses Maven for most build-related activities, and you
38+
should be able to get off the ground quite quickly by cloning the
39+
project you are interested in and typing
40+
41+
----
42+
$ ./mvnw install
43+
----
44+
45+
NOTE: You can also install Maven (>=3.3.3) yourself and run the `mvn` command
46+
in place of `./mvnw` in the examples below. If you do that you also
47+
might need to add `-P spring` if your local Maven settings do not
48+
contain repository declarations for spring pre-release artifacts.
49+
50+
NOTE: Be aware that you might need to increase the amount of memory
51+
available to Maven by setting a `MAVEN_OPTS` environment variable with
52+
a value like `-Xmx512m -XX:MaxPermSize=128m`. We try to cover this in
53+
the `.mvn` configuration, so if you find you have to do it to make a
54+
build succeed, please raise a ticket to get the settings added to
55+
source control.
56+
57+
The projects that require middleware (i.e. Redis) for testing generally
58+
require that a local instance of [Docker](https://www.docker.com/get-started) is installed and running.
59+
60+
[[documentation]]
61+
== Documentation
62+
63+
The spring-cloud-build module has a "docs" profile, and if you switch
64+
that on it will try to build asciidoc sources using https://docs.antora.org/antora/latest/[Antora] from
65+
`modules/ROOT/`.
66+
67+
As part of that process it will look for a
68+
`docs/src/main/asciidoc/README.adoc` and process it by loading all the includes, but not
69+
parsing or rendering it, just copying it to `${main.basedir}`
70+
(defaults to `$\{basedir}`, i.e. the root of the project). If there are
71+
any changes in the README it will then show up after a Maven build as
72+
a modified file in the correct place. Just commit it and push the change.
73+
74+
[[working-with-the-code]]
75+
== Working with the code
76+
If you don't have an IDE preference we would recommend that you use
77+
https://www.springsource.com/developer/sts[Spring Tools Suite] or
78+
https://eclipse.org[Eclipse] when working with the code. We use the
79+
https://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools
80+
should also work without issue as long as they use Maven 3.3.3 or better.
81+
82+
[[activate-the-spring-maven-profile]]
83+
=== Activate the Spring Maven profile
84+
Spring Cloud projects require the 'spring' Maven profile to be activated to resolve
85+
the spring milestone and snapshot repositories. Use your preferred IDE to set this
86+
profile to be active, or you may experience build errors.
87+
88+
[[importing-into-eclipse-with-m2eclipse]]
89+
=== Importing into eclipse with m2eclipse
90+
We recommend the https://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with
91+
eclipse. If you don't already have m2eclipse installed it is available from the "eclipse
92+
marketplace".
93+
94+
NOTE: Older versions of m2e do not support Maven 3.3, so once the
95+
projects are imported into Eclipse you will also need to tell
96+
m2eclipse to use the right profile for the projects. If you
97+
see many different errors related to the POMs in the projects, check
98+
that you have an up to date installation. If you can't upgrade m2e,
99+
add the "spring" profile to your `settings.xml`. Alternatively you can
100+
copy the repository settings from the "spring" profile of the parent
101+
pom into your `settings.xml`.
102+
103+
[[importing-into-eclipse-without-m2eclipse]]
104+
=== Importing into eclipse without m2eclipse
105+
If you prefer not to use m2eclipse you can generate eclipse project metadata using the
106+
following command:
107+
108+
[indent=0]
109+
----
110+
$ ./mvnw eclipse:eclipse
111+
----
112+
113+
The generated eclipse projects can be imported by selecting `import existing projects`
114+
from the `file` menu.
115+
31116

32117
[[contributing]]
33118
= Contributing
@@ -224,7 +309,7 @@ Spring Cloud Build brings along the `basepom:duplicate-finder-maven-plugin`, th
224309
[[duplicate-finder-configuration]]
225310
=== Duplicate Finder configuration
226311

227-
Duplicate finder is *enabled by default* and will run in the `verify` phase of your Maven build, but it will only take effect in your project if you add the `duplicate-finder-maven-plugin` to the `build` section of the projecst's `pom.xml`.
312+
Duplicate finder is *enabled by default* and will run in the `verify` phase of your Maven build, but it will only take effect in your project if you add the `duplicate-finder-maven-plugin` to the `build` section of the project's `pom.xml`.
228313

229314
.pom.xml
230315
[source,xml]

docs/src/main/asciidoc/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ image::https://codecov.io/gh/spring-cloud/spring-cloud-gateway/branch/main/graph
2020
[[building]]
2121
= Building
2222

23-
include::https:///raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/partials/building.adoc[]
23+
include::https://raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/partials/building.adoc[]
2424

2525
[[contributing]]
2626
= Contributing

0 commit comments

Comments
 (0)