从svn共享项目之后,maven中的pom.xml文件报错。
查阅资料自己整理
在pom.xml上加入这句话
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.5</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
加入后pom.xml的<plugins>是这个样子:
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-eclipse-plugin</artifactId>
- <configuration>
- <sourceIncludes>
- <sourceInclude>**/*.*</sourceInclude>
- </sourceIncludes>
- <projectNameTemplate>[artifactId]</projectNameTemplate>
- <wtpmanifest>true</wtpmanifest>
- <wtpapplicationxml>true</wtpapplicationxml>
- <wtpversion>2.0</wtpversion>
- <manifest>${basedir}/src/main/resources/META-INF/MANIFEST.MF
- </manifest>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.5</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- </plugins>