maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maven User <3150...@gmail.com>
Subject <updatePolicy>always</updatePolicy> not working for <releases> with Maven 3.0.4
Date Fri, 18 Jan 2013 04:25:21 GMT
We produce a large application from the artifacts of 15+ components, many
which contain multiple modules.  The version numbers are all the same, and
a build cycle takes about four hours.

Late in a development cycle we run numbered (i.e. non “-SNAPSHOT”) builds
in continuous integration mode.  Doing so facilitates quicker turnaround
times of last minute bugs.  Once a package is actually delivered to QA we
return to producing -SNAPSHOT artifacts.

We are aware re-producing numbered artifacts is not a best practice.  Part
of the reason we felt like running a numbered build in CI mode would work
is the “update policy” option which is available for "releases." See
http://maven.apache.org/ref/3.0.4/maven-settings/settings.html.  By our
reading, this setting should enable the updating of numbered artifacts in
the local Maven cache with a newer version from the central repository (we
are using Artifactory Pro 2.5.1).


Instead, we observe this behavior:

Starting from an empty local Maven cache, the build of component #2 works
as designed.

However, after component #1 is rebuilt, a rebuild of component #2, which is
dependent on the jar file produced by the build of component #1, the
execution of “mvn –U clean deploy” fails to update the recently modified
numbered artifact in the local Maven cache.


The routine below is part of ${MAVEN_HOME}/conf/settings.xml:

  <profiles>
    <profile>
        <id>Repositories</id>
        <activation>
              <activeByDefault>true</activeByDefault>
        </activation>

        <repositories>
            <repository>
                  <id>Artifactory</id>
                  <name>Artifactory Public Mirror</name>
                  <url>http://machine.domain.com:8082/artifactory/repo</url>
                  <layout>default</layout>
                  <releases>
                      <enabled>true</enabled>
                      <updatePolicy>always</updatePolicy>
                  </releases>
                  <snapshots>
                      <enabled>true</enabled>
                      <updatePolicy>always</updatePolicy>
                  </snapshots>
              </repository>
        </repositories>
      </profile>
    </profiles>



Does anyone have any insight into why the local Maven cache is not being
updated with the newer numbered artifacts from our Artifactory repository?

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message