{"id":699,"date":"2016-01-29T22:39:44","date_gmt":"2016-01-29T22:39:44","guid":{"rendered":"http:\/\/www.pnambic.com\/home\/?p=699"},"modified":"2016-02-10T23:15:12","modified_gmt":"2016-02-10T23:15:12","slug":"depan-now-supports-maven-dependency-visualization","status":"publish","type":"post","link":"http:\/\/www.pnambic.com\/home\/2016\/01\/29\/depan-now-supports-maven-dependency-visualization\/","title":{"rendered":"DepAn now supports Maven dependency visualization"},"content":{"rendered":"<h1>DepAn Support For Maven POMs<\/h1>\n<p>A recent set of git commits\u00a0has added Maven POM support to the base <a href=\"http:\/\/google.github.io\/depan\/\">DepAn <\/a>product. Interested users should be able to access these capabilities in any recent build of DepAn.\u00a0The current Maven support\u00a0is focused on exploiting DepAn\u2019s dependency visualization capabilities to analyze Maven projects. Several different kinds of elements and relations are supported:<\/p>\n<p>Elements<\/p>\n<ul>\n<li>Artifacts<\/li>\n<li>Properties<\/li>\n<\/ul>\n<p>Relations<\/p>\n<ul>\n<li>Different relations for each dependency scope (compile, import, provided, runtime, system, and test)<\/li>\n<li>Parent<\/li>\n<li>Module (aggregation)Properties<\/li>\n<\/ul>\n<p>The basic analysis package includes a number of pragmatic relation sets. These allow an analyst to quickly sort through the elements and relations to find those components that need attention.<\/p>\n<p>With these definitions, DepAn\u2019s graph analysis and presentation tools can be used to discover (and expose) interesting architectural features. All of DepAn\u2019s graph analysis and diagram rendering features should be fully functional.<\/p>\n<p>There are a number of fairly obvious and desirable UX improvements. A user option for compact labels on the diagram page looks very useful. Work on these enhancements will depend on the interest expressed by users.<\/p>\n<h2>Analyzing POM Files<\/h2>\n<p>The Maven POM analysis plugin also includes a simple POM file analyzer. This analyzer is available as the New Maven POM Analysis wizard.\u00a0In the New Maven POM Analysis wizard, the Maven POM field defines the POM file that will be analyzed by the plug. The Browse button allows you to select the source.<\/p>\n<p>For routine analysis of most Maven projects, the Processing option should be set to <strong>compute<\/strong>. This directs the Maven POM analysis feature to run the Maven <tt>help:effective-pom<\/tt> mojo before analyzing the XML document. The <strong>as is<\/strong> value for the Processing option is most useful to process the saved output from Maven\u2019s <tt>help:effective-pom<\/tt> mojo. Unless you are analyzing the saved output from that mojo, the Processing options should be set to <strong>compute<\/strong>.<\/p>\n<p>Although this analyzer is adequate for many projects, it serves primarily as a prototype for a more robust design. The current analyzer uses the <tt>Maven help:effective-pom<\/tt> mojo to resolve the dependencies in each POM. A better solution would be a <tt>depan:analyze-dependencies<\/tt> Maven mojo that dumps the entire set of dependencies in the Maven reactor in a single Maven execution.<\/p>\n<p>The current analyzer uses the Maven <tt>help:effective-pom<\/tt> to help resolve dependencies. If a master POM aggregates a number of child projects, Maven is executed again for each child project. This process might fail if the POM files have changes since the last build. Best results require a successful Maven build (e.g. <tt>clean install<\/tt>) just before using the New Maven POM Analysis wizard.<\/p>\n<p>As project size grows, the number of aggregated projects increases. This can lead to lengthy times for the Maven POM analysis, since a new Maven instance is started for each of the aggregated modules. At some future date, a <tt>depan:analyze-dependencies<\/tt> mojo should be able to complete the analysis with a single Maven execution.<\/p>\n<h2>Preferences and Configuration<\/h2>\n<p>In order to run the Maven POM analyzer, the plugin needs to know the path to the Maven executable and the environment variable <tt>JAVA_HOME<\/tt>. Both of these can be configured on the Preferences page, under the Maven POM Analysis entry.<\/p>\n<p>On Windows machine, the Maven Executable should be a file ending with \u2018<tt>.cmd<\/tt>\u2019. Other file extensions may be appropriate (or irrelevant) on other platforms.<\/p>\n<p>In many cases, the <tt>JAVA_HOME<\/tt> provided by the system is the correct one to use. If it is not correct, the Module POM Analysis preference JAVA_HOME can be set to an appropriate directory.<\/p>\n<p>The Effective POM command is rarely changed. It is available mostly for development and debugging purposes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>DepAn Support For Maven POMs A recent set of git commits\u00a0has added Maven POM support to the base DepAn product. Interested users should be able to access these capabilities in any recent build of DepAn.\u00a0The current Maven support\u00a0is focused on exploiting DepAn\u2019s dependency visualization capabilities to analyze Maven projects. Several different kinds of elements and<a class=\"moretag\" href=\"http:\/\/www.pnambic.com\/home\/2016\/01\/29\/depan-now-supports-maven-dependency-visualization\/\"> [&#8230;]<\/a><\/p>\n","protected":false},"author":1,"featured_media":677,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[31],"tags":[],"class_list":["post-699","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.pnambic.com\/home\/wp-content\/uploads\/2015\/12\/depan-icon-60x60.png?fit=60%2C60","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6YqIw-bh","_links":{"self":[{"href":"http:\/\/www.pnambic.com\/home\/wp-json\/wp\/v2\/posts\/699","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.pnambic.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.pnambic.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.pnambic.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.pnambic.com\/home\/wp-json\/wp\/v2\/comments?post=699"}],"version-history":[{"count":5,"href":"http:\/\/www.pnambic.com\/home\/wp-json\/wp\/v2\/posts\/699\/revisions"}],"predecessor-version":[{"id":714,"href":"http:\/\/www.pnambic.com\/home\/wp-json\/wp\/v2\/posts\/699\/revisions\/714"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.pnambic.com\/home\/wp-json\/wp\/v2\/media\/677"}],"wp:attachment":[{"href":"http:\/\/www.pnambic.com\/home\/wp-json\/wp\/v2\/media?parent=699"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.pnambic.com\/home\/wp-json\/wp\/v2\/categories?post=699"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.pnambic.com\/home\/wp-json\/wp\/v2\/tags?post=699"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}