You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2016/12/17 08:23:39 UTC
svn commit: r1774718 - in /sling/trunk/bundles/extensions/models/impl: ./
.gitignore pom.xml
Author: sseifert
Date: Sat Dec 17 08:23:39 2016
New Revision: 1774718
URL: http://svn.apache.org/viewvc?rev=1774718&view=rev
Log:
SLING-6409 Models Impl: Use shading instead of embedding for commons.osgi and scripting.core
Added:
sling/trunk/bundles/extensions/models/impl/.gitignore
Modified:
sling/trunk/bundles/extensions/models/impl/ (props changed)
sling/trunk/bundles/extensions/models/impl/pom.xml
Propchange: sling/trunk/bundles/extensions/models/impl/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Dec 17 08:23:39 2016
@@ -1,13 +1,11 @@
-target
-bin
*.iml
*.ipr
*.iws
-.settings
-.project
.classpath
.externalToolBuilders
+.project
+.settings
+bin
+dependency-reduced-pom.xml
maven-eclipse.xml
-
-
-
+target
Added: sling/trunk/bundles/extensions/models/impl/.gitignore
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/models/impl/.gitignore?rev=1774718&view=auto
==============================================================================
--- sling/trunk/bundles/extensions/models/impl/.gitignore (added)
+++ sling/trunk/bundles/extensions/models/impl/.gitignore Sat Dec 17 08:23:39 2016
@@ -0,0 +1 @@
+dependency-reduced-pom.xml
\ No newline at end of file
Modified: sling/trunk/bundles/extensions/models/impl/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/models/impl/pom.xml?rev=1774718&r1=1774717&r2=1774718&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/models/impl/pom.xml (original)
+++ sling/trunk/bundles/extensions/models/impl/pom.xml Sat Dec 17 08:23:39 2016
@@ -49,14 +49,61 @@
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>2.4.3</version>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <createSourcesJar>true</createSourcesJar>
+ <shadeSourcesContent>true</shadeSourcesContent>
+ <artifactSet>
+ <includes>
+ <include>org.apache.sling:org.apache.sling.commons.osgi</include>
+ <include>org.apache.sling:org.apache.sling.scripting.core</include>
+ </includes>
+ </artifactSet>
+ <relocations>
+ <relocation>
+ <pattern>org.apache.sling.commons.osgi</pattern>
+ <shadedPattern>slingmodelsimpl.org.apache.sling.commons.osgi</shadedPattern>
+ </relocation>
+ <relocation>
+ <pattern>org.apache.sling.scripting.core</pattern>
+ <shadedPattern>slingmodelsimpl.org.apache.sling.scripting.core</shadedPattern>
+ </relocation>
+ </relocations>
+ <filters>
+ <filter>
+ <artifact>org.apache.sling:org.apache.sling.commons.osgi</artifact>
+ <includes>
+ <include>org/apache/sling/commons/osgi/*</include>
+ </includes>
+ </filter>
+ <filter>
+ <artifact>org.apache.sling:org.apache.sling.scripting.core</artifact>
+ <includes>
+ <include>org/apache/sling/scripting/core/impl/helper/ProtectedBindings*</include>
+ </includes>
+ </filter>
+ </filters>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
<configuration>
- <instructions>
- <Embed-Dependency>
- *;scope=compile,
- org.apache.sling.commons.osgi;inline=true,
- org.apache.sling.scripting.core;inline="org/apache/sling/scripting/core/impl/helper/ProtectedBindings.class"
- </Embed-Dependency>
- </instructions>
+ <excludes>
+ <exclude>dependency-reduced-pom.xml</exclude>
+ </excludes>
</configuration>
</plugin>
</plugins>
@@ -97,12 +144,6 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>org.apache.sling</groupId>
- <artifactId>org.apache.sling.scripting.core</artifactId>
- <version>2.0.20</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
@@ -146,12 +187,19 @@
<artifactId>slf4j-simple</artifactId>
<scope>test</scope>
</dependency>
- <!-- we need a pretty new version for the RankedServices, but we embed the necessary classes in this bundle -->
+ <!-- Artifact is shaded and inlined, only some classes included (see above) -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.commons.osgi</artifactId>
<version>2.4.0</version>
- <scope>provided</scope>
+ <scope>compile</scope>
+ </dependency>
+ <!-- Artifact is shaded and inlined, only some classes included (see above) -->
+ <dependency>
+ <groupId>org.apache.sling</groupId>
+ <artifactId>org.apache.sling.scripting.core</artifactId>
+ <version>2.0.20</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>