stdll
stdll

Reputation: 687

Where do generated DEPENDENCIES files come from?

In quite a lot of Apache project there is a file called DEPENDENCIES which is generated from the POM and all POMs of transitive dependencies. However I couldn't find any information about how these files are generated. I suspect there is a Maven plugin for this...

Here is an example: https://raw.githubusercontent.com/sonatype/maven-demo/master/DEPENDENCIES

How can I generate such a file?

Upvotes: 0

Views: 46

Answers (1)

khmarbaise
khmarbaise

Reputation: 97359

I have made an example to show how this works:

<build>
    <plugins>
      <plugin>
        <artifactId>maven-remote-resources-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>process</goal>
            </goals>
            <configuration>
              <resourceBundles>
                <resourceBundle>org.apache:apache-jar-resource-bundle:1.4</resourceBundle>
              </resourceBundles>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

The tricky plugin is the maven-remote-resouces-plugin which can handle velocity templates which will to the trick here.

Upvotes: 1

Related Questions