Skip to content
Snippets Groups Projects
Commit 73424fb1 authored by Martin Ledvinka's avatar Martin Ledvinka
Browse files

README with software requirements and setup description.

parent 2a350028
No related branches found
No related tags found
No related merge requests found
## EAR Setup Project
## EAR Setup Verifier
This project is a sample for verifying correct system development setup.
If it can be built and run, the system has the correct setup and is ready for EAR.
\ No newline at end of file
If it can be built and run, the system has the correct setup and is ready for the B6B33EAR course.
### Software Requirements
* **Java 8**
* **NetBeans or any other Java IDE**
* **Apache Maven 3** (download [here](https://maven.apache.org/download.cgi))
* **NodeJS 4** or later (download [here](https://nodejs.org/en/))
* **npm** (should be installed together with NodeJS)
* **PostgreSQL 9** and later
* **Apache Tomcat 8** (download [here](http://tomcat.apache.org/download-80.cgi)) or any other Java EE 7 Web compatible application server
Feel free to install the software using your system's package manager.
### Application Setup
This is the shortest path setup without any customizations. Feel free to modify your setup in any way you like.
We are assuming that PostgreSQL is running at `localhost:5432` (see `src/main/resources/jdbc.properties`).
We are also assuming that Apache Tomcat is used with its default port - 8080.
#### Setup without IDE
1. Create a database named _ear_, owned by user _ear_ identified by password _ear_ (again, see `src/main/resources/jdbc.properties`).
2. Go to `src/main/webapp` and run `npm install` - this downloads JavaScript dependencies used by the UI implementation.
3. In the same folder, run `npm run build` - this packs the whole JavaScript-based UI into one bundle - `js/bundle.js`.
4. Go back to the project's root (i.e. the directory where this README file is located) and run `mvn clean package` -
this uses maven to download Java dependencies of the project and builds a deployable _war_ archive with the application.
5. Copy the resulting archive - `ear-setup.war` from `target` into your Tomcat's `webapps` directory.
1. E.g. if you unpacked Tomcat into `/opt/apache-tomcat-8.0.37`, copy the war file into `/opt/apache-tomcat-8.0.37/webapps`
6. Start Tomcat by running `startup.sh` (or `startup.cmd`) in the `bin` directory of your Tomcat.
7. Go to [http://localhost:8080/ear-setup](http://localhost:8080/ear-setup) - you should see a table of people who will
be teaching you, including their contact emails and rooms where to find them.
8. Congratulations, you are done!
#### Setup with NetBeans IDE
1. Same as above.
2. Same as above.
3. Same as above.
4. Open NetBeans, go to _Services_, right click on _Servers_ and add your Tomcat installation if it is not already present (NetBeans installer enables you to automatically download and install Tomcat).
1. Enter some user credentials in Step 2 (e.g. admin/admin) and check the `Create user if it does not exist` checkbox, otherwise NetBeans won't be able to start Tomcat.
5. Click _Open Project_ and select this project.
6. _Clean and Build_ the project (`Shift + F11`).
7. Click _Run Project_.
8. If a server selection dialog opens, select the server you added in Step 4 (and also select the `Remember Permanently` option).
9. A browser will automatically open at [http://localhost:8080/ear-setup](http://localhost:8080/ear-setup).
1. If not, open it manually.
10. Congratulations, you are done!
......@@ -7,6 +7,7 @@
<groupId>cz.cvut.kbss</groupId>
<artifactId>ear-setup</artifactId>
<version>0.0.1</version>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
......@@ -129,6 +130,7 @@
<version>2.4</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<warName>ear-setup</warName>
</configuration>
</plugin>
</plugins>
......
......@@ -45,7 +45,7 @@
"webpack": "^1.12.15"
},
"scripts": {
"start": "watchify -o js/bundle.js -v -d js/app.js",
"build": "browserify . -t [envify --NODE_ENV production] -o js/bundle.js",
"lint": "eslint js"
},
"browserify": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment