0

I develop an Android application using Maven.

I removed several depdendencies from the pom.xml file, then ran mvn clean install and noticed that the removed dependencies are still used in dex invocation (android-maven-plugin:3.5.0:dex).

I deleted .m2/cache directory and put following code in my settings file as an attempt to fix this problem:

<settings>
    <profiles>
      <repositories>
        <repository>
          <releases>
            <enabled/>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy/>
          </releases>
          <snapshots>
            <enabled/>
            <updatePolicy>always</updatePolicy>
            <checksumPolicy/>
          </snapshots>
          <id/>
          <name/>
          <url/>
          <layout/>
        </repository>
      </repositories>       
    </profiles>
</settings>

But it didn't help.

How can make Maven aware of the fact that the old dependencies (which I removed from the POM) should not be used in compilation of the application?

4

1 回答 1

1

I suggest running mvn dependency:tree and making sure that the dependencies you expect to be removed aren't pulled by something else.

于 2013-03-31T14:58:58.033 回答