Thursday, March 19, 2020

Gradle Maven install notes


Gradle Maven install notes



Intro

Gradle quick reference how to:
download
install
setup
test



Download

Go to manual installation
Or open direct Gradle download link - Windows, bin-only



Install

Unzip downloaded file gradle-6.2.2-bin.zip to your chosen target, i.e. to C:\software

In Windows Start menu search for and open:
Edit environment variables for your account

In User variables for user click New, fill in:
Variable name: GRADLE_HOME
Variable value: C:\software\gradle-6.2.2
Click OK.

Choose Variable PATH, click Edit (do not remove any existing content, click key End)
Append to Variable value: ;%GRADLE_HOME%\bin
Click OK.



Test

Open command prompt, run:
gradle -v
gradle -version



Notes

Changes will apply in newly opened applications and Command prompts.



Links

Gradle home

Installation Steps

Gradle releases

Getting started guide

Upgrade Gradle wrapper

Spring Boot JMS


Spring Boot JMS

Notes for building and running test Spring Boot JMS application with embedded ActiveMQ.



Clone, build

setlocal enableextensions
mkdir C:\dev\jms\
cd C:\dev\jms
git clone https://github.com/spring-guides/gs-messaging-jms.git
cd gs-messaging-jms
cd complete
mvn clean install



Run

C:\dev\jms\gs-messaging-jms\complete
java -jar target/gs-messaging-jms-0.1.0.jar



Resources

Spring Messaging JMS tutorial - main resource

git clone https://github.com/spring-guides/gs-messaging-jms.git


Wednesday, March 18, 2020

Spring Boot Rabbit MQ


Content
Install Erlang
Install and setup Rabbit MQ
Create sample Spring Boot Rabbit MQ client/server application
Run the application



Install Erlang and Rabbit MQ
Install Erlang

Rabbit MQ download - crossroad
Rabbit MQ - Windows builds - all
Rabbit MQ Win64 installer - exe



Setup Rabbit MQ

cd C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.3\sbin

Start service (if not yet started):
rabbitmq-service start

Enable Web UI:
rabbitmq-plugins enable rabbitmq_management

Add user:
rabbitmqctl add_user Admin_UserName Admin_Password

Grant admin rights:
rabbitmqctl set_user_tags admin administrator

Open Web UI:
http://localhost:15672/

More details:
https://www.rabbitmq.com/management.html



Clone and build project

setlocal enableextensions
mkdir C:\dev\rabbitmq\
cd C:\dev\rabbitmq\
git clone https://github.com/spring-guides/gs-messaging-rabbitmq.git
cd gs-messaging-rabbitmq
mvn clean install
cd complete
java -jar target/messaging-rabbitmq-0.0.1-SNAPSHOT.jar



Run project

cd C:\dev\rabbitmq\gs-messaging-rabbitmq\complete
java -jar target/messaging-rabbitmq-0.0.1-SNAPSHOT.jar



Resources

git clone https://github.com/spring-guides/gs-messaging-rabbitmq.git

Config dir: %APPDATA%\RabbitMQ