it-crowd / pom-sorter

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

Expending children of not sorted tag #4

Closed blabno closed 11 years ago

blabno commented 11 years ago

If <target> is configured not be sorted, then child tag (simple node) is turned into a "complex" node.

Before:

<target>
    <echo message="bla"/>
</target>

After sorting:

<target>
    <echo message="bla"></echo>
</target>
BorzdeG commented 11 years ago

before:

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>20-restart-tomcat</id>
                                <phase>install</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <target>
                                        <echo message="Stopping server ..." />
                                        <sshexec host="${tomcat.host}"
                                                         command="${tomcat.script.shutdown}"
                                                         username="${ssh.user}"
                                                         keyfile="${user.home}/.ssh/id_dsa"
                                                         trust="true" />
                                        <echo message="Starting server ..." />
                                        <sshexec host="${tomcat.host}"
                                                         command="${tomcat.script.startup}"
                                                         username="${ssh.user}"
                                                         keyfile="${user.home}/.ssh/id_dsa"
                                                         trust="true" />
                                    </target>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

after:

                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>20-restart-tomcat</id>
                                <phase>install</phase>
                                <configuration>
                                    <target>
                                        <echo message="Stopping server ..."></echo>
                                        <sshexec host="${tomcat.host}"
                                                         command="${tomcat.script.shutdown}"
                                                         username="${ssh.user}"
                                                         keyfile="${user.home}/.ssh/id_dsa"
                                                         trust="true"></sshexec>
                                        <echo message="Starting server ..."></echo>
                                        <sshexec host="${tomcat.host}"
                                                         command="${tomcat.script.startup}"
                                                         username="${ssh.user}"
                                                         keyfile="${user.home}/.ssh/id_dsa"
                                                         trust="true"></sshexec>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>