Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 37 additions & 8 deletions .github/maintainers_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,33 @@ By installing App(2) and App(3), you get the followings. Set them as env variabl
|SLACK_SDK_TEST_GRID_SHARED_CHANNEL_ID|A shared channel's ID `SLACK_SDK_TEST_GRID_WORKSPACE_ADMIN_USER_TOKEN` can manage.|
|SLACK_SDK_TEST_EMAIL_ADDRESS|An email address to invite.|

### Installing JAR files locally for development

To use the JAR files from each subproject in your local development environment, you can install them to your local Maven repository:

1. Build and install all modules locally:
* Run `scripts/install_local.sh`
* Note: This command skips running unit tests for faster installation
2. Use in your project:
Once installed locally, you can reference these artifacts in your project's `pom.xml`:

```xml
<dependency>
<groupId>com.slack.api</groupId>
<artifactId>bolt</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.slack.api</groupId>
<artifactId>slack-api-client</artifactId>
<version>1.0.1-SNAPSHOT</version>
</dependency>
```

### Generating Documentation

Refer to the [README](https://github.com/slackapi/java-slack-sdk/blob/main/docs/README.md) for details on editing documentation.
Refer to the [README](https://github.com/slackapi/java-slack-sdk/blob/main/docs/README.md) for details on editing documentation.

### Releasing

Expand All @@ -88,19 +112,24 @@ Refer to the [README](https://github.com/slackapi/java-slack-sdk/blob/main/docs/
* Make sure you've set up your key https://central.sonatype.org/publish/requirements/gpg/
* Make sure the account you are using has the permission to make releases [under com.slack groupId](https://central.sonatype.com/publishing/com.slack/users)

Place `$HOME/.m2/settings.xml` with your Sonatype account information.
Place `$HOME/.m2/settings.xml` with your Sonatype account information.
* Generate user token: https://central.sonatype.org/publish/generate-portal-token/
* Set the user token id/password: https://central.sonatype.org/publish/publish-portal-maven/#credentials

```xml
<settings>
<localRepository>/${your-home-dir}/.m2/repository</localRepository>
<servers>
<server>
<username>${your-username}</username>
<password>${your-password}</password>
<id>central</id>
</server>
<server>
<id>central</id>
<username>${your-username}</username>
<password>${your-password}</password>
</server>
<server>
<id>central-snapshots</id>
<username>${your-username}</username>
<password>${your-password}</password>
</server>
</servers>
<pluginGroups>
<pluginGroup>org.apache.maven.plugins</pluginGroup>
Expand All @@ -116,7 +145,7 @@ To learn more about snapshot releases in maven central repository check out [pub

* From the upstream repository
* Preparation
* `git switch main && git pull origin main`
* `git switch main && git pull origin main` (or the branch you want to release from)
* Make sure there are no build failures at https://github.com/slackapi/java-slack-sdk/actions
* Set a new version
* It is **critical** that the version ends with `-SNAPSHOT`. This is how [central-publishing-maven-plugin](https://central.sonatype.org/publish/publish-portal-snapshots/#publishing-with-the-central-publishing-maven-plugin) automatically recognizes snapshot releases and uploads them the right location.
Expand Down
13 changes: 13 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,19 @@
</repository>
</repositories>

<distributionManagement>
<repository>
<id>central</id>
<name>Sonatype Central Releases</name>
<url>https://central.sonatype.com/repository/maven-releases/</url>
</repository>
<snapshotRepository>
<id>central-snapshots</id>
<name>Sonatype Central Snapshots</name>
<url>https://central.sonatype.com/repository/maven-snapshots/</url>
</snapshotRepository>
</distributionManagement>

<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
Expand Down
10 changes: 10 additions & 0 deletions scripts/install_local.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
is_jdk_8=`echo $JAVA_HOME | grep 8.`
is_travis_jdk_8=`echo $TRAVIS_JDK | grep openjdk8`
if [[ "${is_jdk_8}" != "" && "${is_travis_jdk_8}" != "" ]];
then
echo "Please use OpenJDK 11."
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC this is disallowing OpenJDK 8, but should we mandate OpenJDK 17? (Based on the requirement called out in the maintainer's guide)

exit 1
fi

./mvnw install -Dmaven.test.skip=true