A rework of the java-getting-started Heroku template to allow Dr. Wimmer's counterfeit detection library to receive Amazon reviews, perform detection functions, and respond with a counterfeit score.
- Implement working Counterfeit Dection library to perform actual detection functions
$ git clone https://[email protected]/leonidkukuyev/java-counterfeit-servlet.git
$ cd java-counterfeit-servlet
$ mvn install
Make sure you have Java and Maven installed. Also, install the Heroku Toolbelt.
$ foreman start web
$ foreman start web -f Procfile.windows
Your app should now be running on localhost:5000.
$ mvn compile
$ heroku create
$ git push heroku master
$ heroku open
To make changes to the ScoreDetector library, compile the jar from outside of this Maven repo, then replace the existing ScoreDetector.jar in /lib/. The pom.xml already contains a System Scope dependency that includes ScoreDetector.jar.
<dependency>
<groupId>ScoreDetector.detector</groupId>
<artifactId>ScoreDetector</artifactId>
<version>1</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/ScoreDetector.jar</systemPath>
</dependency>
This is not a "stable" method of including external libraries.
For more information about using Java on Heroku, see these Dev Center articles: