You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+51-20Lines changed: 51 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,30 +177,61 @@ See below how to do both action for the specific tools.
177
177
To use Github Packages a username and token is needed. The username is your Github username. The token can be genreate in Github by going to your settings, Developer settings, Personal access tokens.
178
178
Generate a new token here and make sure that the scope "read:packages" is enabled. Use this token below to configure the build tools.
179
179
180
-
#### Basic Gradle
181
-
The project uses Gradle to manage the build. Most projects use multi-module structures to build all code. A basic command to run gradle is:
180
+
#### Basic Maven
181
+
The project uses Maven to manage the build. Most projects use multi-module structures to build all code. A basic command to run Maven is:
182
182
```
183
-
$ gradle build
183
+
$ maven clean verify
184
184
```
185
-
#### Github Packages in Gradle
186
-
To use Github Packages in Gradle an extra repository need to be added to the build process.
185
+
#### Github Packages in Maven
186
+
To use Github Packages in Maven an extra repository need to be added to the build process.
Because credentials are needed for Github Packages these can be passed in 2 different ways.
202
-
- First solution is to added the properties "githubUsername" and "githubToken" to your gradle.properties in your home directory (~/.gradle/gradle.properties). This solution doesn't seem to work with Intellij IDEA.
203
-
- The second solution is to create two environment properties "GITHUB_USERNAME" and "GITHUB_TOKEN". This ones is also used by Github Actions.
196
+
Because credentials are needed for Github Packages, these will be passed by using the Settings.xml file.
197
+
198
+
##### Local Settings.xml
199
+
Edit (or create if not already exists) the `~/.m2/settings.xml` file and add the following content:
Add this server section. The ID of the server must be the same as the ID found in the previous repository ID, it should map.
217
+
Username should be your Github username, password can both be your own [encrypted password](https://maven.apache.org/guides/mini/guide-encryption.html)
218
+
or a [Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token).
219
+
220
+
##### Settings.xml during Github Action
221
+
During multiple Github Actions (like building and SonarCloud analysis), the `settings.xml` file is also needed because it needs access to the Github Packages
222
+
to download certain artifacts. We can do this by adding the following step **before** the Github Packages is needed:
This basically creates a custom `settings.xml` at location `custom_maven_settings.xml`. This file can be passed to maven in the next step
231
+
by using `mvn -s custom_maven_settings.xml` and perhaps some extra parameters you wish for.
232
+
233
+
For the `servers` part, we again have the `github-packages-compas` ID that needs to be the same. We have an `OWNER` username (this is the default, because
234
+
it needs to have a username) and a password which is the GITHUB_TOKEN that's always available.
204
235
205
236
#### Basic Maven Usage
206
237
The project uses maven to manage the build. The configuration of all the tools is fairly standard, so if you have already contributed to Java projects, you should feel right at home. You can safely run the full test suite, checkstyle, see code coverage information and the generated documentation with the following command:
0 commit comments