You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by lk...@apache.org on 2024/03/04 18:17:40 UTC
(netbeans-tools) branch master updated: Upgraded Snap built from source to core22 and Java 17
This is an automated email from the ASF dual-hosted git repository.
lkishalmi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans-tools.git
The following commit(s) were added to refs/heads/master by this push:
new ecef48c Upgraded Snap built from source to core22 and Java 17
ecef48c is described below
commit ecef48c931acee418c79aa3a359cad55db47e471
Author: Laszlo Kishalmi <la...@gmail.com>
AuthorDate: Sat Feb 17 22:28:04 2024 -0800
Upgraded Snap built from source to core22 and Java 17
---
snap-packages/from-source/build.xml | 4 +--
snap-packages/from-source/snapcraft-template.yaml | 36 ++++++++++++-----------
2 files changed, 21 insertions(+), 19 deletions(-)
diff --git a/snap-packages/from-source/build.xml b/snap-packages/from-source/build.xml
index c0be86f..aa0f4d8 100644
--- a/snap-packages/from-source/build.xml
+++ b/snap-packages/from-source/build.xml
@@ -121,14 +121,14 @@
<target name="snap-dev" depends="prepare-dev" unless="${has.dev.snap}">
<exec executable="snapcraft" dir="${dev.dir}">
- <arg value="snap"/>
+ <arg value="pack"/>
<arg value="--use-lxd"/>
</exec>
</target>
<target name="snap-rel" depends="prepare-rel" unless="${has.rel.snap}">
<exec executable="snapcraft" dir="${rel.dir}">
- <arg value="snap"/>
+ <arg value="pack"/>
<arg value="--use-lxd"/>
</exec>
</target>
diff --git a/snap-packages/from-source/snapcraft-template.yaml b/snap-packages/from-source/snapcraft-template.yaml
index 3381452..a89b865 100644
--- a/snap-packages/from-source/snapcraft-template.yaml
+++ b/snap-packages/from-source/snapcraft-template.yaml
@@ -30,7 +30,7 @@ description: |@SNAP_DISCLAIMER@
icon: snap/gui/frame512.png
confinement: classic
grade: @SNAP_GRADE@
-base: core18
+base: core22
architectures: [ amd64 ]
compression: lzo
assumes:
@@ -44,26 +44,28 @@ parts:
build-packages:
- git
- unzip
- - openjdk-11-jdk-headless
- plugin: ant
+ - openjdk-17-jdk-headless
+ - ant
+ plugin: nil
source: https://github.com/apache/netbeans.git
source-branch: "@SNAP_BRANCH@"
- filesets:
- netbeans: [ netbeans/*, -netbeans/*.built, -netbeans/extra ]
override-build: |
- export JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
- ant -Djavac.compilerargs=-nowarn -Dbuild.compiler.deprecation=false @BUILD_NUMBER@ -Dmetabuild.jsonurl=https://raw.githubusercontent.com/apache/netbeans-jenkins-lib/master/meta/netbeansrelease.json
- mv nbbuild/netbeans $SNAPCRAFT_PART_INSTALL/netbeans
- # Make the default cache and data directory relative to Snap user directory
- sed -i 's/${HOME}\/.netbeans/${SNAP_USER_DATA}/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans
- sed -i 's/${HOME}\/.cache\/netbeans/${SNAP_USER_COMMON}\/${SNAP_REVISION}/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans
- sed -i 's/"${DEFAULT_USERDIR_ROOT}\/.*"/"${DEFAULT_USERDIR_ROOT}"/g' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf
- sed -i 's/"${DEFAULT_CACHEDIR_ROOT}\/.*"/"${DEFAULT_CACHEDIR_ROOT}"/g' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf
- sed -i 's/-J-Dapple.laf.useScreenMenuBar=true/-J-Dplugin.manager.install.global=false/' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf
- chmod a+r $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf
- find $SNAPCRAFT_PART_INSTALL/netbeans -type f -name *.sh -exec chmod a+rx {} \;
+ set -x
+ export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"
+ export ANT_OPTS="-Djavac.compilerargs=-nowarn -Dbuild.compiler.deprecation=false @BUILD_NUMBER@ -Dmetabuild.jsonurl=https://raw.githubusercontent.com/apache/netbeans-jenkins-lib/master/meta/netbeansrelease.json"
+ ant build \
+ && mv nbbuild/netbeans $SNAPCRAFT_PART_INSTALL/netbeans \
+ && sed -i 's/${HOME}\/.netbeans/${SNAP_USER_DATA}/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans \
+ && sed -i 's/${HOME}\/.cache\/netbeans/${SNAP_USER_COMMON}\/${SNAP_REVISION}/' $SNAPCRAFT_PART_INSTALL/netbeans/bin/netbeans \
+ && sed -i 's/"${DEFAULT_USERDIR_ROOT}\/.*"/"${DEFAULT_USERDIR_ROOT}"/g' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf \
+ && sed -i 's/"${DEFAULT_CACHEDIR_ROOT}\/.*"/"${DEFAULT_CACHEDIR_ROOT}"/g' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf \
+ && sed -i 's/-J-Dapple.laf.useScreenMenuBar=true/-J-Dplugin.manager.install.global=false/' $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf \
+ && chmod a+r $SNAPCRAFT_PART_INSTALL/netbeans/etc/netbeans.conf \
+ && find $SNAPCRAFT_PART_INSTALL/netbeans -type f -name *.sh -exec chmod a+rx {} \;
stage:
- - $netbeans
+ - netbeans/*
+ - -netbeans/*.built
+ - -netbeans/extra
launchers:
source: snap/local/launchers
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists