Salut,
Paul Sandoz wrote:
> Hi,
>
> Let me know if you want me to resend this to the users list.
Relying on the list :-)
>
> How do you differentiate between the following with maven:
>
> - a stable and a dated snapshot release to the java.net maven repo;
It is how you define your pom.xml:
> <dependency>
> <groupId>com.sun.grizzly</groupId>
> <artifactId>grizzly-http-servlet</artifactId>
> <version>1.7.3.1</version>
> </dependency>
for a stable version
> <dependency>
> <groupId>com.sun.grizzly</groupId>
> <artifactId>grizzly-http-servlet</artifactId>
> <version>1.7-SNAPSHOT</version>
> </dependency>
This is the nightly build. If you look here
http://download.java.net/maven/2/com/sun/grizzly/grizzly-http-servlet/1.7-SNAPSHOT/
You can see Maven add a timestamp at the end to differentiate nightly
build.
>
> - a general snapshot release installed to the local repository i.e.
> just doing mvn install.
In you local repo, you will not have any timestamp at the end.
Local: 1.7-SNAPSHOT
Remote: 1.7-SNAPSHOT-.....
>
> I notice the following in grizzly/pom.xml:
>
> <properties>
> <grizzly-version>1.7-SNAPSHOT</grizzly-version>
> <grizzly-released-version>1.7.3</grizzly-released-version>
> <grizzly-next-version>1.8.0</grizzly-next-version>
> <junit-version>3.8.1</junit-version>
> <grizzly-jruby-version>0.1.2</grizzly-jruby-version>
> <maven-plugin.version>1.0.0</maven-plugin.version>
> </properties>
>
> I am guessing by default 1.7-SNAPSHOT will be chosen as from here:
>
> <modelVersion>4.0.0</modelVersion>
> <groupId>com.sun.grizzly</groupId>
> <artifactId>grizzly-project</artifactId>
> <packaging>pom</packaging>
> <name>grizzly-project</name>
> <version>1.7-SNAPSHOT</version>
>
>
> In the modules, say for example, modules/grizzly/pom.xml i notice:
>
> <parent>
> <groupId>com.sun.grizzly</groupId>
> <artifactId>grizzly-project</artifactId>
> <version>1.7-SNAPSHOT</version>
> <relativePath>../../pom.xml</relativePath>
> </parent>
>
> and you are duplicating "1.7-SNAPSHOT" defined in the parent pom.xml. Is
> that necessary?
That's because Maven is broken if you put {grizzly.version} instead of
1.7-SNAPSHOT (at least when I've worked on it). Ideally, it should be
the {grizzly.version} but I've gived up trying to fix it :-). Do you
know how to fix that?
Thanks
-- Jeanfrancois
>
> Paul.
>