<commit_before><?xml version="1.0"?>
<!-- $Id$ -->
<document>
  <properties>
    <title>Using flatten-maven-plugin in a simple project</title>
  </properties>

  <body>
    <section name="Using flatten-maven-plugin in a simple project">
      Actually flatten-maven-plugin is designed for (large) multi-module-projects it can also be used
      for simple projects.
      <subsection name="Single POM">
        If you have just a single POM add flatten-maven-plugin in the build section:
        <source><![CDATA[
<!-- Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt -->
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example.whizbang</groupId>
  <artifactId>whizbang</artifactId>
  <version>3.1.7-SP2</version>
  <packaging>jar</packaging>

  <properties>
    <spring.version>4.0.2.RELEASE<spring.version>
  </properties>

  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <!--<version>1.0</version>-->
        <configuration>
        </configuration>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <developers>
    <developer>
      <id>hohwille</id>
      <name>J&#246;<NAME></name>
      <email><EMAIL></email>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>Apache Software Licenese</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <comments/>
    </license>
  </licenses>
</project>
        ]]></source>
        If you install or deploy the project the flattened POM of whizbang that goes into the repository will look like this:
        <source><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt -->
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example.whizbang</groupId>
  <artifactId>whizbang-module1</artifactId>
  <version>3.1.7-SP2</version>
  <packaging>jar</packaging>
  <dependencies>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>4.0.2.RELEASE</version>
    </dependency><commit_msg>fixed mistake in example for site<commit_after><?xml version="1.0"?>
<!-- $Id$ -->
<document>
  <properties>
    <title>Using flatten-maven-plugin in a simple project</title>
  </properties>

  <body>
    <section name="Using flatten-maven-plugin in a simple project">
      Actually flatten-maven-plugin is designed for (large) multi-module-projects it can also be used
      for simple projects.
      <subsection name="Single POM">
        If you have just a single POM add flatten-maven-plugin in the build section:
        <source><![CDATA[
<!-- Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt -->
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example.whizbang</groupId>
  <artifactId>whizbang</artifactId>
  <version>3.1.7-SP2</version>
  <packaging>jar</packaging>

  <properties>
    <spring.version>4.0.2.RELEASE<spring.version>
  </properties>

  <build>
    <plugins>
      ...
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>flatten-maven-plugin</artifactId>
        <!--<version>1.0</version>-->
        <configuration>
        </configuration>
        <executions>
          <execution>
            <id>flatten</id>
            <phase>process-resources</phase>
            <goals>
              <goal>flatten</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>${spring.version}</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <developers>
    <developer>
      <id>hohwille</id>
      <name>J&#246;<NAME></name>
      <email><EMAIL></email>
    </developer>
  </developers>
  <licenses>
    <license>
      <name>Apache Software Licenese</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <comments/>
    </license>
  </licenses>
</project>
        ]]></source>
        If you install or deploy the project the flattened POM of whizbang that goes into the repository will look like this:
        <source><![CDATA[
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0.txt -->
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.example.whizbang</groupId>
  <artifactId>whizbang</artifactId>
  <version>3.1.7-SP2</version>
  <packaging>jar</packaging>
  <dependencies>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-tx</artifactId>
      <version>4.0.2.RELEASE</version>
    </dependency>
{'fraction_non_alphanumeric': 0.15731292517006804, 'fraction_numerical': 0.013775510204081633, 'mean_word_length': 2.7966429954809553, 'pattern_counts': {'":': 0, '<': 259, '<?xml version=': 4, '>': 257, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2488643', 'n_tokens_mistral': 1982, 'n_tokens_neox': 1819, 'n_words': 342}