在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):castor-software/depclean开源软件地址(OpenSource Url):https://github.com/castor-software/depclean开源编程语言(OpenSource Language):Java 97.7%开源软件介绍(OpenSource Introduction):DepCleanWhat is DepClean?DepClean automatically cleans the dependency tree of Java projects.
It removes all the dependencies that are included in the project's dependency tree but are not actually necessary to build it.
DepClean detects and removes all the unused dependencies declared in the For a visual illustration of what DepClean can provide for your project, have a look at the companion depclean-web project. UsageConfigure the <plugin>
<groupId>se.kth.castor</groupId>
<artifactId>depclean-maven-plugin</artifactId>
<version>2.0.2</version>
<executions>
<execution>
<goals>
<goal>depclean</goal>
</goals>
</execution>
</executions>
</plugin> Or you can run DepClean directly from the command line. cd PATH_TO_MAVEN_PROJECT
mvn compile
mvn compiler:testCompile
mvn se.kth.castor:depclean-maven-plugin:2.0.2:depclean Let's see an example of running DepClean version 2.0.1 in the project Apache Commons Numbers! Optional ParametersThe Maven plugin can be configured with the following additional parameters.
You can integrate DepClean in your CI/CD pipeline.
For example, if you want to fail the build in the presence of unused direct dependencies, while ignoring all the dependency scopes except the
<plugin>
<groupId>se.kth.castor</groupId>
<artifactId>depclean-maven-plugin</artifactId>
<version>2.0.2</version>
<executions>
<execution>
<goals>
<goal>depclean</goal>
</goals>
<configuration>
<failIfUnusedDirect>true</failIfUnusedDirect>
<ignoreScopes>test,runtime,provided,test,runtime,system,import</ignoreScopes>
</configuration>
</execution>
</executions>
</plugin> Of course, it is also possible to execute DepClean with parameters directly from the command line. The previous example can be executed directly as follows: mvn se.kth.castor:depclean-maven-plugin:2.0.2:depclean -DfailIfUnusedDirect=true -DignoreScopes=provided,test,runtime,system,import How does DepClean works?DepClean runs before executing the With this usage information, DepClean constructs a new
If all the tests pass, and the project builds correctly after these changes, then it means that the dependencies identified as bloated can be removed. DepClean produces a file named Installing and building from sourcePrerequisites:
In a terminal clone the repository and switch to the cloned folder: git clone https://github.com/castor-software/depclean.git
cd depclean Then run the following Maven command to build the application and install the plugin locally: mvn clean install LicenseDistributed under the MIT License. See LICENSE for more information. FundingDepClean is partially funded by the Wallenberg Autonomous Systems and Software Program (WASP). |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论