用eclipse编写xml编写出的格式是:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.juvenxu.mvnbook</groupId>
<artifactId>hello-world</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Maven Hello World Project</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
全部是靠边对齐的
我想让他成为下面这样的
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>com.juvenxu.mvnbook.helloworld.HelloWorld</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
![](http://dl.iteye.com/upload/attachment/482495/85e0b6fe-e7a4-3bc4-98f9-dd4f95d12213.jpg)
![](https://img-my.csdn.net/uploads/201207/04/1341390858_1162.png)
![](https://img-my.csdn.net/uploads/201207/04/1341390877_1069.png)
![](https://img-my.csdn.net/uploads/201207/04/1341391077_8776.png)