Skip to content

Commit

Permalink
Merge pull request #100 from MindscapeHQ/release/4.1
Browse files Browse the repository at this point in the history
chore: Release 4.1.0 changes
  • Loading branch information
TheRealAgentK authored Aug 29, 2024
2 parents 821dfa9 + 03a35bd commit 388a29e
Show file tree
Hide file tree
Showing 12 changed files with 82 additions and 64 deletions.
13 changes: 10 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
* 4.0.1-SNAPSHOT
* 4.1.0

* Feature: Upgraded Play2 dependency in `playprovider` to Play 2.9.4
* Feature: Physical memory is tracked on Sun/Oracle JVMs (#74)
* Docs: Various updates and fixes (#70 #88)
* Fix: `RaygunClientMessage` was sending the wrong provider SDK version (#87)
* Fix: `sendUnhandled` behaved incorrectly (#72)
* Internal: Improved sbt-based build flow for `playprovider`
* Internal: Project-management upgrades (#96 #89)
* Internal: Environment now POSIX-compliant

* [Internal] Improved sbt-based build flow for `playprovider`

* 4.0.0

* Added new `webproviderjakarta` middleware module for Jakarta EE support and a corresponding sample app.
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ This provider provides support for sending exceptions from desktop Java, Scala,
These instructions assume you have a Maven project with a POM file set up in Eclipse, but this is also applicable to other IDEs and environments.

1. Open your project's pom.xml in Eclipse. Click on Dependencies -> Add. In the pattern search box, type `com.mindscapehq`.
2. - Add `com.mindscape.raygun4java` and `com.mindscapehq.core` in the desired version (the current stable release is `4.0.0`).
2. - Add `com.mindscape.raygun4java` and `com.mindscapehq.core` in the desired version (the current stable release is `4.1.0`).
- If you are working in a web environment, add the `com.mindscapehq.webprovider` dependency too.
- If you wish to grab the example project, you can also get or build the `sampleapp` jar.
3. Save your POM, and the dependencies should appear in Maven dependencies.
Expand All @@ -26,7 +26,7 @@ The pom.xml will need to contain something like:
<dependency>
<groupId>com.mindscapehq</groupId>
<artifactId>core</artifactId>
<version>4.0.0</version>
<version>4.1.0</version>
</dependency>
</dependencies>
```
Expand All @@ -39,7 +39,7 @@ If you're using servlets, JSPs or similar, you'll need to also add:
<dependency>
<groupId>com.mindscapehq</groupId>
<artifactId>webprovider</artifactId>
<version>4.0.0</version>
<version>4.1.0</version>
</dependency>
```

Expand Down Expand Up @@ -261,13 +261,13 @@ Add the following line to your `build.sbt`'s `libraryDependencies`:
```
libraryDependencies ++= Seq(
"com.mindscapehq" % "raygun4java-play2" % "4.0.0"
"com.mindscapehq" % "raygun4java-play2" % "4.1.0"
)
```
#### With Maven
Add the `raygun4java-play2-4.0.0` dependency to your `pom.xml` (following the instructions under 'With Maven and a command shell' at the top of this file).
Add the `raygun4java-play2-4.1.0` dependency to your `pom.xml` (following the instructions under 'With Maven and a command shell' at the top of this file).
### Usage
Expand Down
6 changes: 2 additions & 4 deletions core/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mindscapehq</groupId>
<artifactId>raygun4java</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.1.1-SNAPSHOT</version>
</parent>
<artifactId>core</artifactId>
<packaging>jar</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class RaygunClientMessage {

public RaygunClientMessage() {
setName("Raygun4Java");
setVersion("4.0.1");
setVersion("4.1.1-SNAPSHOT");
setClientUrlString("https://github.com/MindscapeHQ/raygun4java");
}

Expand Down
64 changes: 38 additions & 26 deletions development.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ These modules can reference each other as dependencies.
exec plugin during the `generate-sources` phase of the Play provider's pom.

<b>Important!</b> The sampleJakartaEEApp requires a Raygun API Key.
After you retrieve it from Raygun, create a config.properties file in `src/main/resources` of `sampleJakartaEEApp` that
After you retrieve it from Raygun, create a `config.properties` file in `src/main/resources` of `sampleJakartaEEApp` that
contains `raygun.apiKey=<YOUR-RAYGUN-API-KEY>`.

## Triggering the maven build lifecycle phases
Expand Down Expand Up @@ -80,9 +80,10 @@ If that has not occurred for some reason:
## Prerequisites

1. Install GPG (GNU Privacy Guard): [Gpg4win](https://gpg4win.org/download.html). We only need the GnuPG component.
- Ensure `gpg.exe` is added to your PATH. By default, this can be found
- On Windows, ensure `gpg.exe` is added to your PATH. By default, this can be found
at `C:/Program Files (x86)/GnuPG/bin/gpg.exe`.
2. Locate our **GPG passphrase** in 1Password.
- On Linux, Unix or macOS systems, if not available already, please install via your package manager.
2. Locate our **GPG passphrase** in our password manager.
3. Run `gpg --gen-key`, enter your details, and use the passphrase when prompted.
4. After generating the key, you need to find out the ID of the GPG key. To list your GPG keys, execute:
```bash
Expand All @@ -100,7 +101,7 @@ If that has not occurred for some reason:
```
gpg --keyserver hkps://keyserver.ubuntu.com:443 --send-keys YOUR_KEY_ID
```
6. Locate our **Sonatype** login in 1Password.
6. Locate our **Sonatype auth token** in our password manager.
7. Modify or create a `settings.xml` in your Maven `conf` or `~/.m2` directory. Add the following with credentials
substituted in:

Expand All @@ -110,8 +111,8 @@ If that has not occurred for some reason:
<servers>
<server>
<id>raygun4java-repo</id>
<username>SONATYPE_USERNAME</username>
<password>SONATYPE_PASSWORD</password>
<username>SONATYPE_AUTHTOKEN_USERNAME_PART</username>
<password>SONATYPE_AUTHTOKEN_PASSWORD_PART</password>
</server>
</servers>
<profiles>
Expand All @@ -133,72 +134,83 @@ If that has not occurred for some reason:

### Add an SSH key to GitHub

A verbose documentation from Github is available:

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/checking-for-existing-ssh-keys
https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account
https://docs.github.com/en/authentication/connecting-to-github-with-ssh/testing-your-ssh-connection

The below steps are an abridged version of the GH documentation, intending to provide an overview of the required steps. If at any stage
you run into issues, please refer to the GH documentation.

1. **Generate SSH key**:
```bash
ssh-keygen -t rsa -b 4096 -C "your_github_email@example.com"
```
- When prompted, press Enter to save the key to the default location, and you can choose to set a passphrase or skip
it (based on your preference).
- Run:
```bash
ssh-keygen -t rsa -b 4096 -C "your_github_email@example.com"
```
- When prompted, press Enter to save the key to the default location, and you can choose to set a passphrase or skip it (based on your preference).

2. **Copy SSH public key**:
- On Windows, you can use the following command:
```bash
type %userprofile%\.ssh\id_rsa.pub | clip
```
- On Linux, Unix or macOS, just `cat` the file and copy the output for a similar outcome.

3. **Add key to GitHub**:
- Go to GitHub and navigate to your profile.
- Click on **Settings**.
- In the left sidebar, select **SSH and GPG keys**.
- Click **New SSH key**.
- Provide a descriptive title (e.g., Raygun4Java) and paste the copied key into the "Key" field.
- Provide a descriptive title (e.g., `Raygun4Java_<machine_name>`) and paste the copied key into the "Key" field.
- Click **Add SSH key** to save.

4. **Test connection**:
```bash
ssh -T git@github.com
```
- If you see a message like "Hi [username]! You've successfully authenticated...", then the SSH key is set up
correctly.
- If you see a message like "Hi [username]! You've successfully authenticated...", then the SSH key is set up correctly.

5. **Ensure `ssh-agent` service is running**:
5. **On Windows, ensure the `ssh-agent` service is running**:
- Press Windows + R to open the Run dialog.
- Type `services.msc` and hit Enter.
- Find **OpenSSH Authentication Agent** in the list.
- Right-click on it and select Start.

6. **Add your SSH private key to the agent**:
```bash
ssh-add C:/Users/your_username/.ssh/id_rsa
ssh-add <path_to_key>/id_rsa
```

## Release

1. **Prepare the release**:
- Do not use protected branch `master`, the `maven-release-plugin` needs to make changes. Ensure all changes are
committed to your branch.
- Run the Maven release prepare command:
- Create a release branch off `master`. Do not use the protected branch `master`, the `maven-release-plugin` needs to make changes.
- Ensure all changes are committed to your branch.
- Run the Maven `release:prepare` command:
```bash
mvn release:prepare
mvn release:prepare --projects .,core,webprovider,webproviderjakarta,playprovider
```
- This will ask you for the release version, tag name, and next development version, which you can likely leave
- This will prepare the release for the projects we actually want to deploy to Mavencentral and will not release the sample apps.
- You will be asked for the release version, release tag name, and next development version, which you can usually all leave
as-is. Make sure the release version doesn't contain `-SNAPSHOT`. It will then make changes to the POMs and
commit/tag them in Git.
2. **Deploy to Sonatype**:
- After preparing, you can perform the release by running:
```bash
mvn release:perform
mvn release:perform --projects .,core,webprovider,webproviderjakarta,playprovider
```
- This command will checkout the code from Git using the tag created in the prepare step, build the project, and
- This command will check out the code from Git using the tag created in the prepare step, build the project, and
deploy it to the OSSRH repository (Sonatype).
3. **Release the artifacts on Sonatype**:
- Once the artifacts are uploaded to Sonatype, follow these steps to release them:
- Go to [Sonatype OSSRH](https://oss.sonatype.org/#stagingRepositories).
- Login with our Sonatype credentials from 1Password.
- Locate our **Sonatype login** in our password manager.
- Go to [Sonatype OSSRH](https://oss.sonatype.org/#stagingRepositories) and login.
- Navigate to "Staging Repositories".
- Find your artifact in the list.
- Find your uploaded artifact in the list.
- Select your artifact, then click "Close". This will validate and prepare the artifact for release.
- Once closed successfully, select the artifact again and click "Release" to make it publicly available.
Expand Down
8 changes: 3 additions & 5 deletions playprovider/pom.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mindscapehq</groupId>
<artifactId>raygun4java</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.1.1-SNAPSHOT</version>
</parent>
<scm>
<url>https://github.com/mindscapehq/raygun4java</url>
<connection>scm:git:ssh://git@github.com/MindscapeHQ/raygun4java.git</connection>
<developerConnection>scm:git:ssh://git@github.com/MindscapeHQ/raygun4java.git</developerConnection>
<tag>HEAD</tag>
<tag>raygun4java-4.1.0</tag>
</scm>
<artifactId>raygun4java-play2</artifactId>
<packaging>jar</packaging>
Expand Down
11 changes: 2 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mindscapehq</groupId>
<artifactId>raygun4java</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.1.1-SNAPSHOT</version>
<name>Raygun4Java parent project</name>
<packaging>pom</packaging>
<properties>
Expand All @@ -20,11 +18,6 @@
<module>/webprovider</module>
<module>/webproviderjakarta</module>
<module>/playprovider</module>
<!--
Uncomment and refresh IDE Maven setup if you want to include the sample apps in the main project builds
<module>/sampleapp</module>
<module>/sampleJakartaEEApp</module>
-->
</modules>
<scm>
<url>https://github.com/mindscapehq/raygun4java</url>
Expand Down
9 changes: 8 additions & 1 deletion sampleJakartaEEApp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.mindscapehq</groupId>
<artifactId>raygun4java</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.1.1-SNAPSHOT</version>
</parent>
<artifactId>sampleJakartaEEApp</artifactId>
<packaging>war</packaging>
Expand Down Expand Up @@ -79,6 +79,13 @@
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion sampleJakartaEEApp/src/main/resources/config.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
raygun.apiKey=ie4lLDzmNFT6UuH1ZCWlMw
raygun.apiKey=
9 changes: 8 additions & 1 deletion sampleapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>com.mindscapehq</groupId>
<artifactId>raygun4java</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.1.1-SNAPSHOT</version>
</parent>
<artifactId>sampleapp</artifactId>
<packaging>jar</packaging>
Expand Down Expand Up @@ -41,6 +41,13 @@
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<!-- build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
Expand Down
6 changes: 2 additions & 4 deletions webprovider/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mindscapehq</groupId>
<artifactId>raygun4java</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.1.1-SNAPSHOT</version>
</parent>
<artifactId>webprovider</artifactId>
<packaging>jar</packaging>
Expand Down
6 changes: 2 additions & 4 deletions webproviderjakarta/pom.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.mindscapehq</groupId>
<artifactId>raygun4java</artifactId>
<version>4.0.1-SNAPSHOT</version>
<version>4.1.1-SNAPSHOT</version>
</parent>
<artifactId>webproviderjakarta</artifactId>
<packaging>jar</packaging>
Expand Down

0 comments on commit 388a29e

Please sign in to comment.