-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce maven-based visualization plugin #62
Comments
This would certainly be possible and AFAIK all one needs for this is a maven plugin for Degraph. Although I never wrote a Maven plugin, it's supposedly rather easy. Unfortunately my time is very limited and a Maven plugin isn't very high on my list of priorities. So I won't implement this in the foreseeable future. But if somebody else wants to do it, I'll support the effort (setting it up in the build file, making modifications to the core if necessary, accepting the pull request ..). |
I did not write them before, too. Excellent reason to try. |
If you want to do it you have two options:
If you want follow one of these roads, let me know, I can put together some pointers how to get started with the degraph side of things |
The implementation of the plugin would be rather easy I guess, however, building a maven plugin using gradle is not directly possible (AFAIK). You can have a look at the jgiven-maven-plugin, which also uses gradle, but requires maven behind the scenes for building the plugin: https://github.com/TNG/JGiven/tree/master/jgiven-maven-plugin |
@janschaefer, thank you, I will take a look. |
@schauder, I like option no. 2: new module in this project.
|
The plugin would have a dependency on degraph-core so it can use the Degraph functionality. For how to use it, probably the best is to look at the Degraph main method: https://github.com/schauder/degraph/blob/master/degraph/src/main/scala/de/schauderhaft/degraph/app/Degraph.scala You create a Configuration instance, pass in an (Analyzer)[https://github.com/schauder/degraph/blob/master/core/src/main/scala/de/schauderhaft/degraph/analysis/asm/Analyzer.scala] and get out a (Graph)[https://github.com/schauder/degraph/blob/master/core/src/main/scala/de/schauderhaft/degraph/graph/Graph.scala], which contains information about violations of Constraints. |
E.g. look at sonar: it is possible to invoke sonar analysis even without altering project's pom.xml: just alter your global setting.xml(example: https://gist.github.com/nkabir/2159177 ), then execute mvn sonar:sonar.
Is it hard to introduce same functionality(degraph maven plugin) into Degraph suite?
The text was updated successfully, but these errors were encountered: