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 10, 2024
1 parent 0aadd16 commit c617f2a
Show file tree
Hide file tree
Showing 2 changed files with 19 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
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>7.0.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down

0 comments on commit c617f2a

Please sign in to comment.