Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: IntelliJ --> IntelliJ IDEA

These instructions last updated Jully 17, 2013.  Fluxtream developers have successfully installed the pieces needed for Fluxtream development on Windows 7 (4 or 8 Gb of RAM), and on Windows XP.

...

The paths listed within the sections to be executed within cygwin are the cygwin-style paths.  When navigating to these directories within IntelliJ and IDEA and when setting up the local.properties keys you will need to figure out the corresponding DOS paths.  This will typically by default be prepended with c:\<your cygwin install directory>\home\<your username>.

...

   Download Windows Installer from http://nodejs.org/#download and follow the install instructions

The Windows Node.js installer by default will install the package manager and add its executable to the PATH variable.  This is exactly what we want.

Once node.js is installed, use the Node package manager to install less.  Double check that the command shell you are using has a %PATH% variable which includes the path to npm (by default c:\Program Files\nodejs\) before executing:

  npm install -g less

Checkout, set up, and build the datastore

...

Checkout scribe-java

In cygwin:

 cd ~/projects
git clone https://github.com/fluxtream/scribe-java.git

Checkout fluxtream-app and setup GeoLiteCity.dat

In cygwin:

 cd ~/projects/
git clone git://github.com/fluxtream/fluxtream-app.git fluxtream-app 

Copy MaxMind's GeoLiteCity.dat database to ~/projects/fluxtream-app:

 cd ~/projects/fluxtream-app
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz
gunzip GeoLiteCity.dat.gz

Download IntelliJ

...

IDEA Ultimate

http://www.jetbrains.com/idea/download/download_thanks.jsp

Import scribe-java project into IntelliJ

...

IDEA and install

In IntelliJ IDEA:

-Import the scribe-java project:
  -At the IntelliJ welcome IDEA welcome screen, select Import Project, browse to and select your cygwin ~/projects/scribe-java directory.  This directory will typically by default be <your cygwin install directory>/home/<your username>/projects/scribe-java
  -Check the auto-import for maven projects box
  -Otherwise accept defauts 

-Do maven install:
 -Along the right edge of the IntelliJ project IDEA project window, select Maven Projects
 -Open the scribe-java project in the window within the Maven Projects section
 -Open Lifecycle
 -Right click install
 -Select Run 'scribe-java [install]' 

-Close the scribe-java project (File/Close Project) 

Import fluxtream-app project

...

into IntelliJ IDEA

In IntelliJ IDEA:

-Import the fluxtream-app project:
  -At the IntelliJ welcome IDEA welcome screen, select Import Project, browse to and select your cygwin ~/projects/fluxtream-app directory.  This directory will typically by default be <your cygwin install directory>/home/<your username>/projects/fluxtream-app
  -Check the auto-import for maven projects box
  -Otherwise accept defauts 

-Pull in maven dependencies:
 -Along the right edge of the IntelliJ project IDEA project window, select Maven Projects
 -Open the fluxtream-app project in the window within the Maven Projects section
 -Open Lifecycle
 -Right click install
 -Select Run 'fluxtream-app [install]'

...

http://tomcat.apache.org/download-70.cgi
-download and install windows service version of tomcat
-disable tomcat's service from running at startup

Configure Tomcat Server

...

in IntelliJ IDEA

Add a new run configuration to set up a local tomcat server:
  -In IntelliJ select IDEA select Run/Edit Configurations from the main menu
  -Click the + button in the upper left corner and select Tomcat Server/Local (Local is in a sub-dialog that comes up when hover over Tomcat Server in the list)
  -In the Server tab of the dialog it brings up, click Configure button to the right of the Application Server line at the top 
  -Set both Tomcat Home and Tomcat base directory to your tomcat installation path

...

Add enviroment variables to each startup option setting TARGET_ENV=local
  -In the Startup/Connection tab of the first dialog for adding the Tomcat Server, do the following with each of the Run, Debug, and Coverage startup options in the top section selected:
    -Find the middle section under Pass environment variables
    -Click the + along the right edge 
    -Add TARGET_ENV as Name and local as value
    -Add JAVA_OPTS as -XX:MaxPermSize=256m -Xms256m -Xmx2048m -Djavax.servlet.request.encoding=UTF-8 -Dfile.encoding=UTF-8

Setup properties files

Copy the sample properties files to their real location:
 -Within your fluxtream-app directory, find the fluxtream-web/src/main/resources/ subdirectory.  Copy the .properties files from the samples subdirectory up one level into the resources directory.

Edit the values in local.properties to customize your Fluxtream install to match your situation.  These are just normal text files.  You can either edit them in a text editor like notepad or within IntelliJ IDEA.

You will definitely need to set the location for the datastore and GeoLiteCity.dat since the defaults assume Linux paths and you need to set them to be the DOS formatted paths (such as c:\) and use double backslashes to separate the path elements.  These will typically be something like:

...

-Open the log4j.xml file in IntelliJ IDEA (Ctrl-Shift-n)
-Edit line 5 to point to a place to put your log file.  On windows we use  c:\\<your cygwin install directory>\\home\\<your username>\\projects\\logs\\all.log
-Make sure that directory exists and is writable by your Windows user

...

Build and run the fluxtream-app project

In IntelliJ IDEA:

-build the fluxtream-app project (Build/Make project)
-click the run button
-if you get errors about sdks, configure java sdk for the project
-you should now get the login page with a fully functional app

...

Other logs will go to System.out.  If you are running Tomcat from within IntelliJ as IDEA as described above, this will show up in the bottom section of IntelliJ IDEA.  The bottom of the IntelliJ window IDEA window will have a row of buttons used to show and hide panels for various modes.  

...