I am able to reproduce the same issue using dependency plugin with this
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>prepare-local-repo</id>
<phase>generate-resources</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<localRepositoryDirectory>${project.build.directory}</localRepositoryDirectory>
<artifactItems>
<artifactItem>
<groupId>com.mycom.mc</groupId>
<artifactId>myartifact</artifactId>
<version>1.0.0.CI-SNAPSHOT</version>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
So the issue is something to do with runtime temp local repo
Any suggestion on how to fix this issue is really appreciated.
Thanks
-Dan
On Sun, May 22, 2011 at 12:54 AM, Dan Tran <[email protected]> wrote:
> Hi I have custom plugin that is used to download snapshot artifact
> using the following snippet ( it think i stole it from dependency
> plugin )
>
> // force the resolver to download to a temp local repository
> ArtifactRepository tempRepo = new
> DefaultArtifactRepository( "temp", "file://"
> + localRepository.getAbsolutePath(),
> this.localRepository.getLayout() );
>
> resolver.resolve( artifact, remoteRepositories, tempRepo );
>
>
> This code works great with maven 2 which correctly figure out the
> latest snapsphot timestamp at remote repo and download snapshots
> nicely
>
> However ,when use with maven3 it fails trying to download '-SNAPSHORT'
> version ( it seems not able to translate into timestamp )
>
> here is some log
>
> [INFO] --- lmi-maven-plugin:1.6-SNAPSHOT:install-mcagent (default-cli) @ mc
> ---
> Downloading:
> http://maven.eng.mycomp.com:8081/nexus/content/groups/public/com/mycomp/mc/mc-agent-installer/1.0.0.CI-SNAPSHOT/maven-metadata.xml
> Downloaded:
> http://maven.eng.mycom.com:8081/nexus/content/groups/public/com/mycomp/mc/mc-agent-installer/1.0.0.CI-SNAPSHOT/maven-metadata.xml
> (979 B at 0.9 KB/sec)
> Downloading:
> http://maven.eng.mycomp.com:8081/nexus/content/groups/public/com/mycomp/mc/mc-agent-installer/1.0.0.CI-SNAPSHOT/mc-agent-installer-1.0.0.CI-SNAPSHOT.tar.gz
> <!--- SNAPSHOT not timestamp translation
>
>
> This prevents me from moving my build to maven 3.
>
> Any suggestions are greatly appreciated.
>
> Thanks
>
> -Dan
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]