Skip to content

Commit 594f0af

Browse files
authored
Merge pull request #23
Polish Maven metadata; support to build & test w/o access to the internet
2 parents 36ac579 + 2f98f46 commit 594f0af

File tree

27 files changed

+448
-141
lines changed

27 files changed

+448
-141
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
branches: [ main ]
88

99
env:
10-
graalvm_version: '26-ea'
10+
graalvm_version: '25'
1111

1212
jobs:
1313
# This is done as one single separate step to work around rate limits for the API
@@ -28,7 +28,10 @@ jobs:
2828

2929
- name: Set Maven Bundle URL
3030
id: set_url
31-
run: echo "maven_bundle_url=$(./scripts/maven-bundle-url.sh | tail -n 1)" >> $GITHUB_OUTPUT
31+
run: |
32+
tmp_file="$(mktemp)"
33+
./scripts/maven-bundle-url.sh | tee "$tmp_file"
34+
echo "maven_bundle_url=$(tail -n 1 "$tmp_file")" >> $GITHUB_OUTPUT
3235
shell: bash
3336

3437
pre_commit:
@@ -184,19 +187,23 @@ jobs:
184187
if: runner.os == 'Windows'
185188
run: echo "C:\Program Files\Git\usr\bin" >> $env:GITHUB_PATH
186189

190+
# We scrape the output of integration tests for paths to interesting log files,
191+
# so that we can then upload them in the following actions/upload-artifact
187192
- name: Run integration tests
193+
id: tests_run
188194
run: |
189195
mvn --batch-mode -s settings.xml -Dgradle.java.home=$GRADLE_JAVA_HOME exec:java@integration-tests -Dintegration.tests.args="${{ matrix.test_name }} ${{ matrix.extra_test_args }} $TEST_FLAGS"
190196
shell: bash
191197

198+
# /var/folders/sw/**/T/jbang*native-image
199+
# ^ not using this path on MacOS, because it causes
192200
- name: Upload JBang native-image log
193201
if: failure()
194202
uses: actions/upload-artifact@v4
195203
with:
196204
name: jbang-native-image-log
197205
path: |
198206
/tmp/jbang*native-image
199-
/var/folders/sw/**/T/jbang*native-image
200207
201208
unit-tests:
202209
needs: [build, maven_bundle_url]

DEVELOPMENT.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
## Building for a Release
2-
3-
* Verify that the following properties in `pom.xml` match the expected versions for the release:
4-
* `revision`: the version for graalpy-extensions artifacts, e.g., `org.graalvm.python.embedding`
5-
* `project.polyglot.version`: version of the polyglot artifacts to use, e.g., the version of `org.graalvm.polyglot:polyglot` dependency
6-
* The polyglot artifacts of given version must be available in Maven central or some additional
7-
Maven repository that can be configured, for example, using Maven's setting.xml mechanism
8-
* Run Maven with `-P release` to sign the artifacts
9-
* Note: the files that are expected to be deployed include usual: `*.jar`, `*.asc`, `*.pom`,
10-
and in case of `org.graalvm.python.embedding` also `*.sigfile`, which is used for API stability checking
11-
121
## How to develop against the latest GraalPy, GraalVM SDK, and Truffle:
132

143
### Option 1: Use pre-built Maven bundle
@@ -22,6 +11,11 @@ Maven repository. The `settings.xml` file can be then passed to Maven using `-s
2211
mvn -s ./settings.xml ...
2312
```
2413

14+
Alternatively pass the local repo URL as property:
15+
```
16+
mvn -Dlocal.repo.url=file:///path/to/maven-bundle ...
17+
```
18+
2519
### Option 2: Build and install GraalPy/Truffle from sources
2620

2721
Checkout out and build the [GraalPy](https://github.com/oracle/graalpython)

graalpy-archetype-polyglot-app/pom.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ SOFTWARE.
5151
<name>graalpy-archetype-polyglot-app</name>
5252
<artifactId>graalpy-archetype-polyglot-app</artifactId>
5353
<description>Maven archetype providing a skeleton GraalPy - Java polyglot application.</description>
54+
<url>${project.url.root}</url>
55+
<scm>
56+
<connection>${project.scm.connection}</connection>
57+
<developerConnection>${project.scm.devConnection}</developerConnection>
58+
<url>${project.scm.url}</url>
59+
</scm>
5460
<packaging>maven-archetype</packaging>
5561

5662
<build>
@@ -87,6 +93,16 @@ SOFTWARE.
8793
<escapeString>\</escapeString>
8894
</configuration>
8995
</plugin>
96+
<!-- Effectively disables the maven-source-plugin inherited from parent pom. -->
97+
<!-- The archetype-packaging extensions already contains maven-source-plugin
98+
and the two of them would fight each other -->
99+
<plugin>
100+
<groupId>org.apache.maven.plugins</groupId>
101+
<artifactId>maven-source-plugin</artifactId>
102+
<configuration>
103+
<attach>false</attach>
104+
</configuration>
105+
</plugin>
90106
</plugins>
91107

92108
<pluginManagement>

graalpy-archetype-polyglot-app/src/main/resources/archetype-resources/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
<properties>
1313
<graalpy.version>${revision}</graalpy.version>
14-
<graalpy.edition>python-community</graalpy.edition>
1514
<native-maven-plugin.version>0.10.4</native-maven-plugin.version>
1615
<maven.compiler.target>17</maven.compiler.target>
1716
<maven.compiler.source>17</maven.compiler.source>
@@ -28,7 +27,7 @@
2827
</dependency>
2928
<dependency>
3029
<groupId>org.graalvm.polyglot</groupId>
31-
<artifactId>${symbol_dollar}{graalpy.edition}</artifactId>
30+
<artifactId>python</artifactId>
3231
<version>${symbol_dollar}{graalpy.version}</version>
3332
<type>pom</type>
3433
</dependency>

graalpy-maven-plugin/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ SOFTWARE.
5151
<name>graalpy-maven-plugin</name>
5252
<artifactId>graalpy-maven-plugin</artifactId>
5353
<description>Handles python related resources in a maven GraalPy - Java polyglot application.</description>
54+
<url>${project.url.root}</url>
55+
<scm>
56+
<connection>${project.scm.connection}</connection>
57+
<developerConnection>${project.scm.devConnection}</developerConnection>
58+
<url>${project.scm.url}</url>
59+
</scm>
5460
<packaging>maven-plugin</packaging>
5561

5662
<dependencies>

integration-tests/check_home_pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ SOFTWARE.
5353
<dependencies>
5454
<dependency>
5555
<groupId>org.graalvm.polyglot</groupId>
56-
<artifactId>python-community</artifactId>
56+
<artifactId>python</artifactId>
5757
<version>${env.GRAALPY_VERSION}</version>
5858
<type>pom</type>
5959
</dependency>

integration-tests/check_packages_pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ SOFTWARE.
5353
<dependencies>
5454
<dependency>
5555
<groupId>org.graalvm.polyglot</groupId>
56-
<artifactId>python-community</artifactId>
56+
<artifactId>python</artifactId>
5757
<version>${env.GRAALPY_VERSION}</version>
5858
<type>pom</type>
5959
</dependency>

integration-tests/check_plugin_configuration.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ SOFTWARE.
5353
<dependencies>
5454
<dependency>
5555
<groupId>org.graalvm.polyglot</groupId>
56-
<artifactId>python-community</artifactId>
56+
<artifactId>python</artifactId>
5757
<version>${env.GRAALPY_VERSION}</version>
5858
<type>pom</type>
5959
</dependency>

integration-tests/gradle/gradle-test-project/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https://services.gradle.org/distributions/gradle-8.9-bin.zip
3+
distributionUrl=https://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

integration-tests/merged_vfs_ujson_pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ SOFTWARE.
5959
</dependency>
6060
<dependency>
6161
<groupId>org.graalvm.python</groupId>
62-
<artifactId>python-community</artifactId>
62+
<artifactId>python</artifactId>
6363
<version>${env.GRAALPY_VERSION}</version>
6464
<type>pom</type>
6565
</dependency>

0 commit comments

Comments
 (0)