Thanks, Brian,

What I mean to do is clean out my local cache before my build, so I can
do a clean build.

Is that not what this dependency:clean-local-cache is intended for?

Any ideas how I can do this ("properly")?


Currenlty, I include it in the parent pom as below, but this does not
work as I expect.


Cheers,
Dave




On Mon, 2007-03-12 at 09:37 -0400, Brian E. Fox wrote:
> The artifact was deleted from your local repository. That means you'll
> need to rebuild/install it before this will be able to resolve it. I'm
> not sure purging sibling artifacts is what you really mean to do.
> 
> -----Original Message-----
> From: David Leangen [mailto:[EMAIL PROTECTED] 
> Sent: Monday, March 12, 2007 2:35 AM
> To: Maven Users List
> Subject: Purging depending on a given profile
> 
> 
> Hello!
> 
> I'd like to use the Maven Dependency Plugin to purge my local cache, but
> only for a build with a given profile.
> 
> I have set up the plugin to work with a profile, and it does purge the
> cache.
> 
> 
> Problem is that, after resolving a list of 3rd party artifacts, it
> cannot resolve artifacts that are both children and components of the
> parent pom where the plugin is declared. Error shown below.
> 
> 
> This is the parent pom:
> 
> <project>
>   ...
>    <profiles>
>      <profile>
>        <id>ci</id>
>       <activation>
>         <property>
>           <name>purgeCache</name>
>           <value>true</value>
>         </property>
>       </activation>
>       <build>
>         <plugins>
>           <plugin>
>             <groupId>org.apache.maven.plugins</groupId>
>             <artifactId>maven-dependency-plugin</artifactId>
>             <executions>
>               <execution>
>                 <id>purge-local-repository</id>
>                 <phase>validate</phase>
>                 <goals>
>                   <goal>purge-local-repository</goal>
>                 </goals>
>                 <configuration>
>                 </configuration>
>               </execution>
>             </executions>
>           </plugin>
>         </plugins>
>       </build>
>     </profile>
>   </profiles>
> </project>
> 
> 
> 
> And finally, this is the error:
> 
> 
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] :
> [EMAIL PROTECTED]
> Failed to refresh project dependencies for:
> com.my.project:my-project:jar:0.1.0-SNAPSHOT
> 
> Artifact resolution failed for project:
> com.my.project:my-project:jar:0.1.0-SNAPSHOT
> 
> 
> Any ideas?
> 
> Thanks!
> David
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to