diff --git a/CHANGELOG.md b/CHANGELOG.md index 1fccc1f..8f755c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/README.md b/README.md index ce4e099..cffb9d3 100644 --- a/README.md +++ b/README.md @@ -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. @@ -26,7 +26,7 @@ The pom.xml will need to contain something like: com.mindscapehq core - 4.0.0 + 4.1.0 ``` @@ -39,7 +39,7 @@ If you're using servlets, JSPs or similar, you'll need to also add: com.mindscapehq webprovider - 4.0.0 + 4.1.0 ``` @@ -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 diff --git a/core/pom.xml b/core/pom.xml index 942cd0c..e6e2488 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -1,11 +1,9 @@ - + 4.0.0 com.mindscapehq raygun4java - 4.0.1-SNAPSHOT + 4.1.1-SNAPSHOT core jar diff --git a/core/src/main/java/com/mindscapehq/raygun4java/core/messages/RaygunClientMessage.java b/core/src/main/java/com/mindscapehq/raygun4java/core/messages/RaygunClientMessage.java index 1ae3759..ea15d45 100644 --- a/core/src/main/java/com/mindscapehq/raygun4java/core/messages/RaygunClientMessage.java +++ b/core/src/main/java/com/mindscapehq/raygun4java/core/messages/RaygunClientMessage.java @@ -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"); } diff --git a/development.md b/development.md index 9e693ab..4101478 100644 --- a/development.md +++ b/development.md @@ -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. Important! 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=`. ## Triggering the maven build lifecycle phases @@ -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 @@ -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: @@ -110,8 +111,8 @@ If that has not occurred for some reason: raygun4java-repo - SONATYPE_USERNAME - SONATYPE_PASSWORD + SONATYPE_AUTHTOKEN_USERNAME_PART + SONATYPE_AUTHTOKEN_PASSWORD_PART @@ -133,35 +134,45 @@ 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_`) 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. @@ -169,36 +180,37 @@ If that has not occurred for some reason: 6. **Add your SSH private key to the agent**: ```bash - ssh-add C:/Users/your_username/.ssh/id_rsa + ssh-add /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. diff --git a/playprovider/pom.xml b/playprovider/pom.xml index 85778d1..c626fcc 100644 --- a/playprovider/pom.xml +++ b/playprovider/pom.xml @@ -1,17 +1,15 @@ - + 4.0.0 com.mindscapehq raygun4java - 4.0.1-SNAPSHOT + 4.1.1-SNAPSHOT https://github.com/mindscapehq/raygun4java scm:git:ssh://git@github.com/MindscapeHQ/raygun4java.git scm:git:ssh://git@github.com/MindscapeHQ/raygun4java.git - HEAD + raygun4java-4.1.0 raygun4java-play2 jar diff --git a/pom.xml b/pom.xml index 5f33308..0fa3c5a 100644 --- a/pom.xml +++ b/pom.xml @@ -1,10 +1,8 @@ - + 4.0.0 com.mindscapehq raygun4java - 4.0.1-SNAPSHOT + 4.1.1-SNAPSHOT Raygun4Java parent project pom @@ -20,11 +18,6 @@ /webprovider /webproviderjakarta /playprovider - https://github.com/mindscapehq/raygun4java diff --git a/sampleJakartaEEApp/pom.xml b/sampleJakartaEEApp/pom.xml index dd885c6..38bce5c 100644 --- a/sampleJakartaEEApp/pom.xml +++ b/sampleJakartaEEApp/pom.xml @@ -6,7 +6,7 @@ com.mindscapehq raygun4java - 4.0.1-SNAPSHOT + 4.1.1-SNAPSHOT sampleJakartaEEApp war @@ -79,6 +79,13 @@ + + org.apache.maven.plugins + maven-deploy-plugin + + true + + org.apache.maven.plugins maven-surefire-plugin diff --git a/sampleJakartaEEApp/src/main/resources/config.properties b/sampleJakartaEEApp/src/main/resources/config.properties index c369528..c3fd49f 100644 --- a/sampleJakartaEEApp/src/main/resources/config.properties +++ b/sampleJakartaEEApp/src/main/resources/config.properties @@ -1 +1 @@ -raygun.apiKey=ie4lLDzmNFT6UuH1ZCWlMw +raygun.apiKey= diff --git a/sampleapp/pom.xml b/sampleapp/pom.xml index fc9cae9..0d7e80d 100644 --- a/sampleapp/pom.xml +++ b/sampleapp/pom.xml @@ -5,7 +5,7 @@ com.mindscapehq raygun4java - 4.0.1-SNAPSHOT + 4.1.1-SNAPSHOT sampleapp jar @@ -41,6 +41,13 @@ + + org.apache.maven.plugins + maven-deploy-plugin + + true + + org.apache.maven.plugins diff --git a/webprovider/pom.xml b/webprovider/pom.xml index 2ee2eeb..0eea3fe 100644 --- a/webprovider/pom.xml +++ b/webprovider/pom.xml @@ -1,11 +1,9 @@ - + 4.0.0 com.mindscapehq raygun4java - 4.0.1-SNAPSHOT + 4.1.1-SNAPSHOT webprovider jar diff --git a/webproviderjakarta/pom.xml b/webproviderjakarta/pom.xml index aab02e9..bba7cb8 100644 --- a/webproviderjakarta/pom.xml +++ b/webproviderjakarta/pom.xml @@ -1,11 +1,9 @@ - + 4.0.0 com.mindscapehq raygun4java - 4.0.1-SNAPSHOT + 4.1.1-SNAPSHOT webproviderjakarta jar