Skip to content

Commit

Permalink
[ISSUE #325]Update gradle configuration for publishing package to mav…
Browse files Browse the repository at this point in the history
…en repository (#326)

* [ISSUE #325]Update gradle configuration for publishing package to maven repository

* update build.gradle

* update build.gradle and gradle.properties
  • Loading branch information
xwm1992 authored Apr 30, 2021
1 parent 117b4e5 commit 51153e4
Show file tree
Hide file tree
Showing 12 changed files with 74 additions and 351 deletions.
57 changes: 57 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ subprojects {
apply plugin: "pmd"
apply plugin: 'com.github.spotbugs'

apply plugin: 'signing'

[compileJava, compileTestJava, javadoc]*.options*.encoding = 'UTF-8'

compileJava.options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
Expand Down Expand Up @@ -293,15 +295,70 @@ subprojects {
archives packageSources
}

signing {
sign packageJavadoc, packageSources, jar
}

repositories {
maven { url "https://maven.aliyun.com/repository/public" }
mavenCentral()
mavenLocal()
}

configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, TimeUnit.SECONDS
resolutionStrategy.cacheDynamicVersionsFor 0, TimeUnit.SECONDS
}

uploadArchives {
repositories {
mavenDeployer {
beforeDeployment {
MavenDeployment deployment -> signing.signPom(deployment)
}
// 指定上传的路径
def releaseRepo = 'https://repository.apache.org/content/repositories/releases/'
def snapshotsRepo = 'https://repository.apache.org/content/repositories/snapshots/'
repository(url: releaseRepo) {
authentication(userName: apacheUserName, password: apachePassWord)
}

snapshotRepository(url: snapshotsRepo) {
authentication(userName: apacheUserName, password: apachePassWord)
}


pom.project {
name 'Apache EventMesh'
packaging 'jar'
// optionally artifactId can be defined here
description 'Apache EventMesh'
url 'https://github.com/apache/incubator-eventmesh'

scm {
connection 'scm:git:git@github.com:apache/incubator-eventmesh.git'
developerConnection 'scm:git:git@github.com:apache/incubator-eventmesh.git'
url 'https://github.com/apache/incubator-eventmesh'
}

licenses {
license {
name 'The Apache License, Version 2.0'
url 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}

developers {
developer {
id 'Apache EventMesh(incubating)'
name 'Apache EventMesh(incubating) of ASF'
url 'https://eventmesh.apache.org/'
}
}
}
}
}
}

}

13 changes: 0 additions & 13 deletions eventmesh-common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,6 @@ dependencies {
testCompile apache_commons, httpclient, guava, netty, fastjson, jackson
}

uploadArchives {
repositories {
mavenDeployer {
snapshotRepository(url: 'Your target repo address') {
authentication(userName: 'Your user name', password: 'Your password')
}
repository(url: 'Your target repo address') {
authentication(userName: 'Your user name', password: 'Your password')
}
}
}
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
1 change: 0 additions & 1 deletion eventmesh-common/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@
#
group=org.apache.eventmesh
version=1.2.0-SNAPSHOT
defibus_version=1.0.1
jdk=1.7
13 changes: 0 additions & 13 deletions eventmesh-connector-api/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,6 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12', open_message
}

uploadArchives {
repositories {
mavenDeployer {
snapshotRepository(url: 'Your target repo address') {
authentication(userName: 'Your user name', password: 'Your password')
}
repository(url: 'Your target repo address') {
authentication(userName: 'Your user name', password: 'Your password')
}
}
}
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
1 change: 0 additions & 1 deletion eventmesh-connector-rocketmq/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

group=org.apache.eventmesh
version=1.2.0
defibus_version=1.0.1
rocketmq_version=4.7.1
mavenUserName=
mavenPassword=
2 changes: 1 addition & 1 deletion eventmesh-runtime/bin/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function is_java8 {
#0(not running), 1(is running)
#function is_proxyRunning {
# local _pid="$1"
# local pid=`ps ax | grep -i 'com.webank.runtime.boot.EventMeshStartup' |grep java | grep -v grep | awk '{print $1}'|grep $_pid`
# local pid=`ps ax | grep -i 'org.apache.eventmesh.runtime.boot.EventMeshStartup' |grep java | grep -v grep | awk '{print $1}'|grep $_pid`
# if [ -z "$pid" ] ; then
# return 0
# else
Expand Down
6 changes: 3 additions & 3 deletions eventmesh-runtime/bin/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ function get_pid {
else
if [[ $OS =~ Msys ]]; then
# 在Msys上存在可能无法kill识别出的进程的BUG
ppid=`jps -v | grep -i "com.webank.runtime.boot.EventMeshStartup" | grep java | grep -v grep | awk -F ' ' {'print $1'}`
ppid=`jps -v | grep -i "org.apache.eventmesh.runtime.boot.EventMeshStartup" | grep java | grep -v grep | awk -F ' ' {'print $1'}`
elif [[ $OS =~ Darwin ]]; then
# 已知问题:grep java 可能无法精确识别java进程
ppid=$(/bin/ps -o user,pid,command | grep "java" | grep -i "com.webank.runtime.boot.EventMeshStartup" | grep -Ev "^root" |awk -F ' ' {'print $2'})
ppid=$(/bin/ps -o user,pid,command | grep "java" | grep -i "org.apache.eventmesh.runtime.boot.EventMeshStartup" | grep -Ev "^root" |awk -F ' ' {'print $2'})
else
#在Linux服务器上要求尽可能精确识别进程
ppid=$(ps -C java -o user,pid,command --cols 99999 | grep -w $EVENTMESH_HOME | grep -i "com.webank.runtime.boot.EventMeshStartup" | grep -Ev "^root" |awk -F ' ' {'print $2'})
ppid=$(ps -C java -o user,pid,command --cols 99999 | grep -w $EVENTMESH_HOME | grep -i "org.apache.eventmesh.runtime.boot.EventMeshStartup" | grep -Ev "^root" |awk -F ' ' {'print $2'})
fi
fi
echo "$ppid";
Expand Down
18 changes: 0 additions & 18 deletions eventmesh-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ repositories {
mavenCentral()
}

//List defibus = [
// "com.webank.defibus:defibus-client:$defibus_version",
// "com.webank.defibus:defibus-common:$defibus_version"
//]

List junit = [
"junit:junit:4.12"
]
Expand Down Expand Up @@ -144,17 +139,4 @@ task tar(type: Tar, dependsOn: ['clean', 'jar']) {
into('scripts') {
from "scripts"
}
}

uploadArchives {
repositories {
mavenDeployer {
snapshotRepository(url: 'Your target repo address') {
authentication(userName: 'Your user name', password: 'Your password')
}
repository(url: 'Your target repo address') {
authentication(userName: 'Your user name', password: 'Your password')
}
}
}
}
6 changes: 1 addition & 5 deletions eventmesh-runtime/conf/log4j2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="com.webank.runtime" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

<AsyncLogger name="com.webank.defibus" level="debug" additivity="false" includeLocation="true">
<AsyncLogger name="org.apache.eventmesh.runtime" level="debug" additivity="false" includeLocation="true">
<AppenderRef ref="console"/>
</AsyncLogger>

Expand Down
Loading

0 comments on commit 51153e4

Please sign in to comment.