Skip to content

Commit

Permalink
update bash file
Browse files Browse the repository at this point in the history
  • Loading branch information
lichong-a committed Sep 1, 2022
1 parent 6e382a8 commit 2c1cd84
Show file tree
Hide file tree
Showing 2 changed files with 150 additions and 0 deletions.
25 changes: 25 additions & 0 deletions scripts/mvn-update-versions.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
@echo off

if "%1"=="" (

echo input version
set /p version=
) else (

set version=%1
)

if "%version%"=="" (

echo version is empty
exit 1
)

echo new version:%version%

cd ../

call ./mvnw -s ./scripts/settings.xml versions:set -DgenerateBackupPoms=false -DoldVersion=* -DnewVersion=%version% -DprocessAllModules=true -DallowSnapshots=true
echo 版本修改完成

pause
125 changes: 125 additions & 0 deletions scripts/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
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.
-->

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<localRepository>D:\localRepository</localRepository>

<offline>false</offline>
<pluginGroups>
</pluginGroups>

<proxies>
</proxies>

<servers>
</servers>

<mirrors>
<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
</mirrors>

<profiles>
<profile>
<id>jdk-11</id>
<activation>
<activeByDefault>true</activeByDefault>
<jdk>11</jdk>
</activation>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.compilerVersion>11</maven.compiler.compilerVersion>
</properties>
</profile>

<profile>
<id>releases</id>
<repositories>
<repository>
<id>releases</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>releases</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>

<profile>
<!--this profile will allow snapshots to be searched when activated-->
<id>snapshots</id>
<repositories>
<repository>
<id>snapshots</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>snapshots</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>

<activeProfiles>
<activeProfile>jdk-11</activeProfile>
<activeProfile>releases</activeProfile>
<activeProfile>snapshots</activeProfile>
</activeProfiles>
</settings>

0 comments on commit 2c1cd84

Please sign in to comment.