Code Monkey home page Code Monkey logo

maven-dependency-analyzer-spring's Introduction

Introduction
------------

This project enhances the Maven Dependency Plugin 

http://maven.apache.org/plugins/maven-dependency-plugin

by adding support for extracing dependency information
from a project's Spring XML files. It is a fork of 
https://github.com/toby1984/maven-dependency-analyzer-spring

When enabled, a project's resources and test resources (usually located
in src/main/resources and src/test/resources) will be scanned for Spring XML files and all
bean definitions will be considered as project dependencies as well.

Differences with the fork 
--------------------------
* Update the dependencies to maven-dependency-analyzer
* Improve the logic for detecting Spring XML files
* Reduce the changes in the superclass DefaultProjectDependencyAnalyzer

Requirements
------------

Java JDK 1.5+ (both for compiling AND RUNNING the plugin)
Maven 2.2.1+ (older versions will probably work as well)
Maven Dependency Plugin 2.10+

Compiling and installing
------------------------

To actually get the maven-dependency-plugin to support this extension:

1. Patch and mvn install maven-dependency-analyzer 1.1

svn co http://svn.apache.org/repos/asf/maven/shared/tags/maven-dependency-analyzer-1.6 maven-dependency-analyzer
cd maven-dependency-analyzer 
patch -p0 -F3 < apache-maven-dependency-analyzer-1.6.patch
mvn install

2. Install maven-dependency-analyzer-spring

cd maven-dependency-analyzer-spring 
mvn install

I open a ticket (see http://jira.codehaus.org/browse/MSHARED-412) for this change. 

Usage
-----

To enable scanning Spring XMLs for dependencies you need to add 
this project's artifact as a dependency of the maven-dependency-plugin 
and set the plugin'S 'analyzer' property to value 'spring'. 

Declare the maven-dependency-plugin in your pom.xml using the following
XML snippet:

--->8---->8---
<build>
  <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.10</version>
        <dependencies>
          <dependency>
            <groupId>de.codesourcery.maven.shared</groupId>
            <artifactId>maven-dependency-analyzer-spring</artifactId>
            <version>1.0.0-SNAPSHOT</version>
          </dependency>
        </dependencies>
        <configuration>
          <analyzer>spring</analyzer>
        </configuration>
      </plugin>
  </plugins>
</build>
--->8---->8---

When running 'mvn dependency:analyze' on a project
with Spring XMLs , you should see the following output:

[INFO] Including dependencies from Spring XMLs in analysis
[INFO] Scanned Spring XML < ... Spring XML file ... > 

maven-dependency-analyzer-spring's People

Contributors

toby1984 avatar sparsick avatar

Watchers

 avatar  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.