you should be able to define a range to restrict updates to within a
range...

e.g. add a config section with a version restriction specified and have that
defined by a property

<project>
  ...
  <build>
    ...
    <plugins>
      ...
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>1.0</version>
        <configuration>
          ...
          <properties>
            ...
            <property>
              <name>manchu.version</name>
              ...
              <version>[${magic}]</version>
              ...
            </property>
            ...
          </properties>
          ...
        </configuration>
      </plugin>
      ...
    </plugins>
    ...
  </build>
  ...
</project>


then

mvn versions:updateProperties -Dmagic=newAVersion


2009/10/22 Julien HENRY <henr...@yahoo.fr>

> Hi,
>
> I'm working on a script that will automatically release many artifacts. For
> example I have 2 Maven projects (say A and B). B have a dependency on A. The
> dependency version is expressed using a property (say ${A.version}).
> In the SVN trunk, in B.pom, A.version=1-SNAPSHOT.
> A and B are independent Maven modules (not multi-module).
>
> Basically, the script is aware of the release order and will:
>  - svn checkout A
>  - mvn release:prepare release:perform -B -DreleaseVersion=1-RC1 (batch
> mode so release version was a parameter of the script)
>  - svn checkout B
>  - update A dependency in B.pom to 1-RC1
>  - mvn release:prepare release:perform -B -DreleaseVersion=4-RC1
>
>
> My question is: how can I update A dependency in B.pom? I tried to use
> versions-maven-plugin but the plugin is too smart for my usage as it always
> try to update to the latest released version. What I want is to be able to
> say: "update property named A.version to value 1-RC1" even if A was already
> released in version 2.
>
> Do you know a way to do this?
>
> Thanks,
>
> Julien
>
>
>
>

Reply via email to