为什么IntelliJ会生成Maven ATTACHED_JAR xml文件?

时间:2013-05-07 07:36:00

标签: android maven intellij-idea

我的项目依赖于ActionBarSherlock,HoloEverywhere和其他类似的东西:

<dependency>
    <groupId>com.actionbarsherlock</groupId>
    <artifactId>actionbarsherlock</artifactId>
    <type>apklib</type>
</dependency>

由于某些原因,IntelliJ会生成这样的文件:

.idea/libraries/Maven__ATTACHED_JAR__com_actionbarsherlock_actionbarsherlock_apklib_4_3_0.xml

内容:

<component name="libraryTable">
  <library name="Maven: ATTACHED-JAR: com.actionbarsherlock:actionbarsherlock:apklib:4.3.0">
    <CLASSES>
      <root url="jar://$PROJECT_DIR$/contrib/ActionBarSherlock/actionbarsherlock/target/actionbarsherlock-4.3.0.jar!/" />
      <root url="jar://$PROJECT_DIR$/contrib/ActionBarSherlock/actionbarsherlock/target/actionbarsherlock-4.3.0.jar!/" />
      <root url="jar://$PROJECT_DIR$/contrib/ActionBarSherlock/actionbarsherlock/target/actionbarsherlock-4.3.0.jar!/" />
      <root url="jar://$PROJECT_DIR$/contrib/ActionBarSherlock/actionbarsherlock/target/actionbarsherlock-4.3.0.jar!/" />
      <root url="jar://$PROJECT_DIR$/contrib/ActionBarSherlock/actionbarsherlock/target/actionbarsherlock-4.3.0.jar!/" />
      <root url="jar://$PROJECT_DIR$/contrib/ActionBarSherlock/actionbarsherlock/target/actionbarsherlock-4.3.0.jar!/" />
      <root url="jar://$PROJECT_DIR$/contrib/ActionBarSherlock/actionbarsherlock/target/actionbarsherlock-4.3.0.jar!/" />
      <root url="jar://$PROJECT_DIR$/contrib/ActionBarSherlock/actionbarsherlock/target/actionbarsherlock-4.3.0.jar!/" />
    </CLASSES>
    <JAVADOC />
    <SOURCES />
  </library>
</component>

我会将这些文件添加到源代码管理中,但它们会不断变化。在该文件中每隔一段时间添加一条额外的行:

<root url="jar://$PROJECT_DIR$/contrib/ActionBarSherlock/actionbarsherlock/target/actionbarsherlock-4.3.0.jar!/" />

我有什么办法可以摆脱这些文件吗?

1 个答案:

答案 0 :(得分:0)

它们是IntelliJ内部配置的一部分,“摆脱它们”会破坏你的IDE。

IMO您很少想要检查IDE配置文件,特别是如果有多个开发人员。将目录添加到SCCS的忽略列表中。