Skip to content

Commit

Permalink
Optimize far jar (#445)
Browse files Browse the repository at this point in the history
* First jar optimization to reduce it's size

* Remove some test dependencies and only include rewrite-core from CLI
  • Loading branch information
jonesbusy authored Dec 11, 2024
1 parent b2713b6 commit 38c1672
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
17 changes: 17 additions & 0 deletions plugin-modernizer-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,23 @@
<groupId>io.jenkins.plugin-modernizer</groupId>
<artifactId>plugin-modernizer-core</artifactId>
<version>${changelist}</version>
<!-- We never use OpenRewrite directly from CLI because of maven invoker which will download the core module and it's dependencies -->
<exclusions>
<exclusion>
<groupId>org.openrewrite</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- We only use the Recipe class and Xml.Tag from the CLI -->
<!-- TODO : We should be able to break this dependencies by introducing our own interfaces -->
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-core</artifactId>
</dependency>
<dependency>
<groupId>org.openrewrite</groupId>
<artifactId>rewrite-xml</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
17 changes: 12 additions & 5 deletions plugin-modernizer-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,17 @@
<dependency>
<groupId>org.openrewrite.recipe</groupId>
<artifactId>rewrite-testing-frameworks</artifactId>
<exclusions>
<exclusion>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>uk.org.webcompere</groupId>
<artifactId>system-stubs-jupiter</artifactId>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
Expand All @@ -159,6 +160,12 @@
<artifactId>rewrite-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>uk.org.webcompere</groupId>
<artifactId>system-stubs-jupiter</artifactId>
<version>2.1.7</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
9 changes: 5 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,6 @@
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
Expand All @@ -282,6 +278,11 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-standalone</artifactId>
Expand Down

0 comments on commit 38c1672

Please sign in to comment.