On 7/23/06, Barrie Treloar <[EMAIL PROTECTED]> wrote:
I am trying to write some unit tests for the assembly plugin and they require access to the attached artifacts after the mojo has been executed.I have hacked in some debug statements and it appears that the project variable and the exectedProject variable are the same: AssemblyMojo mojo = getMojo( "format-MASSEMBLY-119-plugin-config.xml" ); mojo.execute(); assertEquals( "executedProject and Project not the same", getVariableValueFromObject( mojo, "executedProject" ), getVariableValueFromObject( mojo, "project" ) ); I've also made modifications to AssemblyMavenProjectStub to support attached artifacts. And after the mojo has been executed the attached artifact list is empty. However, if I put debug statements into the mojo.execute() method I can see that the attached artifacts list is what I expect it to be. I am at a lost as to why this could be occurring.
Err besides committing a cardinal sin in confusing equality with Object.toEquals(). It appears I wanted the value from project not executedProject. The question now would be, why all the other tests happily use executedProject but this one that requires attachedArtifacts need project... My unit tests work, so I am willing to ignore this black magic. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
