'svn diff'显示输出似乎没有变化

时间:2013-11-06 22:38:27

标签: eclipse maven svn

'.classpath'文件中的某个'svn diff'给出了以下输出。我看不到工作副本(+)和原始副本( - )之间有什么区别(是吗?)。问题是我没有更改这些文件(即我没有尝试更改项目的构建路径)但它们似乎在构建期间被修改。我使用STS 3.3.0.RELEASE,没有'svn'插件。我确实使用maven插件进行eclipse构建。

如果他们没有被触及,那就太好了。有没有办法,我可以保证这个吗?另一方面,如果我的'.classpath'文件没有被触及,那么为什么'svn diff'给我这个输出?

感谢。

@@ -1,29 +1,29 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-   <classpathentry kind="src" output="target/classes" path="src/main/java">
-       <attributes>
-           <attribute name="optional" value="true"/>
-           <attribute name="maven.pomderived" value="true"/>
-       </attributes>
-   </classpathentry>
-   <classpathentry including="**/*.java" kind="src" path="src/main/resources"/>
-   <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-   <classpathentry kind="src" output="target/test-classes" path="src/test/java">
-       <attributes>
-           <attribute name="optional" value="true"/>
-           <attribute name="maven.pomderived" value="true"/>
-       </attributes>
-   </classpathentry>
-   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
-       <attributes>
-           <attribute name="maven.pomderived" value="true"/>
-       </attributes>
-   </classpathentry>
-   <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
-       <attributes>
-           <attribute name="maven.pomderived" value="true"/>
-           <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
-       </attributes>
-   </classpathentry>
-   <classpathentry kind="output" path="target/classes"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+   <classpathentry kind="src" output="target/classes" path="src/main/java">
+       <attributes>
+           <attribute name="optional" value="true"/>
+           <attribute name="maven.pomderived" value="true"/>
+       </attributes>
+   </classpathentry>
+   <classpathentry including="**/*.java" kind="src" path="src/main/resources"/>
+   <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+   <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+       <attributes>
+           <attribute name="optional" value="true"/>
+           <attribute name="maven.pomderived" value="true"/>
+       </attributes>
+   </classpathentry>
+   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
+       <attributes>
+           <attribute name="maven.pomderived" value="true"/>
+       </attributes>
+   </classpathentry>
+   <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+       <attributes>
+           <attribute name="maven.pomderived" value="true"/>
+           <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+       </attributes>
+   </classpathentry>
+   <classpathentry kind="output" path="target/classes"/>
+</classpath>

1 个答案:

答案 0 :(得分:1)

@JimLewis和其他人在问题下面的评论中提出的怀疑确实如此。将所述命令的输出保存到文件中并对该文件执行cat -v会产生以下输出:

@@ -1,34 +1,34 @@
-<?xml version="1.0" encoding="UTF-8"?>^M
-<classpath>^M
-   <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>^M
-   <classpathentry kind="src" output="target/classes" path="src/main/java">^M
-       <attributes>^M
-           <attribute name="optional" value="true"/>^M
-           <attribute name="maven.pomderived" value="true"/>^M
-       </attributes>^M
-   </classpathentry>^M
-   <classpathentry kind="src" output="target/test-classes" path="src/test/java">^M
-       <attributes>^M
-           <attribute name="optional" value="true"/>^M
-           <attribute name="maven.pomderived" value="true"/>^M
-       </attributes>^M
-   </classpathentry>^M
-   <classpathentry kind="src" path="src/main/resources"/>^M
-   <classpathentry combineaccessrules="false" kind="src" path="/net.holisticlabs.libs.io"/>^M
-   <classpathentry combineaccessrules="false" kind="src" path="/net.holisticlabs.libs.config"/>^M
-   <classpathentry exported="true" kind="lib" path="jars-not-in-maven-repo/eventful.jar"/>^M
-   <classpathentry combineaccessrules="false" kind="src" path="/net.holisticlabs.libs.nlp"/>^M
-   <classpathentry combineaccessrules="false" kind="src" path="/net.holisticlabs.libs.attrs"/>^M
-   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">^M
-       <attributes>^M
-           <attribute name="maven.pomderived" value="true"/>^M
-       </attributes>^M
-   </classpathentry>^M
-   <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">^M
-       <attributes>^M
-           <attribute name="maven.pomderived" value="true"/>^M
-           <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>^M
-       </attributes>^M
-   </classpathentry>^M
-   <classpathentry kind="output" path="target/classes"/>^M
-</classpath>^M
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+   <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+   <classpathentry kind="src" output="target/classes" path="src/main/java">
+       <attributes>
+           <attribute name="optional" value="true"/>
+           <attribute name="maven.pomderived" value="true"/>
+       </attributes>
+   </classpathentry>
+   <classpathentry kind="src" output="target/test-classes" path="src/test/java">
+       <attributes>
+           <attribute name="optional" value="true"/>
+           <attribute name="maven.pomderived" value="true"/>
+       </attributes>
+   </classpathentry>
+   <classpathentry including="**/*.java" kind="src" path="src/main/resources"/>
+   <classpathentry combineaccessrules="false" kind="src" path="/net.holisticlabs.libs.io"/>
+   <classpathentry combineaccessrules="false" kind="src" path="/net.holisticlabs.libs.config"/>
+   <classpathentry exported="true" kind="lib" path="jars-not-in-maven-repo/eventful.jar"/>
+   <classpathentry combineaccessrules="false" kind="src" path="/net.holisticlabs.libs.nlp"/>
+   <classpathentry combineaccessrules="false" kind="src" path="/net.holisticlabs.libs.attrs"/>
+   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
+       <attributes>
+           <attribute name="maven.pomderived" value="true"/>
+       </attributes>
+   </classpathentry>
+   <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+       <attributes>
+           <attribute name="maven.pomderived" value="true"/>
+           <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
+       </attributes>
+   </classpathentry>
+   <classpathentry kind="output" path="target/classes"/>
+</classpath>

原始的'.classpath'是在Windows机器上生成的,它使用CRLF换行符,而我的unix机器上的maven则用LF换行符替换它们。同样建议,svn:ignore'svn revert'可用于处理此类案件。