This is because the file name with the timestamp is something internal to
the repository. When the dependency is resolved to your WAR, the original
file name is restored based on the artifactId and the version you mention in
your POM.
Maybe if you put Maven in debug mode, you could see that the file retrieved
from your local repository is the one with the timestamp.

Regards
Jeff MAURY

On Wed, Feb 27, 2008 at 10:53 AM, Papapara Tudu <[EMAIL PROTECTED]>
wrote:

>
> Hello,
> maybe I misunderstand something about snapshots, but I have the following
> problem:
> 1. I have a non-Maven project which I export into a jar file and then
> install as a snapshot onto my local repository running on Archiva with
> this
> command:
>
> mvn deploy:deploy-file -Dfile=Project.jar -DgroupId=com.company.project
> -DartifactId=project -Dversion=2.2-SNAPSHOT -Dpackaging=jar
> -DgeneratePom=true -Durl=http://[someip]/archiva/repository/myRepository
> -DrepositoryId=archiva.default
>
> 2. The very first version of that jar that was deployed onto the
> repository
> is saved as project-2.2-SNAPSHOT.jar.
>
> 3. As expected, any further jars that I deploy onto the local repository
> get
> saved as e.g. project-2.2-20080226.143100-1.jar
>
> 4.  The problem is that when I reference that jar in any other project,
> when
> I build the other project, only the project-2.2-SNAPSHOT.jar version (the
> very first one that was installed) is picked up in the output war and ear
> files.
>
> 5. I can see that the actual snapshots, e.g.
> project-2.2-20080226.143100-1.jar do get downloaded from the internal
> repository and installed onto my local repository, but they're never used
> by
> referencing projects.
>
> 6. I'm using the Maven Plugin for Eclipse and what is strange is that in
> the
> Maven Dependencies tree in all referencing projects, I see the
> project-2.2-SNAPSHOT.jar file, but in the plugin logs on the Console I can
> see this:
> project: resolved to version project-2.2-20080226.143100-1 from repository
> myRepository
>
>
> 7. I reference this jar in other projects as:
> <dependency>
>  <groupId>com.company.project</groupId>
>  <artifactId>project</artifactId>
>  <version>[2,)</version>
> </dependency>
>
>  (I also tried this configuration:
> <dependency>
>  <groupId>com.company.project</groupId>
>  <artifactId>project</artifactId>
>  <version>2.2-SNAPSHOT</version>
> </dependency>
> but it had exactly the same results)
>
> 8. My pom.xml config is:
>
>        <distributionManagement>
>                <snapshotRepository>
>                        <id>myRepository</id>
>                        <url>
>
>  dav:http://[someip]/archiva/repository/myRepository/
>                        </url>
>                </snapshotRepository>
>        </distributionManagement>
>
>        <pluginRepositories>
>                <pluginRepository>
>                        <id>myRepository</id>
>                        <url>
>
>  dav:http://[someip]/archiva/repository/myRepository/
>                        </url>
>                </pluginRepository>
>        </pluginRepositories>
>
>        <repositories>
>                <repository>
>                        <id>myRepository</id>
>                        <name>myRepository</name>
>
>  <url>http://[someip]/archiva/repository/myRepository</url>
>                        <releases>
>                                <enabled>true</enabled>
>                        </releases>
>                        <snapshots>
>                                <enabled>true</enabled>
>                        </snapshots>
>                </repository>
>        </repositories>
>
>
> I wonder what I am doing wrong.
>
> Thanks in advance for the help.
>
> Papapara Tudu
> --
> View this message in context:
> http://www.nabble.com/Problem-with-snapshots-tp15709789s177p15709789.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
La mélancolie c'est communiste
Tout le monde y a droit de temps en temps
La mélancolie n'est pas capitaliste
C'est même gratuit pour les perdants
La mélancolie c'est pacifiste
On ne lui rentre jamais dedans
La mélancolie oh tu sais ça existe
Elle se prend même avec des gants
La mélancolie c'est pour les syndicalistes
Il faut juste sa carte de permanent

Miossec (2006)

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com

Reply via email to