Skip to content

Commit

Permalink
重构pom
Browse files Browse the repository at this point in the history
  • Loading branch information
luanjia committed Feb 25, 2018
1 parent f40e71e commit da70324
Show file tree
Hide file tree
Showing 11 changed files with 94 additions and 31 deletions.
21 changes: 21 additions & 0 deletions bin/set-version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

while getopts "sr" ARG
do
case ${ARG} in
s)
OP_SNAPSHOT=1;
shift $((OPTIND-1))
;;
r)
OP_RELEASE=1;
shift $((OPTIND-1))
;;
esac
done

[[ ${OP_SNAPSHOT} ]] && NEW_VERSION=${1}-"SNAPSHOT"
[[ ${OP_RELEASE} ]] && NEW_VERSION=${1}

echo "set project to new version: ${NEW_VERSION}"
mvn -f ../pom.xml versions:set -DoldVersion=* -DnewVersion=${NEW_VERSION} -DprocessAllModules=true -DallowSnapshots=true
29 changes: 13 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@

<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.0</version>
<version>1.0.11-SNAPSHOT</version>
<packaging>pom</packaging>

<name>sandbox ${project.version}</name>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<sandbox.api.version>1.0.10</sandbox.api.version>
<sandbox.provider.api.version>1.0.1</sandbox.provider.api.version>
<sandbox.common.api.version>1.0.2</sandbox.common.api.version>
</properties>

<build>
<plugins>
<plugin>
<artifactId>versions-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<version>2.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down Expand Up @@ -87,30 +89,25 @@

<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.9</version>
</dependency>
<dependency>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox-api</artifactId>
<version>${sandbox.api.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox-provider-api</artifactId>
<version>${sandbox.provider.api.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox-common-api</artifactId>
<version>${sandbox.common.api.version}</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox-spy</artifactId>
<version>1.0.0</version>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down Expand Up @@ -256,9 +253,9 @@
</developers>

<scm>
<connection>scm:git:https://github.com/alibaba/JVM-Sandbox.git</connection>
<developerConnection>scm:git:https://github.com/alibaba/JVM-Sandbox.git</developerConnection>
<url>https://github.com/alibaba/JVM-Sandbox</url>
<connection>scm:git:https://github.com/alibaba/jvm-Sandbox.git</connection>
<developerConnection>scm:git:https://github.com/alibaba/jvm-Sandbox.git</developerConnection>
<url>https://github.com/alibaba/jvm-Sandbox</url>
</scm>


Expand Down
10 changes: 9 additions & 1 deletion sandbox-agent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.0</version>
<version>1.0.11-SNAPSHOT</version>
</parent>
<artifactId>sandbox-agent</artifactId>
<name>sandbox-agent ${project.version}</name>
Expand Down Expand Up @@ -39,6 +39,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
5 changes: 2 additions & 3 deletions sandbox-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.0</version>
<version>1.0.11-SNAPSHOT</version>
</parent>
<artifactId>sandbox-api</artifactId>
<version>${sandbox.api.version}</version>
<name>sandbox-api ${sandbox.api.version}</name>
<name>sandbox-api ${project.version}</name>

<dependencies>
<dependency>
Expand Down
5 changes: 2 additions & 3 deletions sandbox-common-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>com.alibaba.jvm.sandbox</groupId>
<version>1.0.0</version>
<version>1.0.11-SNAPSHOT</version>
</parent>
<artifactId>sandbox-common-api</artifactId>
<version>${sandbox.common.api.version}</version>
<name>sandbox-common-api ${sandbox.common.api.version}</name>
<name>sandbox-common-api ${project.version}</name>
<dependencies>
<dependency>
<groupId>javax.annotation</groupId>
Expand Down
10 changes: 9 additions & 1 deletion sandbox-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.0</version>
<version>1.0.11-SNAPSHOT</version>
</parent>
<artifactId>sandbox-core</artifactId>
<name>sandbox-core ${project.version}</name>
Expand Down Expand Up @@ -36,6 +36,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
10 changes: 9 additions & 1 deletion sandbox-debug-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.0</version>
<version>1.0.11-SNAPSHOT</version>
</parent>
<artifactId>sandbox-debug-module</artifactId>
<name>sandbox-debug-module ${project.version}</name>
Expand All @@ -31,6 +31,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
10 changes: 9 additions & 1 deletion sandbox-mgr-module/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>com.alibaba.jvm.sandbox</groupId>
<version>1.0.0</version>
<version>1.0.11-SNAPSHOT</version>
</parent>
<artifactId>sandbox-mgr-module</artifactId>
<name>sandbox-mgr-module ${project.version}</name>
Expand All @@ -31,6 +31,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
10 changes: 9 additions & 1 deletion sandbox-mgr-provider/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>com.alibaba.jvm.sandbox</groupId>
<version>1.0.0</version>
<version>1.0.11-SNAPSHOT</version>
</parent>
<artifactId>sandbox-mgr-provider</artifactId>
<name>sandbox-mgr-provider ${project.version}</name>
Expand All @@ -30,6 +30,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
5 changes: 2 additions & 3 deletions sandbox-provider-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
<parent>
<artifactId>sandbox</artifactId>
<groupId>com.alibaba.jvm.sandbox</groupId>
<version>1.0.0</version>
<version>1.0.11-SNAPSHOT</version>
</parent>
<artifactId>sandbox-provider-api</artifactId>
<version>${sandbox.provider.api.version}</version>
<name>sandbox-provider-api ${sandbox.provider.api.version}</name>
<name>sandbox-provider-api ${project.version}</name>

<dependencies>
<dependency>
Expand Down
10 changes: 9 additions & 1 deletion sandbox-spy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.alibaba.jvm.sandbox</groupId>
<artifactId>sandbox</artifactId>
<version>1.0.0</version>
<version>1.0.11-SNAPSHOT</version>
</parent>
<artifactId>sandbox-spy</artifactId>
<name>sandbox-spy ${project.version}</name>
Expand All @@ -31,6 +31,14 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit da70324

Please sign in to comment.