This is an automated email from the ASF dual-hosted git repository.

jin pushed a commit to branch pd-store
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git


The following commit(s) were added to refs/heads/pd-store by this push:
     new 0903e900e feat: support visit of stage repository (#2305)
0903e900e is described below

commit 0903e900e49d457c18bc6aa4b1efb0761c884d1d
Author: M <[email protected]>
AuthorDate: Wed Sep 6 22:22:27 2023 +0800

    feat: support visit of stage repository (#2305)
    
    * add: stage repository
    
    * feat: enable user access to stage repo
    
    * feat: support jdk8 compilation, exclude jdk11-only modules
    
    * fix:  jdk version
    
    * fix:apply suggestions
    
    Co-authored-by: imbajin <[email protected]>
    
    * Update pom.xml
    
    ---------
    
    Co-authored-by: imbajin <[email protected]>
---
 .github/configs/settings.xml             | 43 ++++++++++++++++++++++++++++++++
 .github/workflows/check-dependencies.yml |  6 +++++
 .github/workflows/ci.yml                 | 10 ++++++++
 .github/workflows/codeql-analysis.yml    |  8 ++++++
 pom.xml                                  | 29 +++++++++++++++++++--
 5 files changed, 94 insertions(+), 2 deletions(-)

diff --git a/.github/configs/settings.xml b/.github/configs/settings.xml
new file mode 100644
index 000000000..45c87139a
--- /dev/null
+++ b/.github/configs/settings.xml
@@ -0,0 +1,43 @@
+<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 
https://maven.apache.org/xsd/settings-1.0.0.xsd";>
+    <servers>
+        <server>
+            <id>github</id>
+            <username>${env.GITHUB_ACTOR}</username>
+            <password>${env.GITHUB_TOKEN}</password>
+        </server>
+    </servers>
+
+    <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>
diff --git a/.github/workflows/check-dependencies.yml 
b/.github/workflows/check-dependencies.yml
index 4a2a7168d..fbc8633a5 100644
--- a/.github/workflows/check-dependencies.yml
+++ b/.github/workflows/check-dependencies.yml
@@ -14,6 +14,7 @@ jobs:
   dependency-check:
     runs-on: ubuntu-latest
     env:
+      USE_STAGE: 'true' # Whether to include the stage repository.
       SCRIPT_DEPENDENCY: hugegraph-server/hugegraph-dist/scripts/dependency
     steps:
       - name: Checkout source
@@ -23,6 +24,11 @@ jobs:
         with:
           java-version: '11'
           distribution: 'adopt'
+      - name: use staged maven repo settings
+        if: ${{ env.USE_STAGE == 'true' }}
+        run: |
+          cp $HOME/.m2/settings.xml /tmp/settings.xml
+          mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
       - name: mvn install
         run: |
           mvn install -DskipTests=true -ntp
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index e3435d5da..7b94e83be 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -12,6 +12,7 @@ jobs:
   build:
     runs-on: ubuntu-20.04
     env:
+      USE_STAGE: 'true' # Whether to include the stage repository.
       TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis
       REPORT_DIR: target/site/jacoco
       BACKEND: ${{ matrix.BACKEND }}
@@ -46,6 +47,12 @@ jobs:
         with:
           fetch-depth: 2
 
+      - name: use staged maven repo settings
+        if: ${{ env.USE_STAGE == 'true' }}
+        run: |
+          cp $HOME/.m2/settings.xml /tmp/settings.xml
+          mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
+
       - name: Compile
         run: |
           mvn clean compile -U -Dmaven.javadoc.skip=true -ntp
@@ -53,8 +60,10 @@ jobs:
       - name: Install JDK 8
         uses: actions/setup-java@v3
         with:
+          overwrite-settings: false
           java-version: '8'
           distribution: 'zulu'
+
       - name: Prepare env and service
         run: |
           $TRAVIS_DIR/install-backend.sh $BACKEND
@@ -62,6 +71,7 @@ jobs:
       - name: Install JDK ${{ matrix.JAVA_VERSION }}
         uses: actions/setup-java@v3
         with:
+          overwrite-settings: false
           java-version: ${{ matrix.JAVA_VERSION }}
           distribution: 'zulu'
 
diff --git a/.github/workflows/codeql-analysis.yml 
b/.github/workflows/codeql-analysis.yml
index a8e40be83..958e5b1bd 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -11,6 +11,8 @@ on:
 
 jobs:
   analyze:
+    env:
+      USE_STAGE: 'true' # Whether to include the stage repository.
     name: Analyze
     runs-on: ubuntu-latest
     permissions:
@@ -33,6 +35,12 @@ jobs:
           distribution: 'zulu'
           java-version: '11'
 
+      - name: use staged maven repo settings
+        if: ${{ env.USE_STAGE == 'true' }}
+        run: |
+          cp $HOME/.m2/settings.xml /tmp/settings.xml
+          mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
+
       # Initializes the CodeQL tools for scanning.
       - name: Initialize CodeQL
         uses: github/codeql-action/init@v2
diff --git a/pom.xml b/pom.xml
index b2fc6299a..5af212fd6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -94,7 +94,32 @@
 
     <modules>
         <module>hugegraph-server</module>
-        <module>hugegraph-pd</module>
-        <module>hugegraph-store</module>
     </modules>
+    <profiles>
+        <profile>
+            <id>stage</id>
+            <repositories>
+                <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>
+        <profile>
+            <id>jdk-11-to-17-support</id>
+            <activation>
+                <jdk>[11, 17)</jdk>
+            </activation>
+            <modules>
+                <module>hugegraph-store</module>
+                <module>hugegraph-pd</module>
+            </modules>
+        </profile>
+    </profiles>
 </project>

Reply via email to