[prev in list] [next in list] [prev in thread] [next in thread] 

List:       maven-dev
Subject:    Re: Plexus Component Injection
From:       "Robert Scholte" <rfscholte () apache ! org>
Date:       2016-06-30 19:02:54
Message-ID: op.yjvwi4kkkdkhrr () desktop-2khsk44 ! dynamic ! ziggo ! nl
[Download RAW message or body]

On Thu, 30 Jun 2016 15:35:24 +0200, Petar Tahchiev <paranoiabla@gmail.com>  
wrote:

> Hi Robert,
>
> thank you for your reply. I tried searching for maven-artifact-transfer  
> in
> the central, but i couldn't find it:
>
> http://search.maven.org/#search%7Cga%7C1%7Cmaven-artifact-transfer
>
> I also tried in google and I got this page:
>
> https://maven.apache.org/shared-archives/maven-artifact-transfer-LATEST/dependency-info.html
>
> but there is no such artifact in org.apache.maven.shared

Yes it is, but hasn't been released yet. We're implementing it into  
several plugins to confirm that it matches the requirements.
Use version 3.0.0-SNAPSHOT of this library.

I had a quick look at the project. We should push it forward to Maven3 and  
the ArchetypeGenerationRequest will need the projectBuildingRequest from  
MavenSession to be able to use maven-artifact-transfer.

Also see  
https://cwiki.apache.org/confluence/display/MAVEN/Plugin+migration+to+Maven3+dependencies

Robert

>
> Are you referring to ArtifactResolver in org.apache.maven:maven-artifact?
>
> We are using it already - our DefaultDownloader is injecting it as I
> pointed above, but it is missing the proxy settings.
>
>
> 2016-06-29 19:40 GMT+02:00 Robert Scholte <rfscholte@apache.org>:
>
>> Wagon[1] is only about transportation and it not aware of any Maven
>> configuration such as the settings.xml, hence there are no Maven core
>> dependencies
>>
>> I don't think you need the DefaultDownloader. Instead I would try to use
>> the ArtifactResolver from maven-artifact-transfer, which *is* aware of
>> Maven configuration.
>>
>> Give it a try to rewrite it. Let me know if you need extra hints to
>> refactor this.
>>
>> thanks,
>> Robert
>>
>> [1] http://maven.apache.org/components/wagon/
>>
>>
>> On Wed, 29 Jun 2016 10:26:44 +0200, Petar Tahchiev  
>> <paranoiabla@gmail.com>
>> wrote:
>>
>> Hello guys,
>>>
>>> I'm running the tests in maven-archetype with Windows and a proxy  
>>> (yeah, I
>>> know :)) and one of them fails because it cannot find an archetype with
>>> the
>>> archetype manager. So I looked at the DefaultDownloader in
>>> archetype-common
>>> which injects ArtifactResolver like this:
>>>
>>> @Requirement
>>> private ArtifactResolver artifactResolver;
>>>
>>> and when I stop with a breakpoint to inspect the artifact resolver, I  
>>> see
>>> it is of type DefaultArchetypeResolver and the WagonManager inside it  
>>> has
>>> an empty map of proxies defined. This however contradicts to my
>>> settings.xml:
>>>
>>>     <proxies>
>>>        <proxy>
>>>        <id>aproxy</id>
>>>        <active>true</active>
>>>        <protocol>http</protocol>
>>>        <username></username>
>>>        <password></password>
>>>        <host>XXXX</host>
>>>        <port>XXXX</port>
>>>        <nonProxyHosts>localhost</nonProxyHosts>
>>>        </proxy>
>>>     </proxies>
>>>
>>> Any idea who's defining the artifactResolver or why it does not  
>>> respect my
>>> settings.xml when running a test?
>>>
>>> P.S. The build was failing because it couldn't download the  
>>> dependencies,
>>> but then I declared the proxy and that went fine. So it looks like the
>>> proxy works fine when downloading dependencies, but not when I run the
>>> tests.
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic