imbajin commented on code in PR #2296:
URL:
https://github.com/apache/incubator-hugegraph/pull/2296#discussion_r1309836054
##########
.github/workflows/check-dependencies.yml:
##########
@@ -23,6 +24,16 @@ jobs:
with:
java-version: '11'
distribution: 'adopt'
+
+ - name: copy maven settings
+ run: |
+ cp $HOME/.m2/settings.xml /tmp/settings.xml
+
+ - name: Modify settings.xml
+ if: ${{ env.USE_STAGE == 'true' }}
+ run: |
+ sed -i
's/<\/settings>/<profiles><profile><id>local-repo<\/id><repositories><repository><id>central<\/id><url>https:\/\/repo.maven.apache.org\/maven2<\/url><releases><enabled>true<\/enabled><\/releases><snapshots><enabled>false<\/enabled><\/snapshots><\/repository><repository><id>staged-releases<\/id><url>https:\/\/repository.apache.org\/content\/groups\/staging\/<\/url><\/repository><\/repositories><pluginRepositories><pluginRepository><id>staged-releases<\/id><url>https:\/\/repository.apache.org\/content\/groups\/staging\/<\/url><\/pluginRepository><\/pluginRepositories><\/profile><\/profiles><activeProfiles><activeProfile>local-repo<\/activeProfile><\/activeProfiles><\/settings>/'
$HOME/.m2/settings.xml
Review Comment:
TODO: better to align them in future (not in one line)
##########
.github/workflows/check-dependencies.yml:
##########
@@ -23,6 +24,16 @@ jobs:
with:
java-version: '11'
distribution: 'adopt'
+
+ - name: copy maven settings
+ run: |
+ cp $HOME/.m2/settings.xml /tmp/settings.xml
+
+ - name: Modify settings.xml
Review Comment:
merge 2 step into one? seems no need to separate them
##########
.github/workflows/ci.yml:
##########
@@ -34,10 +35,25 @@ jobs:
java-version: ${{ matrix.JAVA_VERSION }}
distribution: 'zulu'
+ - name: copy maven settings
+ run: |
+ cp $HOME/.m2/settings.xml /tmp/settings.xml
+
+ - name: Modify maven settings
+ if: ${{ env.USE_STAGE == 'true' }}
+ run: |
+ sed -i
's/<\/settings>/<profiles><profile><id>local-repo<\/id><repositories><repository><id>central<\/id><url>https:\/\/repo.maven.apache.org\/maven2<\/url><releases><enabled>true<\/enabled><\/releases><snapshots><enabled>false<\/enabled><\/snapshots><\/repository><repository><id>staged-releases<\/id><url>https:\/\/repository.apache.org\/content\/groups\/staging\/<\/url><\/repository><\/repositories><pluginRepositories><pluginRepository><id>staged-releases<\/id><url>https:\/\/repository.apache.org\/content\/groups\/staging\/<\/url><\/pluginRepository><\/pluginRepositories><\/profile><\/profiles><activeProfiles><activeProfile>local-repo<\/activeProfile><\/activeProfiles><\/settings>/'
$HOME/.m2/settings.xml
+
+ - name: cat settings profile
+ run: |
+ cat $HOME/.m2/settings.xml
+
- name: Cache Maven packages
uses: actions/cache@v3
with:
- path: ~/.m2
+ path:
+ ~/.m2
+ !~/.m2/settings.xml
Review Comment:
why exclude it?
##########
.github/workflows/codeql-analysis.yml:
##########
@@ -33,6 +35,15 @@ jobs:
distribution: 'zulu'
java-version: '11'
+ - name: copy maven settings
+ run: |
+ cp $HOME/.m2/settings.xml /tmp/settings.xml
+
+ - name: Modify settings.xml
+ if: ${{ env.USE_STAGE == 'true' }}
+ run: |
+ sed -i
's/<\/settings>/<profiles><profile><id>local-repo<\/id><repositories><repository><id>central<\/id><url>https:\/\/repo.maven.apache.org\/maven2<\/url><releases><enabled>true<\/enabled><\/releases><snapshots><enabled>false<\/enabled><\/snapshots><\/repository><repository><id>staged-releases<\/id><url>https:\/\/repository.apache.org\/content\/groups\/staging\/<\/url><\/repository><\/repositories><pluginRepositories><pluginRepository><id>staged-releases<\/id><url>https:\/\/repository.apache.org\/content\/groups\/staging\/<\/url><\/pluginRepository><\/pluginRepositories><\/profile><\/profiles><activeProfiles><activeProfile>local-repo<\/activeProfile><\/activeProfiles><\/settings>/'
$HOME/.m2/settings.xml
Review Comment:
or maybe we should add the `stage-version` settings.xml in the
`.github/configs/settings.xml` & override it directly? (to avoid hard-code
everywhere
##########
.github/workflows/codeql-analysis.yml:
##########
@@ -33,6 +35,15 @@ jobs:
distribution: 'zulu'
java-version: '11'
+ - name: copy maven settings
+ run: |
+ cp $HOME/.m2/settings.xml /tmp/settings.xml
+
+ - name: Modify settings.xml
+ if: ${{ env.USE_STAGE == 'true' }}
Review Comment:
same
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]