You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2021/05/19 15:22:09 UTC

[sling-org-apache-sling-xss] branch feature/embed-only-with-bnd created (now 50ee487)

This is an automated email from the ASF dual-hosted git repository.

kwin pushed a change to branch feature/embed-only-with-bnd
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-xss.git.


      at 50ee487  SLING-10398 embed classes with Bnd only

This branch includes the following new commits:

     new 50ee487  SLING-10398 embed classes with Bnd only

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[sling-org-apache-sling-xss] 01/01: SLING-10398 embed classes with Bnd only

Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

kwin pushed a commit to branch feature/embed-only-with-bnd
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-xss.git

commit 50ee4877cbe11528001fdad40d49e44ac94b5ed9
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed May 19 17:21:54 2021 +0200

    SLING-10398 embed classes with Bnd only
---
 bnd.bnd | 17 ++++-------------
 pom.xml | 63 ---------------------------------------------------------------
 2 files changed, 4 insertions(+), 76 deletions(-)

diff --git a/bnd.bnd b/bnd.bnd
index be4bc68..593228a 100644
--- a/bnd.bnd
+++ b/bnd.bnd
@@ -1,3 +1,4 @@
+# make sure to not import classes which are not actually used from the embedded JARs
 Import-Package: !bsh, \
                 !nu.xom, \
                 !org.apache.bcel.*, \
@@ -22,19 +23,9 @@ Import-Package: !bsh, \
                 !javax.mail.internet, \
                 !javax.servlet.jsp, \
                 !javax.servlet.jsp.tagext, \
+                !javax.swing.*, \
                 !javax.xml.*, \
                 !sun.io, \
                 *
-Private-Package: org.apache.sling.xss.impl, \
-                 org.apache.batik.*, \
-                 org.w3c.css.sac, \
-                 org.apache.xerces.*, \
-                 org.apache.xml.serialize, \
-                 org.apache.xml.serializer.*, \
-                 org.apache.commons.beanutils.*;-split-package:=merge-first, \
-                 org.apache.commons.configuration.*, \
-                 org.apache.commons.logging.impl, \
-                 org.cyberneko.html.*, \
-                 org.owasp.*, \
-                 javax.xml.parsers;-split-package:=merge-first, \
-                 javax.xml.transform;-split-package:=merge-first
+# embed full JARs in extracted form
+-includeresource: @antisamy-*.jar!/*,@esapi-*.jar!/*,@encoder-*.jar!/*,@xalan-*.jar!/*,@xml-apis-*.jar!/*
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 1a19907..01372eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -87,69 +87,6 @@
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-dependency-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>unpack</id>
-                        <phase>prepare-package</phase>
-                        <goals>
-                            <goal>unpack</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${project.build.directory}/dependencies-classes</outputDirectory>
-                            <artifactItems>
-                                <artifactItem>
-                                    <groupId>org.owasp.antisamy</groupId>
-                                    <artifactId>antisamy</artifactId>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>org.owasp.esapi</groupId>
-                                    <artifactId>esapi</artifactId>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>org.owasp.encoder</groupId>
-                                    <artifactId>encoder</artifactId>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>xalan</groupId>
-                                    <artifactId>xalan</artifactId>
-                                </artifactItem>
-                                <artifactItem>
-                                    <groupId>xml-apis</groupId>
-                                    <artifactId>xml-apis</artifactId>
-                                </artifactItem>
-                            </artifactItems>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <artifactId>maven-resources-plugin</artifactId>
-                <version>3.1.0</version>
-                <executions>
-                    <execution>
-                        <id>copy-resources</id>
-                        <!-- here the phase you need -->
-                        <phase>prepare-package</phase>
-                        <goals>
-                            <goal>copy-resources</goal>
-                        </goals>
-                        <configuration>
-                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
-                            <resources>
-                                <resource>
-                                    <directory>${project.build.directory}/dependencies-classes</directory>
-                                    <excludes>
-                                        <exclude>**/MANIFEST.MF</exclude>
-                                    </excludes>
-                                </resource>
-                            </resources>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-javadoc-plugin</artifactId>
                 <configuration>
                     <!-- No javadocs -->