mojohaus / flatten-maven-plugin

Flatten Maven Plugin
https://www.mojohaus.org/flatten-maven-plugin/
Apache License 2.0
201 stars 85 forks source link

In some project, plugin is useless and does not create flatten-pom.xml #60

Open tribbloid opened 6 years ago

tribbloid commented 6 years ago

In this project:

https://github.com/tribbloid/factorie/tree/scala-2.10

I have declared flatten-maven-plugin exactly as in example:

...
            <configuration>
              <recompileMode>incremental</recompileMode>
              <useZincServer>false</useZincServer>
              <scalaVersion>${scala.majorVersion}${scala.minorVersion}</scalaVersion>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <!--TODO: USELESS! WTF?-->
            <artifactId>flatten-maven-plugin</artifactId>
            <version>1.0.1</version>
            <executions>
              <!-- enable flattening -->
              <execution>
                <id>flatten</id>
                <phase>process-resources</phase>
                <goals>
                  <goal>flatten</goal>
                </goals>
              </execution>
              <!-- ensure proper cleanup -->
              <execution>
                <id>flatten.clean</id>
                <phase>clean</phase>
                <goals>
                  <goal>clean</goal>
                </goals>
              </execution>
            </executions>

          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.2.1</version>
...

But after executing mvn install, no flatten-pom.xml was generated. The installed artifact still has numerous unflattened property references.

Please fix it in the next release.

hohwille commented 5 years ago

The file is not named flattend-pom.xml but .flattened-pom.xml so it does not accidentally get committed into git or the like. Please properly check for this file. For the "numerous unflattened property references" maybe only your expectations are wrong. To me it is entirely unclear what your problem actually is. Without further details I can not help.