Skip to content
Permalink
Browse files
Add build binary tar package and add a script to install dolphincsche…
…duler maven plugin to local repository
  • Loading branch information
EricJoy2048 committed Aug 6, 2020
1 parent caba64e commit b245b3336721f30627c206885b3e1d2b202672dd
Showing 5 changed files with 105 additions and 3 deletions.
@@ -16,11 +16,11 @@ With this maven plug-in, by scanning the pom file of the project ,The pluginload

### How to verify the release candidate

1. Download the apache-dolphinscheduler-maven-plugin-incubating-${RELEASE.VERSION}-src.zip file from `the release candidates` (it will be provided in the vote email).
1. Download the apache-dolphinscheduler-maven-plugin-incubating-${RELEASE.VERSION}-bin.tar.gz file from `the release candidates` (it will be provided in the vote email).

2. unzip the apache-dolphinscheduler-maven-plugin-incubating-${RELEASE.VERSION}-src.zip file
2. Unzip the apache-dolphinscheduler-maven-plugin-incubating-${RELEASE.VERSION}-bin.tar.gz file

3. cd apache-dolphinscheduler-maven-plugin-incubating-${RELEASE.VERSION}-src-release and run `mvn clean install -DskipTests=true`
3. Go to apache-dolphinscheduler-maven-plugin-incubating-${RELEASE.VERSION}-bin/bin dir and run `chmod 755 install_to_localrepository.sh & sh install_to_localrepository.sh`. This will install apache-dolphinscheduler-maven-plugin to your local repository.

4. add this plugin to your project`s pom.xml file like this:
15 pom.xml
@@ -115,6 +115,7 @@
<groupId>org.apache.maven</groupId>
<artifactId>maven-artifact</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>

<!-- for testing -->
@@ -181,6 +182,20 @@
<appendAssemblyId>true</appendAssemblyId>
</configuration>
</execution>
<execution>
<id>bin</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>

<configuration>
<descriptors>
<descriptor>src/main/assembly/dolphinscheduler-binary.xml</descriptor>
</descriptors>
<appendAssemblyId>true</appendAssemblyId>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
@@ -0,0 +1,70 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one or more
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~ The ASF licenses this file to You 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.
-->

<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>bin</id>
<formats>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>true</includeBaseDirectory>
<baseDirectory>${project.build.finalName}-bin</baseDirectory>

<fileSets>
<!--alert start-->
<fileSet>
<directory>${basedir}/target/dolphinscheduler-server-${project.version}</directory>
<includes>
<include>**/*.*</include>
</includes>
<outputDirectory>.</outputDirectory>
</fileSet>
<fileSet>
<directory>${basedir}/src/main/resources/bin</directory>
<includes>
<include>**/*.sh</include>
</includes>
<outputDirectory>bin</outputDirectory>
</fileSet>
<fileSet>
<directory>${basedir}/.././</directory>
<includes>
<include>DISCLAIMER</include>
</includes>
<outputDirectory>.</outputDirectory>
</fileSet>

<fileSet>
<directory>${basedir}/release-docs</directory>
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<include>**/*</include>
</includes>
<outputDirectory>.</outputDirectory>
</fileSet>

</fileSets>

<dependencySets>
<dependencySet>
<outputDirectory>lib</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
</dependencySet>
</dependencySets>
</assembly>
@@ -76,6 +76,9 @@
<!-- system ignore -->
<exclude>**/.DS_Store</exclude>
<exclude>**/Thumbs.db</exclude>

<!-- binary release ignore-->
<exclude>release-docs/**</exclude>
</excludes>
</fileSet>
</fileSets>
@@ -0,0 +1,14 @@
#!/bin/bash

basepath=$(cd `dirname $0`; pwd)

cd $basepath
cd ../lib

plugin_jar=`ls | grep dolphinscheduler-maven-plugin-*.jar`

#get the version
version_tmp=`echo $plugin_jar | awk '{split($0,b,"dolphinscheduler-maven-plugin-");print b[2]}'`
version=`echo $version_tmp | awk '{split($0,b,".jar");print b[1]}'`
mvn install:install-file -Dfile=$plugin_jar -DgroupId=org.apache.dolphinscheduler -DartifactId=dolphinscheduler-maven-plugin -Dversion=$version -Dpackaging=jar

0 comments on commit b245b33

Please sign in to comment.