it-crowd / pom-sorter

Plugin for IntelliJ Idea to sort pom.xml
4 stars 9 forks source link

No sort of ant tasks by default #21

Open blabno opened 10 years ago

blabno commented 10 years ago

By default Pom-sorter substitutes those two lines, which causes build to fail:

<mkdir dir="${project.build.directory}/downloads"/>
<get src="http://archive.apache.org/dist/tomcat/tomcat-7/v${version.org.apache.tomcat}/bin/apache-tomcat-${version.org.apache.tomcat}.zip"
    dest="${project.build.directory}/downloads" verbose="true" skipexisting="true"/>

Full plugin config:

                 <plugin>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <executions>
                        <execution>
                            <phase>generate-test-resources</phase>
                            <goals>
                                <goal>run</goal>
                            </goals>
                            <configuration>
                                <tasks>
                                    <!-- Remove the default ROOT webapp so it won't collide with tests -->
                                    <delete dir="${project.build.directory}/apache-tomcat-${version.org.apache.tomcat}/webapps/ROOT"/>
                                    <mkdir dir="${project.build.directory}/downloads"/>
                                    <get src="http://archive.apache.org/dist/tomcat/tomcat-7/v${version.org.apache.tomcat}/bin/apache-tomcat-${version.org.apache.tomcat}.zip"
                                         dest="${project.build.directory}/downloads" verbose="true" skipexisting="true"/>
                                    <unzip src="${project.build.directory}/downloads/apache-tomcat-${version.org.apache.tomcat}.zip"
                                           dest="${project.build.directory}"/>
                                </tasks>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>