Gradle方式构建Java多项目
0: 安装IDEA:Linux 上只需下载IDEA的包 并且将路径配置在PATH全局变量中。/etc/profile
export PATH=$PATH:/opt/Software/IDEA/idea-IU-141.1532.4/bin
接下来配置下载安装jdk并且配置java 环境变量
export PATH=$PATH:/usr/lib/java/bin
export JAVA_HOME=/usr/lib/java
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
1: Download tomcat latest package.
Configure tomcat environments:
> vi /etc/profile
export CATALINA_BASE=/opt/Software/tomcat
export CATALINA_HOME=/opt/Software/tomcat
export PATH=$PATH:$CATALINA_BASE/bin
export PATH=$PATH:$CATALINA_BASE/lib
> source /etc/profile
最后只要./idea.sh就能随处执行了
激活你的IDEA:
csdn
38599-79U0U-5OWWA-2V980-1B6VZ-HY1V0
1. 首先,安装Gradle。 简单的步骤:
Prerequired: Java SDK installed
http://www.cnblogs.com/ygshen/p/4321283.html
include 'MainProject','subproject1','subproject2'
project(':WebProject'){ apply plugin: 'application' // Where the main class come from, it is in a sub project mainClassName='' // Dependencies for current project dependencies{ compile project(':subproject2') compile 'mysql:mysql-connector-java:5.1.21' } } project(':subproject1'){ } project(':subproject2'){ } // Defined all the sub-projects behavior. here they subprojects{ group='' version='1.0' apply plugin: 'java' sourceCompatibility='1.7' repositories{ mavenCentral() } dependencies { testCompile 'junit:junit:4.11' } }