-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
133 lines (114 loc) · 4.43 KB
/
snapcraft.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# snapcraft.yaml - builds a Snap package of the Apache NetBeans IDE
# Copyright 2021-2024 John Neffenger
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: strictly-netbeans
title: Strictly NetBeans
summary: Apache NetBeans® in a strictly-confined snap
description: |
Apache NetBeans is an integrated development environment (IDE)
for Java, with extensions for PHP, C, C++, HTML5, JavaScript,
and other languages. Applications based on NetBeans, including the
NetBeans IDE, can be extended by third-party developers.
This package provides the latest release of NetBeans built directly
from its source code on GitHub. If the OpenJDK Snap package is
also installed, this package connects to it automatically for the
location of its Java Development Kit.
This Snap package is strictly confined, running in complete isolation
with only limited access to your system. For important information
about running NetBeans in a confined environment, see the README
file for this package on GitHub:
https://github.com/jgneff/strictly-netbeans
This is a convenience binary of the NetBeans IDE and not a release
by the Apache Software Foundation. For official releases, see:
https://netbeans.apache.org
Apache NetBeans and the NetBeans logo are either registered
trademarks or trademarks of the Apache Software Foundation in the
United States and/or other countries.
version: '24'
license: Apache-2.0
base: core18
grade: stable
confinement: strict
architectures:
- build-on: amd64
run-on: [amd64, arm64, armhf, i386]
plugs:
jdk-23-1804:
interface: content
target: $SNAP/jdk
default-provider: openjdk
maven-3-1804:
interface: content
target: $SNAP/maven
jfx-23-1804:
interface: content
target: $SNAP/jfx
apps:
strictly-netbeans:
command: bin/netbeans.sh
extensions: [gnome-3-28]
plugs: [home, network, network-bind, mount-observe]
environment:
# java.io.FileNotFoundException: ~/.gitconfig (Permission denied)
GIT_CONFIG_GLOBAL: /dev/null # Not yet supported by JGit
GIT_CONFIG_SYSTEM: /dev/null # Not yet supported by JGit
GIT_CONFIG_NOSYSTEM: 'true' # Supported by Eclipse JGit
parts:
dump:
plugin: dump
source: .
source-type: local
stage: [bin, conf]
netbeans:
after: [dump]
plugin: nil
source: https://github.com/apache/netbeans.git
source-type: git
source-branch: release240
source-depth: 1
build-packages:
- ant
- openjdk-17-jdk-headless
- openjdk-17-jre-headless
- unzip
# This file lists the branch names and commits of each release:
# https://github.com/apache/netbeans-jenkins-lib/blob/master/meta/netbeansrelease.json
build-environment:
- RELEASE_BRANCH: release240
override-build: |
# Avoids causing "503 Service Unavailable" errors on Launchpad
# https://github.com/apache/netbeans/issues/4890
unset https_proxy
# Normalizes timestamps from the Ant Tstamp task
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)
export SOURCE_DATE_EPOCH
# Builds the source release
ant -quiet -Dmetabuild.branch="$RELEASE_BRANCH" -Dbuildnum=999 build-source-config
# Builds the binary release from the source release
unzip -q nbbuild/build/release-src-999.zip -d build-release-temp
ant -quiet -f build-release-temp/build.xml -Dmetabuild.branch="$RELEASE_BRANCH"
mv build-release-temp/nbbuild/netbeans "$SNAPCRAFT_PART_INSTALL"
# Patches the default location of the local repository
cp "$SNAPCRAFT_STAGE/conf/settings-global.xml" \
"$SNAPCRAFT_PART_INSTALL/netbeans/java/maven/conf/settings.xml"
stage:
# Excludes build files not found in the official Apache release
- -netbeans/moduleCluster.properties
- -netbeans/*.built
# Includes JavaFX Implementation for Linux, excluded by Apache
# - -netbeans/extra
layout:
# For Fontconfig warnings and errors on startup
/etc/fonts:
bind: $SNAP/gnome-platform/etc/fonts