commit | 2d4fc5a6f1b6d585629ca8e78307d82bbda18412 | [log] [tgz] |
---|---|---|
author | Aditya Sharma <adityasharma@apache.org> | Tue Jan 05 17:12:19 2021 +0530 |
committer | Aditya Sharma <adityasharma@apache.org> | Tue Jan 05 17:12:19 2021 +0530 |
tree | 7f80b21585acde8a92fd7a47195cc575f48d1bd9 | |
parent | b8ea6346fc800364095f3b720a0a8f270e1f17b9 [diff] |
Fixed: sonarqube issue - 'Random' objects should be reused Creating a new Random object each time a random value is needed is inefficient and may produce numbers which are not random depending on the JDK. For better efficiency and randomness, create a single Random, then store, and reuse it. The Random() constructor tries to set the seed with a distinct value every time. However there is no guarantee that the seed will be random or even uniformly distributed. Some JDK will use the current time as seed, which makes the generated numbers not random at all. This rule finds cases where a new Random is created each time a method is invoked and assigned to a local random variable.
Apache Roller is a Java-based, full-featured, multi-user and group-blog server suitable for blog sites large and small. Roller is typically run with Apache Tomcat and MySQL. Roller is made up of the following Maven projects:
The Roller Install, User and Template Guides are available in ODT format (for OpenOffice or LibraOffice):
Hit the Roller Confluence wiki:
If you want to run Roller in production, then you should down load the latest official release and install it by following the Installation Guide, which you can find at the documentation link: https://github.com/apache/roller/tree/master/docs.
You probably should not run Roller in production using this technique, but it‘s a relatively easy way to try Roller for yourself. Assuming you’ve got a UNIX shell, Java, Maven and Git:
Get the code:
$ git clone https://github.com/apache/roller.git
Compile and build Roller:
$ cd roller $ mvn -DskipTests=true install
Run Roller in Jetty with an embedded Derby database (for testing only):
$ mvn jetty:run
Once Jetty is up and running browse to http://localhost:8080/roller to try to Roller.
Another way to try Roller is to use Docker. This is actually easier than running via Maven because you do not need Maven or Java. If you‘ve got Docker, here’s how you can run Roller for demo purposes.
Get the code:
$ git clone https://github.com/apache/roller.git
Run Docker Compose to build and launch Roller along with a PostgreSQL database:
$ cd roller $ docker-compose up
It will take a while to build and start the Docker image. Once it's done browse to http://localhost:8080/roller to try Roller.