Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: make some package imports optional #53

Merged
merged 2 commits into from
Oct 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ platform {
'org.xml.sax.*',
'javax.activation.*',
'com.sun.xml.internal.*',
'sun.nio.*',
// cal10n.api
'javax.tools.*',
'javax.lang.model.*',
Expand Down Expand Up @@ -727,6 +728,11 @@ platform {
instruction 'Export-Package', "*;version=$version"
}

bnd group: 'jline', name: 'jline', {
// make some imports optional which showed up after upgrading bnd
optionalImport 'sun.misc', 'com.cloudius.util'
}

// library fixes
//
// suppress Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=1.1))" generated by bnd - Eclipse chokes on it
Expand Down
35 changes: 35 additions & 0 deletions modules/resources/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,41 @@ task downloadInspireSchemas() {
}
// delete remainder
delete(new File(temporaryDir, 'application-schemas-main'))

/*
* The website does redirect for some schemas to a subfolder with older versions.
* For example `hy-p/3.0/HydroPhysicalWaters.xsd` is redirected to `2021.1/hy-p/3.0/HydroPhysicalWaters.xsd`
* The resource bundles don't know about these redirects, the file from the original folder is accessed.
* Loading the full schema may fail though, because some schema have been removed from the root and are only
* available in folders representing older versions.
* Examples:
* - `lc/0.0/LandCover.xsd`
* - `wfd/0.0/WaterFrameworkDirective.xsd`
*
* Since we don't know the exact redirection rules we attempt to have a copy of al schemas in the root, in
* their respective newest version, by copying newer versions over older versions.
*/
def tempRoot = new File(temporaryDir, 'tmp-schemas')
def versions = ['2021.1', '2021.2', '2022.1', '2022.2']
// copy all versions in order
versions.each { v ->
copy {
from new File(temporaryDir, "schemas/$v")
into tempRoot
include '**/*'
}
}
// copy current root
copy {
from new File(temporaryDir, "schemas")
into tempRoot
include '**/*'
}
// delete old root
delete(new File(temporaryDir, 'schemas'))
// rename
ant.move(file: tempRoot, tofile: new File(temporaryDir, 'schemas'))

// add fixups
copy {
from new File(projectDir, 'inspire-fixup')
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Loading