msgui commented on code in PR #2296:
URL: 
https://github.com/apache/incubator-hugegraph/pull/2296#discussion_r1305894070


##########
.github/workflows/ci.yml:
##########
@@ -7,11 +7,12 @@ on:
       - 'release-*'
       - 'test-*'
   pull_request:
-
+    
 jobs:
   build:
     runs-on: ubuntu-20.04
     env:
+      USE_STAGE: 'true'

Review Comment:
   **'USE_STAGE'**  is used to determine whether to include the stage 
repository.



##########
.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?
   
   @imbajin  cache action will overwrite/reset settings.xml, so we need to 
specifically exclude ~/m2/settings.xml



-- 
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]

Reply via email to