You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Randy Xu <r...@post.harvard.edu> on 2005/01/11 17:59:39 UTC

using snapshots

So in my multiproject, app-jms depends on app-lib.  I'm trying to figure 
out right now how SNAPSHOT works.

So I:
    1) set <currentVersion>2.1-SNAPSHOT</currentVersion> in top-level 
project
    2) In app-jms I list app-lib as a dependency:

<dependency>
  <groupId>com.micom.vangough</groupId>
  <artifactId>app-lib</artifactId>
  <version>${pom.currentVersion}</version>
  <type>jar</type>
</dependency>

    3) I run 'multiproject:install-snapshot', which gets the following 
output.  Later on, I get a compile error (jms can't find a constant in 
lib, which could be due to a stale jar).  I do not get this error when I 
just run 'multiproject:install'.   I have several questions.  Why does 
it install _both_ app-lib-2.1-SNAPSHOT.jar _and_ 
app-lib-20050111.163717.jar?  Why does app-jms go looking for 
app-lib-2.1-SNAPSHOT.jar - shouldn't it go looking for 
app-lib-20050111.163717.jar?  Isn't that the point of the snapshot 
feature?  And most importantly - what am I doing wrong?  The behavior I 
would like is for app-jms to recompile if app-lib has changed.  I was 
told snapshots were the way to enforce this behavior.

jar:jar:
    [jar] Building jar: C:\svn\app\lib\target\app-lib-2.1-SNAPSHOT.jar
Installing snapshot 
of:'C:\svn\app\maven.root\..\lib/target/app-lib-2.1-SNAPSHOT.jar''
Copying: from 
'C:\svn\app\maven.root\..\lib\target\app-lib-2.1-SNAPSHOT.jar' to: 
'C:\Documents and 
Settings\rxu\.maven\repository\com.micom.vangough\jars\app-lib-SNAPSHOT.jar'
Copying: from 
'C:\svn\app\maven.root\..\lib\target\app-lib-2.1-SNAPSHOT.jar' to: 
'C:\Documents and 
Settings\rxu\.maven\repository\com.micom.vangough\jars\app-lib-20050111.163717.jar'
Copying: from 'C:\svn\app\maven.root\..\lib\project.xml' to: 
'C:\Documents and 
Settings\rxu\.maven\repository\com.micom.vangough\poms\app-lib-SNAPSHOT.pom'
Copying: from 'C:\svn\app\maven.root\..\lib\project.xml' to: 
'C:\Documents and 
Settings\rxu\.maven\repository\com.micom.vangough\poms\app-lib-20050111.163717.pom'

+----------------------------------------
| Executing multiproject:install-snapshot-callback App JMS
| Memory: 7M/12M
+----------------------------------------
Attempting to download app-lib-2.1-SNAPSHOT.jar.
Response content length is not known
Error retrieving artifact from 
[http://192.168.12.113/com.micom.vangough/jars/app-lib-2.1-SNAPSHOT.jar]: 
java.io.IOException: Unknown error downloading; status code was: 400
Artifact /com.micom.vangough/jars/app-lib-2.1-SNAPSHOT.jar doesn't 
exists in remote repository, but it exists locally

jar:install-snapshot:


-Randy

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