Coder Social home page Coder Social logo

dependency_cleaner's Introduction

DEPENDENCY CLEANER

Dependency cleaner for maven projects (customized for springboot)

Dependency cleaner is a program built for Springboot projects(Maven) to make removing dependencies from your projects easier. The inspiration struck me while I was at work and saw how our POM file was growing complicated, making it difficult to maintain and difficult to locate unneeded Dependencies.

You can get the rar to your machine with the following link https://github.com/junaidbs/dependency_cleaner/releases/tag/v0.2.0-alpha

HOW TO USE

To use the Dependency Cleaner tool, follow these steps:

  • Download and extract the tool.
  • Open a command prompt inside the extracted folder.
  • Type the following command: java -jar dependencycleaner-0.0.1-SNAPSHOT.jar {path-to-spring-boot-maven-folder} {optional-spring-boot-service-stop-statement}.
  • Replace {path-to-spring-boot-maven-folder} with the path to the folder containing your Spring Boot project's POM file.
  • Optionally, add a {optional-spring-boot-service-stop-statement} to stop the Spring Boot service.

The tool will automate the following steps:

  • Remove dependencies.
  • Build a JAR file.
  • Run the JAR file to ensure that no runtime dependency is missing.
  • If the JAR file runs successfully, the dependencies will be removed.
  • If the build or run fails, the dependencies will not be removed.

run_command

OUTPUT

logs If a removed dependency is required for the project, the message "Dependency deletion failed, the removed dependency is still being used" will be displayed.

logs1

logs3 If a removed dependency is not needed for the project, the message "Unused dependency deletion successful" will be displayed.

The tool creates a backup of the original POM file as "backup_pom.xml", allowing you to compare it with the modified POM file later.

JAVA FILE-> https://github.com/junaidbs/dependency_cleaner/blob/v0.2.0-alpha/src/main/java/com/cleaner/dependency/MavenDependencyCleaner.java

dependency_cleaner's People

Contributors

junaidbs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.