Skip to content

Commit 14ddcea

Browse files
Improve Building from Source Instructions
Add a note to the Building From Source instructions to indicate that Python 3 is a requirement for building the archetype-lambda project. Add section about code generation and a tip to help IntelliJ IDEA users on how to fix class not found errors for generated code.
1 parent 9f3e7c7 commit 14ddcea

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ See the [Set up the AWS SDK for Java][docs-setup] section of the developer guide
116116

117117
Once you check out the code from GitHub, you can build it using Maven.
118118

119+
Note: The `archetypes/archetype-lambda` project requires that you have Python 3 in your path as `python`.
120+
119121
```sh
120122
mvn clean install
121123

@@ -126,6 +128,17 @@ mvn clean install -P quick
126128
mvn clean install -pl :s3 -P quick --am
127129
```
128130

131+
### Code Generation
132+
133+
The SDK makes significant use of code generation which takes place at build time. During a Maven build, the
134+
`build-helper-maven-plugin` takes care of making these additional generated source files available for compilation.
135+
136+
However, your IDE may not automatically detect the generated code which can lead to class not found errors.
137+
To fix this, you may need to instruct your IDE where to find the generated code: namely, in the
138+
`target/generated-sources` of many of the projects in this repo. For example, in IntelliJ IDEA, you can do this by
139+
opening `File | Settings | Build, Execution, Deployment | Build Tools | Maven | Importing` and setting
140+
"Generated sources folders" to "target/generated-sources".
141+
129142
## Sample Code
130143
You can find sample code for v2 in the following places:
131144

0 commit comments

Comments
 (0)