Good day,
Thanks for the correction :-)
Anyway, if in case ${localRepository} cannot be evaluated, and @component
does not work, I guess the next best thing to do is to instantiate the
DefaultArtifactRepository yourself and use setVariableValueToObject( ... ).
At least, that's what I do when all else fails :-)
Cheers,
Franz
Edwin Punzalan wrote:
>
>
>
> franz see wrote:
>> Good day,
>>
>> Re #1.
>> AFAIK, testing harness does not inject values for @parameter. You may
>> want
>> to try something like
>>
>> /**
>> * @component
>> role="org.apache.maven.artifact.repository.ArtifactRepository"
>> */
>> private ArtifactRepostiory localRepository;
>>
> I think this won't work. You need to specify a path and a layout for
> that component.
>
> I'd suggest you look at the plugins that use ${localRepository}
> expressions with the testing harness... the idea plugin is a good
> example. And IIRC, ${localRepository} can be used with the testing
> harness... i just forgot the exact location to configure it.
>> Re #2.
>> AFAIK, only the <build> section of the test pom is ever read by the
>> testing
>> harness. But feel free to file a jira issue requesting for an improvement
>> :)
>>
>> Cheers,
>> Franz
>>
>>
>> Jochen Wiedmann wrote:
>>
>>> Hi, Edwin,
>>>
>>> first of all, thanks for your reply.
>>>
>>> On 2/11/07, Edwin Punzalan <[EMAIL PROTECTED]> wrote:
>>>
>>>
>>>>> How do I creare this parameter? I suppose, it's an instance of
>>>>> DefaultArtifactRepository,
>>>>> but how do I configure it?
>>>>>
>>>> I'm pretty sure the testing harness can take care of expressions
>>>> ${localRepository}... it may be because you put it in "default-value"
>>>> instead of "expression".
>>>>
>>> According to your words, I tried
>>>
>>> /**
>>> * @parameter expression="${localRepository}"
>>> * @required
>>> * @readonly
>>> */
>>> private ArtifactRepository localRepository;
>>>
>>> But the parameter doesn't get filled. I also tried adding @component,
>>> but that fails with a ComponentLookupException.
>>>
>>>
>>>
>>>> This is a bug... Please file this in jira and we'll have a look at it.
>>>> Thanks.
>>>>
>>> What project, what component?
>>>
>>> Thanks,
>>>
>>> Jochen
>>>
>>> --
>>> How fast can a year go? As fast as your childs first year.
>>>
>>> ---------------------------------------------------------------------
>>> 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]
>
>
>
--
View this message in context:
http://www.nabble.com/Two-questions-on-maven-plugin-testing-harness-tf3203630s177.html#a8917993
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]