Code Monkey home page Code Monkey logo

dependencycleaner's People

Contributors

javagl avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

dependencycleaner's Issues

Add more flexibility for where and how to start the scan process

Right now, the tool offers the option to drag-and-drop a pom.xml and figure out its dependencies. (These are passed as a list of https://github.com/javagl/DependencyCleaner/blob/master/src/main/java/de/javagl/dependencycleaner/ArtifactInfo.java objects to the downstream dependency resolution etc).

There should be some more flexibility in that. Particularly, there should also be the option to scan the local .m2 directory for broken JARs. Maybe one could also add some filter or search functionality for that (e.g. "Seach for JARs that have groupID de.javagl"), or allow scanning only subdirectories. (The .m2 folder can be huge ...)

Are there other options that should be considered?

(Probably, at some point, one might even want to configure local repos, or even extract them from some POM. That would be a second step, but should be kept in mind)

There may be invalid files that are not detected

Currently, the detection whether a file is "invalid" is solely done by creating a new JarFile object. For totally broken files, this already throws an exception and thus they are detected.

But there may be files where the famous "Invalid LOC header" message appears, and this seems only to appear when trying to access the classes in the JAR.

The detection of whether a JAR is "invalid" should therefore at least iterate over all entries of the JAR/ZIP file, to see whether they can be accessed.

More cleanly separate model and view

The current, initial implementation was a first shot to get the basic functionality integrated and working. The result can be considered as a standalone tool that may be useful for someone.

For further development, the basic structure should be cleaned up a little. A first step here would be to more cleanly define the "data model" that the dependency cleaner operates on. Currently, this is mostly summarized in the https://github.com/javagl/DependencyCleaner/blob/master/src/main/java/de/javagl/dependencycleaner/DependencyStatus.java and https://github.com/javagl/DependencyCleaner/blob/master/src/main/java/de/javagl/dependencycleaner/DependencyTreeNode.java classes. These classes mainly serve the purpose of decoupling layer between the dependency cleaner and the Eclipse Aether classes that are used internally for the dependency resolution. The first refactoring would be to pull out the current "model" classes into an own package (and probably convert them into interfaces - this is something that I do basically "by default"), and maybe extend them with some basic MVC support (i.e. the option to add Listeners to be informed about state changes - right now, this is handled in the UI...).

The UI was written quickly and pragmatically. I think it does make sense to present the information in a TreeTable, but maybe other presentations (maybe even based on a different UI toolkit) should be considered. So the UI classes could be pulled into a ui.swing package.

Although this will not imply many changes from a conceptual point of view, classes will be moved around and renamed, so it should be done as one, coordinated refactoring step.

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.