maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Osowski <joe.osow...@gmail.com>
Subject maven-dependency-plugin purge proper usage
Date Sat, 11 May 2013 18:28:53 GMT
I'm trying to use the dependency plugin to purge a few dependencies prior to the build to make
sure the latest dependencies are downloaded, as we sometimes change the non snapshot released
binaries on our local maven repository.  My configuration noted below:

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.7</version>
        <executions>
          <execution>
            <id>purge-local-dependencies</id>
            <phase>process-sources</phase>
            <goals>
              <goal>purge-local-repository</goal>
            </goals>
            <configuration>
              <resolutionFuzziness>groupId</resolutionFuzziness>
              <includes>
                <include>org.ambraproject</include>
              </includes>
            </configuration>
          </execution>
        </executions>
      </plugin>

In context here: https://github.com/PLOS/ambra-admin/blob/master/pom.xml 

But when I execute, this is the behavior I'm seeing:  (some parts cut out for brevity)

mvn clean install -DskipTests

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Ambra Administration 2.15
[INFO] ------------------------------------------------------------------------
Downloading: http://maven.ambraproject.org/maven2/release/org/ambraproject/ambra-base/2.6.3/ambra-base-2.6.3.pom
Downloaded: http://maven.ambraproject.org/maven2/release/org/ambraproject/ambra-base/2.6.3/ambra-base-2.6.3.pom
(16 KB at 128.9 KB/sec)
Downloading: http://maven.ambraproject.org/ma….. 

...
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ ambra-admin ---
[INFO]
[INFO] --- maven-dependency-plugin:2.7:purge-local-repository (purge-local-dependencies) @
ambra-admin ---
[WARNING] Unable to purge local repository location: /home/josowski/.m2/repository/org/ambraproject
[WARNING] Unable to purge local repository location: /home/josowski/.m2/repository/org/ambraproject
[WARNING] Unable to purge local repository location: /home/josowski/.m2/repository/org/ambraproject
[WARNING] Unable to purge local repository location: /home/josowski/.m2/repository/org/ambraproject
[WARNING] Unable to purge local repository location: /home/josowski/.m2/repository/org/ambraproject
[WARNING] Unable to purge local repository location: /home/josowski/.m2/repository/org/ambraproject
[WARNING] Unable to purge local repository location: /home/josowski/.m2/repository/org/ambraproject
[WARNING] Unable to purge local repository location: /home/josowski/.m2/repository/org/ambraproject
[WARNING] Unable to purge local repository location: /home/josowski/.m2/repository/org/ambraproject
Downloading: http://repo1.maven.org/maven2/org/ambraproject/ambra-base/2.6.3/ambra-base-2.6.3.pom
Downloading: http://repo1.maven.org/maven2/org/ambra…...

….
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.895s
[INFO] Finished at: Sat May 11 11:20:36 PDT 2013
[INFO] Final Memory: 21M/332M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.7:purge-local-repository
(purge-local-dependencies) on project ambra-admin: Failed to refresh project dependencies
for: org.ambraproject:ambra-admin:war:2.15: required artifacts missing:
[ERROR] org.ambraproject:ambra-base:jar:2.6.3
[ERROR] org.ambraproject:ambra-models:jar:2.6.3
[ERROR] org.ambraproject:conf-helper:jar:2.6.3
[ERROR] org.ambraproject:ambra-password-service:jar:2.6.3
[ERROR] org.ambraproject:file-store:jar:1.0.1
[ERROR] org.ambraproject:dom-ranges-helper:jar:2.6.3
[ERROR] org.ambraproject:ambra-emailer:jar:2.6.3
[ERROR] org.ambraproject:entity-resolver:jar:2.6.3
[ERROR] org.ambraproject:ambra-queue:jar:2.6.3
[ERROR] org.ambraproject:ambra-base:jar:tests:2.6.3
[ERROR]
[ERROR] for the artifact:
[ERROR] org.ambraproject:ambra-admin:war:2.15
[ERROR]
[ERROR] from the specified remote repositories:
[ERROR] ambra (http://maven.ambraproject.org/maven2/release/, releases=true, snapshots=false),
[ERROR] ambra.snapshot (http://maven.ambraproject.org/maven2/snapshot/, releases=false, snapshots=true),
[ERROR] central (http://repo1.maven.org/maven2, releases=true, snapshots=false)
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following
articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

It seems like it downloads.  Then purges, and then cannot download them again?

A look inside the local repository reveals:

ls -la ~/.m2/repository/org/ambraproject/ambra-base/2.6.3/
total 20
drwxrwxr-x 2 josowski josowski 4096 May 11 11:20 .
drwxrwxr-x 3 josowski josowski 4096 May 11 11:20 ..
-rw-rw-r-- 1 josowski josowski  223 May 11 11:20 ambra-base-2.6.3.jar.lastUpdated
-rw-rw-r-- 1 josowski josowski  223 May 11 11:20 ambra-base-2.6.3.pom.lastUpdated
-rw-rw-r-- 1 josowski josowski  223 May 11 11:20 ambra-base-2.6.3-tests.jar.lastUpdated

Oddly, I don't see the same behavior on my Mac, only on Ubuntu.

mvn --version
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_43, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-sun-1.6.0.43/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.5.0-27-generic", arch: "amd64", family: "unix"

Any advice?

Thanks in advance.
-Joe



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message