Graham Leggett wrote:
> On Fri, November 23, 2007 10:30 am, Jörg Schaible wrote:
> 
>> We use since long ago an own plugin, that accesses a secondary
>> artifact of a dependency. This worked like charm ... until now. We
>> have now the new situation, that the secondary artifact is build in
>> the same multi project build by one subproject and it is used in
>> another one. However, release:prepare fails now, since the
>> subproject that makes usage of the secondary artifact always tries
>> to access the final-but-not-yet-release version.
> 
> This looks suspiciously like a problem we encountered, caused by the
> assumption of the release plugin that elements within a multi-module
> project won't depend on other elements in the same
> multi-module project,
> and where the entire multi-module project has a common version number.
> 
> The cause is because the goal that is used to test the build
> of the code,
> doesn't go as far as deploying the artifacts under test into the local
> repository, and so module+1 doesn't see the artifacts just
> generated by
> module or module-1.

I know why my plugin fails, but I don't know why other maven plugins can handle 
the situation. I did now a bad hack and will look for the attached artifact at 
the same location as the main artifact is located and only if I cannot find it 
locally I will use the ArtifactResolver. Nevertheless I am interested in the 
"proper" solution.

> The workaround is to override this goal to be "clean
> install", which does
> deploy the artifacts into the repo, like this in your root pom:
> 
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-release-plugin</artifactId>
>         <version>2.0-beta-6</version>
>         <configuration>
>           <preparationGoals>clean install</preparationGoals>        
>         </configuration>
>       </plugin>

This is dangerous and highly discouraged. We have quite a lot of artifacts and 
if the release manager simply performs "release:prepare", but fails to perform 
the release itself, the build will at least fail for the next artifact that is 
dependend on the new release. With your variant the prepared, but not yet 
released artifact is found in the release manager's local repository and he 
will never recognize that the final artifact has neither been build nor 
deployed.

- Jörg

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

Reply via email to