I have a need to iterate through the dependencies in pom.xml.  I created
a plugin and tried to passed ${dependencies} in pom.xml as a parameter
to the plugin.  Unfortunately, ${dependencies} is passed in as a String
instead of a List of objects.  How does one do that?  Also, is there a
way to print out the scope for each dependency?  I like to use it to
remove jars used only in testing.

Below is a portion of pom.xml and the mvn package run.

{pom.xml}

      <plugin>
        <groupId>ehcomponents</groupId>
        <artifactId>maven-classpath-plugin</artifactId>
        <configuration>
          <dependencies>${dependencies}</dependencies>
        </configuration>
        <executions>
          <execution>
            <phase>package</phase>
            <goals>
              <goal>classpath</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

{output of mvn package}

[INFO] [jar:jar]
[INFO] Building jar: /home/skuo/sandbox/mvnApp/mvnJar/target/mvnJar-1.0-
SNAPSHOT.jar
[INFO] [classpath:classpath {execution: default}]
[INFO] Generating classpath.sh
[INFO] dependencies: [Dependency {groupId=junit, artifactId=junit,
version=3.8.1, type=jar}, Dependency {groupId=mx4j, artifactId=mx4j,
version=3.0.1, type=jar}]


-- 
Steve Kuo
eHarmony
300 N. Lake Ave., Suite 1111
Pasadena, CA 91101
[EMAIL PROTECTED]
626.795.4814, x-1021


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to