- 浏览: 262633 次
- 性别:
- 来自: 天津
文章分类
- 全部博客 (183)
- oracle (4)
- informix (1)
- web开发 (6)
- java (49)
- hibernate (1)
- hadoop (1)
- spring (23)
- 非技术 (8)
- ibatis2 (5)
- Linux (6)
- tomcat (14)
- nginx (7)
- dubbo (3)
- myibatis (7)
- webservice 开发 (2)
- mysql (2)
- svn (2)
- redis (7)
- 分布式技术 (17)
- zookeeper (2)
- kafka (2)
- velocity (1)
- maven (7)
- js (1)
- freemarker (1)
- Thymeleaf (3)
- 代码审计 (1)
- ibatis3 (1)
- rabbitmq (1)
最新评论
group 'com.cloudboce'
apply plugin: 'java'
apply plugin: 'war'
//apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.hidetake.ssh'
sourceCompatibility = 1.7
targetCompatibility = 1.7
version = '1.0'
jar {
manifest {
attributes 'Implementation-Title': 'Gradle Quickstart',
'Implementation-Version': version
}
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.springframework') {
details.useVersion '4.2.4.RELEASE'
}
}
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'commons-logging') {
details.useVersion '1.2'
}
}
}
buildscript{
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'org.hidetake:gradle-ssh-plugin:2.6.0'
}
}
repositories {
jcenter()
mavenCentral()
}
dependencies {
def springVersion = "4.2.4.RELEASE";
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
testCompile group: 'junit', name: 'junit', version: '4.+'
//core spring
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-core:$springVersion"
compile "org.springframework:spring-webmvc:$springVersion"
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-expression:$springVersion"
compile "org.springframework:spring-beans:$springVersion"
compile "org.springframework:spring-aspects:$springVersion"
compile group: 'org.aopalliance', name: 'com.springsource.org.aopalliance', version: '1.0.0'
compile group: 'org.aspectj', name: 'com.springsource.org.aspectj.weaver', version: '1.6.8.RELEASE'
//db access
compile "org.springframework:spring-jdbc:$springVersion"
compile "org.springframework:spring-orm:$springVersion"
//log4j2
def log4j_version = "2.2";
compile "org.apache.logging.log4j:log4j-api:$log4j_version"
compile "org.apache.logging.log4j:log4j-core:$log4j_version"
compile "org.apache.logging.log4j:log4j-web:$log4j_version"
compile "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version"
//mybatis
compile "org.mybatis:mybatis:3.2.8"
compile "org.mybatis:mybatis-spring:1.2.2"
// jackson
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.8.1'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
//c3p0
compile "c3p0:c3p0:0.9.1.2"
//proxool
compile group: 'com.cloudhopper.proxool', name: 'proxool', version: '0.9.1'
compile group: 'com.cloudhopper.proxool', name: 'proxool-cglib', version: '0.9.1'
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.+'
compile group: 'xerces', name: 'xerces', version: '2.4.0'
compile group: 'org.codehaus.castor', name: 'castor-xml', version: '1.4.1'
compile group: 'org.aspectj', name: 'aspectjrt', version: '1.+'
compile group: 'org.aspectj', name: 'aspectjweaver', version: '1.+'
compile group: 'cglib', name: 'cglib-nodep', version: '2.+'
testCompile group: 'org.springframework', name: 'spring-test', version: springVersion
testCompile group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: log4j_version
compile files('src/main/webapp/WEB-INF/lib/ojdbc6.jar')
compile files('src/main/webapp/WEB-INF/lib/BoceSMS.jar')
compile group: 'dom4j', name: 'dom4j', version: '1.6.1'
compile group: 'jaxen', name: 'jaxen', version: '1.1.1'
/* Redis */
compile group: 'org.springframework.data', name: 'spring-data-redis', version: '1.7.2.RELEASE'
compile group: 'redis.clients', name: 'jedis', version: '2.8.1'
//httpclient
compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
compile group: 'commons-codec', name: 'commons-codec', version: '1.2'
compile group: 'commons-logging', name: 'commons-logging', version: '1.0.4'
compile group: 'org.jasypt', name: 'jasypt', version: '1.9.2'
compile group: 'org.jasypt', name: 'jasypt-spring31', version: '1.9.0'
compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.1'
compile group: 'commons-io', name: 'commons-io', version: '2.5'
compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.6'
compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.6'
// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.2'
}
test {
systemProperties 'property': 'value'
}
uploadArchives {
repositories {
flatDir {
dirs 'repos'
}
}
}
task copyJars(type: Copy) {
from configurations.runtime
into '/src/main/webapp/WEB-INF/lib'
}
ssh.settings {
knownHosts = allowAnyHosts
}
remotes {
deployServer {
host = '192.168.6.24'
user = 'root'
password = 'bocetest123'
}
}
war {
archiveName 'cloud_server.war'
}
task shutdownTomcat() << {
ssh.run {
session(remotes.deployServer) {
println 'shut down tomcat...'
executeScript '''#!/bin/sh
cd /opt/app/apache-tomcat-7.0.67/bin
./shutdown.sh
'''
}
}
}
task del(dependsOn:shutdownTomcat) << {
ssh.run {
session(remotes.deployServer) {
println 'start deleting...'
executeScript '''#!/bin/sh
rm -rf /opt/app/apache-tomcat-7.0.67/webapps/cloud_server
rm -f /opt/app/apache-tomcat-7.0.67/webapps/cloud_server.war
'''
}
}
}
task copy(dependsOn:del) << {
ssh.run {
session(remotes.deployServer) {
println 'start copying war...'
put from: buildDir.toString() + '/libs/cloud_server.war', into: '/opt/app/apache-tomcat-7.0.67/webapps'
}
}
}
task deploy(dependsOn:copy) << {
ssh.run {
session(remotes.deployServer) {
println 'start tomcat...'
execute '/opt/app/apache-tomcat-7.0.67/bin/startup.sh'
}
}
}
/*group 'com'
version '1.0-SNAPSHOT'
apply plugin: 'war'
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}*/
apply plugin: 'java'
apply plugin: 'war'
//apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: 'org.hidetake.ssh'
sourceCompatibility = 1.7
targetCompatibility = 1.7
version = '1.0'
jar {
manifest {
attributes 'Implementation-Title': 'Gradle Quickstart',
'Implementation-Version': version
}
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'org.springframework') {
details.useVersion '4.2.4.RELEASE'
}
}
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'commons-logging') {
details.useVersion '1.2'
}
}
}
buildscript{
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'org.hidetake:gradle-ssh-plugin:2.6.0'
}
}
repositories {
jcenter()
mavenCentral()
}
dependencies {
def springVersion = "4.2.4.RELEASE";
compile group: 'commons-collections', name: 'commons-collections', version: '3.2'
testCompile group: 'junit', name: 'junit', version: '4.+'
//core spring
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-core:$springVersion"
compile "org.springframework:spring-webmvc:$springVersion"
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-expression:$springVersion"
compile "org.springframework:spring-beans:$springVersion"
compile "org.springframework:spring-aspects:$springVersion"
compile group: 'org.aopalliance', name: 'com.springsource.org.aopalliance', version: '1.0.0'
compile group: 'org.aspectj', name: 'com.springsource.org.aspectj.weaver', version: '1.6.8.RELEASE'
//db access
compile "org.springframework:spring-jdbc:$springVersion"
compile "org.springframework:spring-orm:$springVersion"
//log4j2
def log4j_version = "2.2";
compile "org.apache.logging.log4j:log4j-api:$log4j_version"
compile "org.apache.logging.log4j:log4j-core:$log4j_version"
compile "org.apache.logging.log4j:log4j-web:$log4j_version"
compile "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version"
//mybatis
compile "org.mybatis:mybatis:3.2.8"
compile "org.mybatis:mybatis-spring:1.2.2"
// jackson
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.8.1'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.8.1'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
//c3p0
compile "c3p0:c3p0:0.9.1.2"
//proxool
compile group: 'com.cloudhopper.proxool', name: 'proxool', version: '0.9.1'
compile group: 'com.cloudhopper.proxool', name: 'proxool-cglib', version: '0.9.1'
compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.+'
compile group: 'xerces', name: 'xerces', version: '2.4.0'
compile group: 'org.codehaus.castor', name: 'castor-xml', version: '1.4.1'
compile group: 'org.aspectj', name: 'aspectjrt', version: '1.+'
compile group: 'org.aspectj', name: 'aspectjweaver', version: '1.+'
compile group: 'cglib', name: 'cglib-nodep', version: '2.+'
testCompile group: 'org.springframework', name: 'spring-test', version: springVersion
testCompile group: 'org.apache.logging.log4j', name: 'log4j-jcl', version: log4j_version
compile files('src/main/webapp/WEB-INF/lib/ojdbc6.jar')
compile files('src/main/webapp/WEB-INF/lib/BoceSMS.jar')
compile group: 'dom4j', name: 'dom4j', version: '1.6.1'
compile group: 'jaxen', name: 'jaxen', version: '1.1.1'
/* Redis */
compile group: 'org.springframework.data', name: 'spring-data-redis', version: '1.7.2.RELEASE'
compile group: 'redis.clients', name: 'jedis', version: '2.8.1'
//httpclient
compile group: 'commons-httpclient', name: 'commons-httpclient', version: '3.1'
compile group: 'commons-codec', name: 'commons-codec', version: '1.2'
compile group: 'commons-logging', name: 'commons-logging', version: '1.0.4'
compile group: 'org.jasypt', name: 'jasypt', version: '1.9.2'
compile group: 'org.jasypt', name: 'jasypt-spring31', version: '1.9.0'
compile group: 'commons-fileupload', name: 'commons-fileupload', version: '1.3.1'
compile group: 'commons-io', name: 'commons-io', version: '2.5'
compile group: 'org.apache.httpcomponents', name: 'httpmime', version: '4.3.6'
compile group: 'org.apache.httpcomponents', name: 'httpcore', version: '4.4.6'
// https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.2'
}
test {
systemProperties 'property': 'value'
}
uploadArchives {
repositories {
flatDir {
dirs 'repos'
}
}
}
task copyJars(type: Copy) {
from configurations.runtime
into '/src/main/webapp/WEB-INF/lib'
}
ssh.settings {
knownHosts = allowAnyHosts
}
remotes {
deployServer {
host = '192.168.6.24'
user = 'root'
password = 'bocetest123'
}
}
war {
archiveName 'cloud_server.war'
}
task shutdownTomcat() << {
ssh.run {
session(remotes.deployServer) {
println 'shut down tomcat...'
executeScript '''#!/bin/sh
cd /opt/app/apache-tomcat-7.0.67/bin
./shutdown.sh
'''
}
}
}
task del(dependsOn:shutdownTomcat) << {
ssh.run {
session(remotes.deployServer) {
println 'start deleting...'
executeScript '''#!/bin/sh
rm -rf /opt/app/apache-tomcat-7.0.67/webapps/cloud_server
rm -f /opt/app/apache-tomcat-7.0.67/webapps/cloud_server.war
'''
}
}
}
task copy(dependsOn:del) << {
ssh.run {
session(remotes.deployServer) {
println 'start copying war...'
put from: buildDir.toString() + '/libs/cloud_server.war', into: '/opt/app/apache-tomcat-7.0.67/webapps'
}
}
}
task deploy(dependsOn:copy) << {
ssh.run {
session(remotes.deployServer) {
println 'start tomcat...'
execute '/opt/app/apache-tomcat-7.0.67/bin/startup.sh'
}
}
}
/*group 'com'
version '1.0-SNAPSHOT'
apply plugin: 'war'
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}*/
发表评论
-
maven根据不同环境打不同的war
2018-06-27 18:47 907<project xmlns="http:// ... -
maven 内置变量
2017-11-03 14:42 654Maven共有6类属性: 内置属性(Maven预定义,用户可以 ... -
maven 常用插件
2017-11-03 09:39 547<?xml version="1.0" ... -
wagon-maven-plugin 实现远程部署
2017-10-31 15:53 14481.添加wagon-maven-plugin ... -
maven 远程发布系统到tomcat7
2017-08-24 16:37 5661. 修改Tomcat7的tomcat-users.xml ... -
eclipse 中maven 加入本地jar文件
2017-05-16 15:02 13901.在项目上单击右键-》新建文件夹(如:lib) 2.在pom ...
相关推荐
Gradle 是Java 软件开发中的自动化..., 因为Groovy 用于编写Gradle 构建配置的DSL,所以为了帮助读者更好地理解Gradle,《实战Gradle》还讲解了Groovy 的基本知识,虽然不是全方位地讲解Groovy,但是理解Gradle 足矣。
Gradle 是Java 软件开发中的自动化...因为Groovy 用于编写Gradle 构建配置的DSL,所以为了帮助读者更好地理解Gradle,《实战Gradle》还讲解了Groovy 的基本知识,虽然不是全方位地讲解Groovy,但是理解Gradle 足矣。
其中core模块是放一些基本的或公共的java类,web模块放的是web Controller,配置,页面.所以最终打包项目时,core应打成一个jar包,而web模块引用(依赖)core模块,对于web的java类也打起一个jar包,这两个jar包最后是放在...
质量检查:Gradle插件,其中包括Checkstyle,FindBugs和PMD基本配置
Java Gradle启动器 基于Java的gradle游乐场入门项目。... 见-与参数注入的gradle基本概况和 GitHub模板-在根文件夹中查看和.md文件 代码质量工具-Checkstyle,PMD和SpotBugs配置-请参见 克隆或下载
App开发过程中,基本都需要多个环境,比如开发环境develop,测试环境check,生产环境product。各个环境下,网络请求的url会有所区别,一般我们通过baseUrl进行切换。
此配置将对Junit4和TestNG使用gradle集成,并为单模块项目生成报告 buildscript { repositories { jcenter() } dependencies { classpath " io.qameta.allure:allure-gradle:<latest> " } } apply plugin : ' ...
Robospock 基本上可以让您使用备受赞誉的 spock 框架对 android 特定代码进行单元/集成测试,该框架使用规范驱动测试和使用groovy 的BDD(行为驱动开发)。 所有这一切都是使用roboelectric发生的,这避免了在实际 ...
xml java系统源码 Migrate To Gradle 手动迁移ADT 的ANT结构工程至Gradle 前言 ...中需要使用,基本上全都使用.gradle 文件来配置,是一个脚本化的工程构建,而非原先ADT中那种eclipse 的或视化构建。
要使用插件DSL或旧版插件应用程序配置Web3j Gradle插件,请检查。 运行该插件的最低Gradle版本是5.+ 。 然后运行包含Solidity合同的项目: ./gradlew build 应用插件后,生成代码的基本目录(默认情况下$buildDir/...
在Gradle中,有两个基本概念:项目和任务。请看以下详解: 项目是指我们的构建产物(比如Jar包)或实施产物(将应用程序部署到生产环境)。一个项目包含一个或多个任务。 任务是指不可分的最小工作单元,执行构建...
Docker Gradle插件 该存储库提供了三个用于Docker容器的Gradle插件: com.palantir.docker :基于一个简单的配置块,添加用于构建和推送com.palantir.docker基本任务,该配置块指定了容器名称,Dockerfile,任务依赖...
android项目gradle基本配置 android { compileSdkVersion 21 buildToolsVersion " 21.1.2 " defaultConfig { minSdkVersion 15 targetSdkVersion 21 versionCode 1 versionName " 1.0 " } buildTypes { ...
包含: Gradle多模块项目Spring Boot 2.0安装CircleCI 2.0基本设置使用MongoDb测试配置JUnit 5测试示例记录配置Gradle配置文件配置Docker撰写随意用于您自己的项目。使用开发人员配置文件运行应用程序./gradlew ...
xml java系统源码 Gradle Plugin User Guide 0. 前言 完全由个人翻译,能力有限,有些细节地方翻译不是很通顺,大家可以参考英文版本阅读...工程基本配置(Basic Project Setup) Gradle工程默认的配置文件名称是build
霸屏天下源码java Gradle Gradle 기초 什么是Gradle? Gradle 是一个开源构建自动化工具,专注于灵活性和性能。 Gradle 构建脚本是使用 ...高度可定制——Gradle 以最基本的方式可定制和可扩展的方式...您的构建脚本配置此
ssm开发基本骨架【含配置和注解两套】。 开发环境:Idea2022、JDK8、MySQL8.0.31、Gradle5.6.4
您现在可以解压缩PackageManager.zip并进入PackageManager文件夹配置应用您可以在config/package-manager.yml找到配置文件localRepo这是包含所有依赖项的文件列表的文件夹的路径gitRepo这是远程git存储库的URL,...
过去在Java或类Java的世界里,Ant、Maven再熟悉不过了,Maven凭借其强大的依赖配置战胜Ant,基本上成为了Java构建的标准。而在现代,系统日益复杂,构建的灵活性要求越来越高,比如:构建过程中需要打包上传到服务器...