Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
# Conflicts:
#	build.gradle
  • Loading branch information
amethystlilj committed Feb 22, 2019
2 parents 05f1f70 + 31eb526 commit bde1ce9
Show file tree
Hide file tree
Showing 36 changed files with 710 additions and 404 deletions.
58 changes: 39 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,32 +1,42 @@
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
classpath "io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE"
}
}

allprojects {
group = 'com.datatrees.spider'
version = '4.1.0'
version = '4.2.0'
}

ext {
env = System.getProperty("env", "dev")
}

buildscript {
repositories {
maven { url "http://192.168.5.252:8081/nexus/content/groups/public/" }
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:1.5.9.RELEASE'
}
}

subprojects {

apply plugin: "java"
apply plugin: "idea"
apply plugin: "eclipse"
apply plugin: "maven"
apply plugin: 'maven-publish'
apply plugin: "io.spring.dependency-management"

dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:${springBootVersion}")
}
}

sourceCompatibility = 1.8
targetCompatibility = 1.8

idea {
module {
downloadSources = true
Expand All @@ -39,7 +49,6 @@ subprojects {
compile.extendsFrom provided
deployerJars

// all*.exclude group: "org.springframework", module: "spring"
all*.exclude group: "log4j", module: "log4j"
all*.exclude group: "org.slf4j", module: "slf4j-log4j12"
all*.exclude group: "com.datatrees.rawdata", module: "AbstractPlugin"
Expand All @@ -51,7 +60,7 @@ subprojects {
}

dependencies {
testCompile "junit:junit:${junitVersion}"
testCompile("junit:junit")
}


Expand All @@ -65,7 +74,8 @@ subprojects {
}

repositories {
maven { url "http://192.168.5.252:8081/nexus/content/groups/public/" }
mavenLocal()
maven { url NEXUS_REPO_URL }
maven { url "http://maven.aliyun.com/nexus/content/groups/public/" }
}

Expand All @@ -82,18 +92,28 @@ subprojects {
repositories {
mavenDeployer {
configuration = configurations.deployerJars
snapshotRepository(url: "http://192.168.5.252:8081/nexus/content/repositories/snapshots/") {
authentication(userName: "admin", password: "admin123")
snapshotRepository(url: NEXUS_REPO_SNAPSHOT_URL) {
authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
}
repository(url: "http://192.168.5.252:8081/nexus/content/repositories/releases/") {
authentication(userName: "admin", password: "admin123")
repository(url: NEXUS_REPO_RELEASE_URL) {
authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD)
}
}

}
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java

artifact sourcesJar {
classifier "sources"
}
}
}
}
}


44 changes: 16 additions & 28 deletions crawler-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
ext {
dsiutils = "2.0.14"
htmlcleaner = "2.13"
jaxen = "1.1.4"
jsoup = "1.7.2"
jodaTime = "2.7"
apacheMime4j = "0.6.1"
toolkit = "1.0.12.6-SNAPSHOT"
}

dependencies {
compile project(':spider-share-common')
compile "com.treefinance.toolkit:toolkit:${toolkit}"
compile "com.google.guava:guava:${guavaVersion}"
compile 'commons-httpclient:commons-httpclient:3.1'
compile 'com.ibm.icu:icu4j:59.1'
compile("com.treefinance.toolkit:toolkit:${toolkit}")
compile("com.google.guava:guava:${guavaVersion}")
compile('commons-httpclient:commons-httpclient:3.1')
compile('com.ibm.icu:icu4j:59.1')
compile(group: "com.datatrees.common", name: "common-conf", version: "${commonConfVersion}", changing: true) {
exclude module: 'guava'
}
Expand All @@ -26,20 +16,18 @@ dependencies {
compile("it.unimi.dsi:dsiutils:${dsiutils}"){
exclude module: 'guava'
}
compile "org.slf4j:log4j-over-slf4j:${slf4jVersion}"
compile "org.slf4j:jcl-over-slf4j:${slf4jVersion}"
compile "net.sourceforge.htmlcleaner:htmlcleaner:${htmlcleaner}"
compile "org.jdom:jdom2:${jdom2Version}"
compile "jaxen:jaxen:${jaxen}"
compile "com.jayway.jsonpath:json-path:${jsonPathVersion}"
compile "org.jsoup:jsoup:${jsoup}"
compile "org.apache.commons:commons-exec:${commonsExecVersion}"
compile "joda-time:joda-time:${jodaTime}"
compile "org.apache.james:apache-mime4j:${apacheMime4j}"
compile ("org.seleniumhq.selenium:selenium-java:${seleniumVersion}"){
exclude(module: "guava")
}
testCompile "javax.mail:mail:${mailVersion}"
compile("org.slf4j:log4j-over-slf4j")
compile("org.slf4j:jcl-over-slf4j")
compile("net.sourceforge.htmlcleaner:htmlcleaner:${htmlcleaner}")
compile("org.jdom:jdom2")
compile("jaxen:jaxen")
compile("com.jayway.jsonpath:json-path")
compile("org.jsoup:jsoup:${jsoup}")
compile("org.apache.commons:commons-exec:${commonsExecVersion}")
compile("joda-time:joda-time")
compile("org.apache.james:apache-mime4j:${apacheMime4j}")
compile("org.seleniumhq.selenium:selenium-java")
testCompile("javax.mail:mail:${mailVersion}")
}


Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright © 2015 - 2019 杭州大树网络技术有限公司. All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.treefinance.crawler.framework;

import com.treefinance.crawler.framework.util.CookieFormater;
import com.treefinance.crawler.support.selenium.WebDriverFactory;
import org.junit.Test;
import org.openqa.selenium.Cookie;
import org.openqa.selenium.WebDriver;

import java.util.Map;

/**
* @author Jerry
* @date 2019-02-20 19:57
*/
public class SeleniumTest {

@Test
public void test() {
String cookies = "ALIPAYJSESSIONID=RZ11PRBFSNCFmX9litG0E3NWd7paTwauthRZ11GZ00;"
+ "CHAIR_SESS=JWYmdXvINYrjfJhNfnAOAgXN2lTyJ7veaMyDOlqV8dWzNpJknIpzFUa26WlSqle4crTRVSYVgV_UBr5hAHPPbWoeijIV4ReeWGbiuKIdPeERtYyuQdo1bwHC5O6eNAvIjpAaIo83kWPMT7ZMk4qTE_crxzJuuQWrrZ0qCjuAvAmvjH8X1lKWIdeaJ4VmDRxcyLtStY8BNTG2J7iPBp6ihx_ONNluR5Dp2LtsUhbSoccca9sanq-cMhRYTm83Vq5C;CLUB_ALIPAY_COM=2088202440742366;JSESSIONID=RZ11PRBFSNCFmX9litG0E3NWd7paTwauthRZ11GZ00;LoginForm=trust_login_taobao;_cc_=VT5L2FSpdA%3D%3D;_l_g_=Ug%3D%3D;_m_h5_tk=3522a0a268b1fda1c78ce0f9ce59dee8_1550675043312;_m_h5_tk_enc=3dc47ddd983ab21faea86ab1292f22d3;_mw_us_time_=1550667125839;_nk_=%5Cu5929%5Cu5992%5Cu7D2B%5Cu51B0;_tb_token_=f773b8ebb15e4;_uab_collina=155066711151520123495269;ali_apache_tracktmp=uid=2088202440742366;alipay=K1iSL1vgJ4arX8lKfgUAYBR6R5CY71mEeTHQtTb2jqJ/W26HtvHSUqw=;cna=Zzv0FPvG3FYCAXQ+eNXABMgt;cookie1=UUjTSNclpskoZW2uLa2Z%2BvQXwtjuCO3hQSteLhB2Zzg%3D;cookie17=UNDUKres6nA2;cookie2=10454c14987fa2d911c71366a70399d5;cookieCheck=21864;csg=6c49debe;ctoken=iWZnUw5qMdlQip9_;dnk=%5Cu5929%5Cu5992%5Cu7D2B%5Cu51B0;existShop=MTU1MDY2NzExNQ%3D%3D;isg=BNjYdxl1MNYDfhxSj9KVEXpoqgCqafcRUOI5dBLJJJPGrXiXutEM2-6P4SU4pvQj;iw.nick=Jva2hcOz;iw.partner=Lfo3AA==;iw.userid=K1iSL1vgJ4arX8lKfgUAYA==;lc=VypRGeZafTRg8CdHUQ%3D%3D;lgc=%5Cu5929%5Cu5992%5Cu7D2B%5Cu51B0;lid=%E5%A4%A9%E5%A6%92%E7%B4%AB%E5%86%B0;log=lty=UQ%3D%3D;mt=np=;publishItemObj=Ng%3D%3D;session.cookieNameId=ALIPAYJSESSIONID;sg=%E5%86%B04a;skt=5c65cc78af28ebaa;spanner=EQvl1u4c2xlK82Ra2mljNB1bVD0QwwfaXt2T4qEYgj0=;t=0c2e04d862b2901bd2d36d6eec688087;tbcp=f=UUjZel8%2FHoXKxgPW03Tc90jXvRc%3D&e=VynJ%2FlLyhEuUovNWGYGVCQ%3D%3D;tg=0;tracknick=%5Cu5929%5Cu5992%5Cu7D2B%5Cu51B0;uc1=cookie16=U%2BGCWk%2F74Mx5tgzv3dWpnhjPaQ%3D%3D&cookie21=UtASsssme%2BBq&cookie15=V32FPkk%2Fw0dUvg%3D%3D&existShop=false&pas=0&cookie14=UoTZ5Oa2mqK93g%3D%3D&tag=8&lng=zh_CN;uc3=vt3=F8dByEzc6LbU7GvWKWI%3D&id2=UNDUKres6nA2&nk2=r7lQMdIz9Uk%3D&lg2=U%2BGCWk%2F75gdr5Q%3D%3D;ucn=center;umt=C2b1630ce1764af265a35091000847d2f;unb=300581884;v=0;zone=GZ00D";

WebDriver webDriver = WebDriverFactory.makeFirefoxDriver("");

webDriver.get("https://www.alipay.com/favicon.ico");

WebDriver.Options manage = webDriver.manage();
//添加最新的cookies
manage.deleteAllCookies();
Map<String, String> cookieMap = CookieFormater.INSTANCE.parserCookieToMap(cookies);
for (Map.Entry<String, String> entry : cookieMap.entrySet()) {
manage.addCookie(new Cookie(entry.getKey(), entry.getValue(), "alipay.com", "/", null));
}

webDriver.navigate().to("https://my.alipay.com/portal/i.htm");

webDriver.navigate().to("https://consumeprod.alipay.com/record/advanced.htm");

webDriver.quit();
}
}
100 changes: 53 additions & 47 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,59 +2,65 @@ org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
org.gradle.parallel=true
org.gradle.configureondemand=true
springBootVersion=1.5.9.RELEASE
springVersion=4.3.13.RELEASE
mybatisSpringBootStarterVersion=1.3.1
springBootStarterRedisVersion=1.4.7.RELEASE
commonsLang3Version=3.7
commonsIoVersion=2.6
commonsExecVersion=1.1
fastjsonVersion=1.2.47
jdom2Version=2.0.6
groovyAllVersion=2.4.13
slf4jVersion=1.7.25
# nexus私服仓库的URL
NEXUS_REPO_URL=http://192.168.5.252:8081/nexus/content/groups/public/
NEXUS_REPO_RELEASE_URL=http://192.168.5.252:8081/nexus/content/repositories/releases/
NEXUS_REPO_SNAPSHOT_URL=http://192.168.5.252:8081/nexus/content/repositories/snapshots/
#登录nexus的用户名
NEXUS_USERNAME=admin
NEXUS_PASSWORD=admin123
# framework
springBootVersion=1.5.19.RELEASE
superDiamondClientVersion=2.1.0
ibatisSqlmapVersion=2.3.4.726
springIbatisVersion=2.0.8
mysqlConnectorJavaVersion=6.0.6
commonsDbcpVersion=1.4
springDataRedisVersion=1.8.9.RELEASE
jedisVersion=2.9.0
poiVersion=3.10.1
aliyunSdkOssVersion=3.1.0
antVersion=1.6.5
mailVersion=1.4.7
jeVersion=5.0.73
guavaVersion=24.1-jre
junitVersion=4.12
rocketmqClientVersion=3.5.8
redissonVersion=3.10.2
# database dependencies
mybatisSpringBootStarterVersion=1.3.3
druidVersion=1.1.13
# intergration dependencies
aliyunSdkOssVersion=3.4.1
dubboVersion=2.6.0
zkclientVersion=0.10
javassistVersion=3.21.0-GA
druidVersion=1.1.0
javaxMailVersion=1.6.0-rc2
pluginUtilsVersion=1.2.0
htmlunitVersion=2.27
commonsCodecVersion=1.11
proxyApiVersion=2.2.0
jsonPathVersion=2.3.0
rocketmqClientVersion=3.5.8
seleniumVersion=3.10.0
redissonVersion=3.5.7
zookeeperVersion=3.4.10
# custom commons dependencies
commonConfVersion=2.1.2
commonUtilVersion=2.1.2
commonZookeeperVersion=2.1.2
commonMessageVersion=2.1.2
httpclientVersion=4.5.5
#覆盖Spring boot的依赖版本
selenium.version=${seleniumVersion}
json-path.version=${jsonPathVersion}
httpclient.version=${httpclientVersion}
htmlunit.version=${htmlunitVersion}
commons-codec.version=${commonsCodecVersion}
commons-pool2.version=2.5.0
userCenterApi=1.3.2
# common dependencies
toolkit=1.0.12.6
commonsLang3Version=3.8.1
commonsExecVersion=1.3
commonsIoVersion=2.6
fastjsonVersion=1.2.56
guavaVersion=27.0.1-jre
jsoupXpathVersion=0.3.2
hessianVersion=4.0.38
googleZxingVersion=3.3.3
jeVersion=5.0.73
pdfbox=2.0.2
fontverter=1.2.18
loanProviderApi=3.0.3
riskServiceApi=1.5.0
jxl=2.6.12
jxl=2.6.12
antVersion=1.6.5
dsiutils=2.0.14
htmlcleaner=2.13
jsoup=1.7.2
apacheMime4j=0.6.1
mailVersion=1.4.7
# dubbo api
proxyApiVersion=2.2.0
merchantCenterVersion=2.1.0-SNAPSHOT
taskCenterVersion=2.1.2-SNAPSHOT
notifySvcVersion=3.5.6
#覆盖Spring boot的依赖版本
selenium.version=3.10.0
json-path.version=2.3.0
httpclient.version=4.5.7
httpcore.version=4.4.11
htmlunit.version=2.33
commons-codec.version=1.12
slf4j.version=1.7.26
snakeyaml.version=1.23
joda-time.version=2.10.1
javax-mail.version=1.6.0-rc2
jackson.version=2.9.8
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ include 'spider-share-common'
include 'spider-share-dao'
include 'spider-share-api'
include 'spider-share-web'

include 'spider-share-integration'

32 changes: 17 additions & 15 deletions spider-share-common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
dependencies {
compile project(':spider-share-domain')
compile project(':spider-share-integration')

compile "org.apache.commons:commons-lang3:${commonsLang3Version}"
compile 'org.apache.commons:commons-exec:1.3'
compile "org.apache.commons:commons-exec:${commonsExecVersion}"
compile "commons-io:commons-io:${commonsIoVersion}"
compile "commons-codec:commons-codec:${commonsCodecVersion}"
compile("commons-codec:commons-codec")
compile "com.alibaba:fastjson:${fastjsonVersion}"
compile "org.apache.httpcomponents:httpclient:${httpclientVersion}"
compile 'cn.wanghaomiao:JsoupXpath:0.3.2'
compile 'com.caucho:hessian:4.0.38'
compile "redis.clients:jedis:${jedisVersion}"
compile "com.jayway.jsonpath:json-path:${jsonPathVersion}"
compile "net.sourceforge.htmlunit:htmlunit:${htmlunitVersion}"
compile("org.apache.httpcomponents:httpclient")
compile "cn.wanghaomiao:JsoupXpath:${jsoupXpathVersion}"
compile "com.caucho:hessian:${hessianVersion}"
compile("com.jayway.jsonpath:json-path")
compile("net.sourceforge.htmlunit:htmlunit")
compile "com.google.guava:guava:${guavaVersion}"
compile 'com.google.zxing:core:3.3.3'
compile "com.google.zxing:core:${googleZxingVersion}"
compile("org.springframework.boot:spring-boot")
compile(group: "com.github.diamond", name: "super-diamond-client", version: "${superDiamondClientVersion}", changing: true) {
exclude(module: 'guava')
exclude(module: 'logback-access')
}
compile "com.alibaba.rocketmq:rocketmq-client:${rocketmqClientVersion}"
compile("org.springframework.boot:spring-boot-starter-data-redis")
compile "org.redisson:redisson:${redissonVersion}"
compile "org.springframework.boot:spring-boot:${springBootVersion}"

compile "com.treefinance.proxy:proxy-api:${proxyApiVersion}"



}


Loading

0 comments on commit bde1ce9

Please sign in to comment.