工程下载
直接打开已经安装好的IntelliJ IDEA,启动好之后,可以看到如下图的界面,点击其中的 Checkout from Version Control ,选择Git
在弹出框中输入插件开发工程的地址:https://code.fanruan.com/fanruan/report-starter-10.git
点击Clone按钮下载插件开发工程即可。
打开工程
在等待一段时间后,插件开发工程下载完毕,会自动打开和下载依赖jar,这个时间可能比较长,可以去泡杯茶
可以点击Background,让导入任务进入后台运行
等待IntelliJ IDEA自动下载依赖JAR包,之后再等待索引完毕,就可以开始使用插件开发工程了
已经准备就绪的开发工程如下图所示
若无法自动依赖tools.jar,需手动配置
打开插件开发工程配置(动图↓)
上面的步骤完成后,根据我们的需要自行决定是否需要修改 maven/gradle的本地库地址(因为windows默认是保存在C盘的,我的C盘空间不够大,所以我都单独配置了响应的地址)
特别注意
注意1:由于插件开发的部分jar包,是依赖帆软的私有maven服务器(mvn.finedevelop.com),所以如果部分开发者因为网络限制原因,可能需要在网关处配置允许访问maven服务器的地址106.14.96.249。
注意2:如果本地maven配置了从其他镜像,比如阿里云镜像,则要参考maven服务器镜像配置,把fanruan的私有maven服务器也配置上去。
注意3:该教程展示的从未下载过插件开发工程的步骤,如果已经下载过插件开发工程,打开IntelliJ IDEA时,选择Open打开插件开发工程所在的目录即可(也即不选择Checkout from Version Control )。
注意4:示例插件开发工程中,依赖的是10.0测试分支的快照版本,如果希望依赖特定的版本,可以自行修改report-starter-10/build.gradle中的fineVersion变量。
注意5:若是11.0的开发环境只需修改工程的build.gradlew文件即可( 特别感谢 开发者左良发现问题并提供解决方案)
apply plugin: 'java'
/**
* 可以修改这个变量以依赖不同的开发版本
* 11.0需要修改第7、10、57行需要做相应的变更
*/
def fineVersion = '11.0-RELEASE-SNAPSHOT'
group = 'com.fr.plugin'
version = '11.0'
repositories {
mavenLocal()
maven {
url = uri('http://mvn.finedevelop.com/repository/maven-public/')
}
maven {
url = uri('http://repo.maven.apache.org/maven2')
}
}
task install(type: Copy) {
into "webroot/WEB-INF/lib"
from configurations.runtimeClasspath
}
static def isWindows() {
return org.gradle.internal.os.OperatingSystem.current().isWindows()
}
allprojects {
apply plugin: 'java'
dependencies {
implementation 'com.fr.third:fine-third:' + fineVersion
implementation 'com.fr.activator:fine-activator:' + fineVersion
implementation 'com.fr.core:fine-core:' + fineVersion
implementation 'com.fr.webui:fine-webui:' + fineVersion
implementation 'com.fr.datasource:fine-datasource:' + fineVersion
implementation 'com.fr.decision:fine-decision:' + fineVersion
implementation 'com.fr.decision:fine-decision-report:' + fineVersion
implementation 'com.fr.schedule:fine-schedule:' + fineVersion
implementation 'com.fr.schedule:fine-schedule-report:' + fineVersion
implementation 'com.fr.intelligence:fine-swift:' + fineVersion
implementation 'com.fr.intelligence:fine-accumulator:' + fineVersion
implementation 'com.fr.report:fine-report-engine:' + fineVersion
implementation 'com.fr.report:fine-report-designer:' + fineVersion
implementation 'io.socket:socket.io-client:0.7.0'
implementation 'org.aspectj:aspectjrt:1.6.9'
implementation 'org.swingexplorer:swexpl:2.0'
implementation 'org.swingexplorer:swag:1.0'
implementation 'org.apache.tomcat:tomcat-catalina:8.5.32'
implementation 'org.apache.tomcat:tomcat-jasper:8.5.32'
//11.0 需要添加websocket包的依赖
implementation 'org.apache.tomcat.embed:tomcat-embed-websocket:8.5.32'
implementation 'mysql:mysql-connector-java:5.1.44'
implementation 'com.fr.third:jxbrowser:6.23.1'
implementation group:"com.fr.third", name: isWindows() ? "jxbrowser-win64" :"jxbrowser-mac",version:"6.23.1"
implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'org.slf4j:slf4j-simple:1.7.30'
testImplementation 'junit:junit:4.12'
testImplementation 'org.easymock:easymock:3.5.1'
}
}
dependencies {
implementation files("${System.getProperty('java.home')}/../lib/tools.jar")
}
sourceCompatibility = '1.8'
版本 | 说明 |
---|
10.0-RELEASE-SNAPSHOT | 10.0的测试版本快照 |
10.0-FEATURE-SNAPSHOT | 10.0的新功能版本快照 |
10.0-PERSIST-SNAPSHOT | 10.0的正式版本快照 |
10.0.2019.07.16 | 发布的正式版本,其中的2019.07.16是会变化的 ,已发布版本列表参见:发布版本
|