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

FISH-7880 Update Bundle Plugin #6439

Merged
merged 17 commits into from
Nov 6, 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
4 changes: 2 additions & 2 deletions appserver/admingui/faces-compat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
~
~ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
~
~ Copyright (c) 2022 Payara Foundation and/or its affiliates. All rights reserved.
~ Copyright (c) 2022-2023 Payara Foundation and/or its affiliates. All rights reserved.
~
~ The contents of this file are subject to the terms of either the GNU
~ General Public License Version 2 only ("GPL") or the Common Development
Expand Down Expand Up @@ -164,7 +164,7 @@
<Export-Package>fish.payara.server.internal.admingui,
!com.sun.faces.tlddoc-resources,
com.sun.faces.*;com.sun.jsft.*;com.sun.jsftemplating.*;jakarta.faces.*;version="3.0";usage="admingui";mandatory:=usage</Export-Package>
<Import-Package>!com.sun.faces.*,!jakarta.faces.*,!com.sun.jsftemplating.*,!com.sun.jsft,*</Import-Package>
<Import-Package>!com.sun.faces.*,!jakarta.faces.*,!com.sun.jsftemplating.*,!com.sun.jsft,!org.apache.jasper.compiler,*</Import-Package>
</instructions>
</configuration>
</execution>
Expand Down
2 changes: 2 additions & 0 deletions appserver/appclient/client/acc/osgi.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
# only if the new code is made subject to such option by the copyright
# holder.
#
# Portions Copyright 2023 Payara Foundation and/or its affiliates.

-exportcontents: \
org.glassfish.appclient.client; \
Expand All @@ -51,4 +52,5 @@
# Making this import optional.
Import-Package: \
org.jboss.weld.environment.se;resolution:=optional, \
org.glassfish.appclient.client.acc.agent;resolution:=optional, \
*
5 changes: 5 additions & 0 deletions appserver/jms/jms-core/osgi.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@
# only if the new code is made subject to such option by the copyright
# holder.
#
# Portions Copyright 2023 Payara Foundation and/or its affiliates

-exportcontents: \
com.sun.enterprise.connectors.jms.deployment.annotation.handlers;\
com.sun.enterprise.connectors.jms.inflow;\
com.sun.enterprise.connectors.jms.system;\
com.sun.enterprise.connectors.jms.util; version=${project.osgi.version}

# Optionally import package from OpenMQ for use by LegacyJmsRecoveryResourceHandler.
# Version bounded simply for major version safety, if version 7 turns out to be fine adjust this bound
Import-Package: com.sun.messaging.jmq.admin.jmsspi; version="[6.3,7)"; resolution:=optional, *
12 changes: 11 additions & 1 deletion appserver/packager/external/ant/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
holder.

-->
<!-- Portions Copyright [2017-2019] [Payara Foundation and/or its affiliates] -->
<!-- Portions Copyright 2017-2023 Payara Foundation and/or its affiliates -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
Expand Down Expand Up @@ -98,6 +98,16 @@
!org.apache.tools.ant.util.java15,
!org.apache.tools.ant.taskdefs.optional,
!org.apache.env,
!org.apache.harmony.luni.util,
com.sun.tools.javah.*;resolution:=optional,
gnu.classpath.*;resolution:=optional,
gnu.gcj.*;resolution:=optional,
javax.activation.*;resolution:=optional,
javax.mail.internet.*;resolution:=optional,
kaffe.util.*;resolution:=optional,
org.tukaani.xz.*;resolution:=optional,
sun.tools.native2ascii.*;resolution:=optional,
weblogic.*;resolution:=optional,
*
</Import-Package>
<!-- !* matches with nothing, so no other class will be included in this bundle,
Expand Down
5 changes: 4 additions & 1 deletion appserver/security/core-ee/osgi.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# only if the new code is made subject to such option by the copyright
# holder.
#
# Portions Copyright [2016,2019] [Payara Foundation]
# Portions Copyright 2016-2023 Payara Foundation and/or its affiliates

-exportcontents: \
com.sun.enterprise.security.acl; \
Expand All @@ -60,3 +60,6 @@

# dependent flashlight package resolved at runtime
DynamicImport-Package: org.glassfish.flashlight.provider

# Don't import ourself!
Import-Package: !com.sun.enterprise.security.acl, *
3 changes: 2 additions & 1 deletion appserver/web/web-core/osgi.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
# only if the new code is made subject to such option by the copyright
# holder.
#
# Portions Copyright 2023 Payara Foundation and/or its affiliates

-exportcontents: \
com.sun.enterprise.web.connector.grizzly; \
Expand Down Expand Up @@ -68,5 +69,5 @@
# In this case, org.apache.jk.server is one such package. It is used
# when mod_jk configuration is used. Since, it is not always needed,
# the import has been marked as optional. By Sahoo.
Import-Package: org.apache.jk.core;org.apache.jk.server; resolution:=optional; password=GlassFish; version=${project.osgi.version}, *
Import-Package: org.apache.jk.core;org.apache.jk.server; resolution:=optional; password=GlassFish; version=${project.osgi.version}, !org.apache.xerces.impl, *

21 changes: 0 additions & 21 deletions core/core-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -412,27 +412,6 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven.bundle.plugin.version}</version>
<configuration>
<!-- By default, we don't export anything. -->
<Export-Package />
<instructions>
<!--
Read all the configuration from osgi.bundle file, if it exists.
-->
<_include>-osgi.bundle</_include>
</instructions>
<excludeDependencies>tools-jar</excludeDependencies>
<supportedProjectTypes>
<supportedProjectType>glassfish-jar</supportedProjectType>
<supportedProjectType>jar</supportedProjectType>
</supportedProjectTypes>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
Expand Down
23 changes: 22 additions & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
<maven.source.plugin.version>3.2.1</maven.source.plugin.version>
<maven.javadoc.plugin.version>3.4.1</maven.javadoc.plugin.version>
<maven.install.plugin.version>3.1.0</maven.install.plugin.version>
<maven.bundle.plugin.version>4.1.0</maven.bundle.plugin.version>
<maven.bundle.plugin.version>5.1.9</maven.bundle.plugin.version>
<maven.failsafe.plugin.version>3.0.0-M7</maven.failsafe.plugin.version>
<maven.site.plugin.version>3.12.1</maven.site.plugin.version>
<glassfishbuild.version>3.2.20.payara-p2</glassfishbuild.version>
Expand Down Expand Up @@ -468,6 +468,27 @@
<skip>${deploy.skip}</skip>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven.bundle.plugin.version}</version>
<configuration>
<instructions>
<!--
Read all the configuration from osgi.bundle file, if it exists.
-->
<_include>-osgi.bundle</_include>
<!-- Don't import JDK packages -->
<_noimportjava>true</_noimportjava>
</instructions>
<excludeDependencies>tools-jar</excludeDependencies>
<supportedProjectTypes>
<supportedProjectType>glassfish-jar</supportedProjectType>
<supportedProjectType>jar</supportedProjectType>
</supportedProjectTypes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
4 changes: 2 additions & 2 deletions nucleus/admin/rest/rest-service/osgi.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# only if the new code is made subject to such option by the copyright
# holder.
#
# Portions Copyright [2016] [Payara Foundation and/or its affiliates]
# Portions Copyright 2016-2023 Payara Foundation and/or its affiliates

-exportcontents: \
org.glassfish.admin.rest, \
Expand All @@ -57,4 +57,4 @@ DynamicImport-Package: \
# e.g., in some embedded setup, we may disable logging altogether.
# So, we need to mark it as an optional dependency. We can remove this
# when admin team moves logging rest resources out of this module to logging module.
Import-Package: com.sun.enterprise.server.logging.*; resolution:=optional, *;
Import-Package: com.sun.enterprise.server.logging.*; resolution:=optional, !org.glassfish.admin.rest.resources.generatedASM, *;
4 changes: 2 additions & 2 deletions nucleus/core/kernel/osgi.bundle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
# holder.
#

# Portions Copyright [2016-2019] [Payara Foundation and/or its affiliates]
# Portions Copyright 2016-2023 Payara Foundation and/or its affiliates

-exportcontents: \
com.sun.enterprise.v3.admin; \
Expand Down Expand Up @@ -67,4 +67,4 @@ DynamicImport-Package: fish.payara.nucleus.requesttracing, \
# Only in non-OSGi embedded mode, kernel depends on logging package, so
# optionally depend on that pkg. This way, when GF is embedded in
# OSGi environment, logging bundle need not be installed.
Import-Package: com.sun.enterprise.server.logging.*; resolution:=optional, *
Import-Package: com.sun.enterprise.server.logging.*; resolution:=optional, com.sun.tracing.*; resolution:=optional, *
4 changes: 2 additions & 2 deletions nucleus/grizzly/nucleus-grizzly-all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
holder.

-->
<!--"Portions Copyright [2017-2022] [Payara Foundation and/or its affiliates]" -->
<!-- Portions Copyright 2017-2023 Payara Foundation and/or its affiliates -->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
Expand Down Expand Up @@ -102,7 +102,7 @@
</goals>
<configuration>
<instructions>
<Import-Package>*</Import-Package>
<Import-Package>!android.os, sun.security.ssl; resolution:=optional, *</Import-Package>
<DynamicImport-Package>*</DynamicImport-Package>
<Export-Package>org.glassfish.grizzly.*</Export-Package>
<Private-Package>org.glassfish.grizzly.*</Private-Package>
Expand Down
4 changes: 4 additions & 0 deletions nucleus/packager/external/opentelemetry-repackaged/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@
!org.checkerframework.checker.nullness.qual,
!org.conscrypt,sun.misc;version=!,
!javax.annotation.*,
!com.android.*,
!dalvik.*,
io.opentelemetry.exporter.prometheus;resolution:=optional,
sun.security.ssl;resolution:=optional,
*
</Import-Package>
<!-- Embed the dependencies and then shade them in next step -->
Expand Down
20 changes: 0 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -381,26 +381,6 @@
</configuration>
</plugin>

<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${maven.bundle.plugin.version}</version>
<configuration>
<!-- By default, we don't export anything. -->
<Export-Package />
<instructions>
<!--
Read all the configuration from osgi.bundle file, if it exists.
-->
<_include>-osgi.bundle</_include>
</instructions>
<excludeDependencies>tools-jar</excludeDependencies>
<supportedProjectTypes>
<supportedProjectType>glassfish-jar</supportedProjectType>
<supportedProjectType>jar</supportedProjectType>
</supportedProjectTypes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>xml-maven-plugin</artifactId>
Expand Down