Skip to content

Commit

Permalink
Embed the google cache dependency in the bundle
Browse files Browse the repository at this point in the history
Guava is known as a bit "problematic" dependency, as lemminx only uses
guava-cache, this can be embedded in the bundle and be made embedded
package.

This changes the used felix-bundle to bnd-maven-plugin with the
conditionalpackage to include the caching api in the generated bundle

Signed-off-by: Christoph Läubrich <[email protected]>
  • Loading branch information
laeubi committed Nov 12, 2024
1 parent 244f248 commit 534382a
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 20 deletions.
19 changes: 16 additions & 3 deletions org.eclipse.lemminx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,26 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd><![CDATA[
Bundle-SymbolicName: ${project.artifactId}
-conditionalpackage: com.google.common.cache
]]></bnd>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<goals>
Expand Down
15 changes: 15 additions & 0 deletions org.eclipse.lemminx/src/main/resources/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@ <h3>License</h3>
code in the Content and such source code may be obtained at <a
href="https://www.eclipse.org/">https://www.eclipse.org</a>.
</p>

<p>
The content in the package <code>com.google.common.cache</code> is
licensed under the Apache License, Version 2.0 (the "License");
you may not use this 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.
</p>

</body>

Expand Down
20 changes: 3 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,23 +159,9 @@
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>5.1.9</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
</instructions>
</configuration>
</execution>
</executions>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>6.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit 534382a

Please sign in to comment.