Something like :

        SettingsBuildingRequest settingsBuildingRequest = new
DefaultSettingsBuildingRequest();

        settingsBuildingRequest.setGlobalSettingsFile(
MavenCli.DEFAULT_GLOBAL_SETTINGS_FILE );
        settingsBuildingRequest.setUserSettingsFile(
MavenCli.DEFAULT_USER_SETTINGS_FILE );

        settingsBuildingRequest.setUserProperties( add some properties );

        return lookup( SettingsBuilder.class ).build(
settingsBuildingRequest ).getEffectiveSettings();

lookup is plexus lookup

2011/12/21 Marek Psiuk <marek.ps...@agh.edu.pl>:
> Hello,
>
> I am working on a project which uses aether for resolving maven artifacts.
> On the main aether site (https://docs.sonatype.org/display/AETHER/Home) they
> suggest maven-settings-builder for resolving settings.xml.
> However in the newest artifact version:
> http://maven.apache.org/ref/3.0.3/maven-settings-builder/apidocs/org/apache/maven/settings/building/SettingsBuilder.html
> I
> cannot find a method which just simply resolves default settings.xml
> without providing any parameters in SettingsBuildingRequest.
> In the previous maven-settings:
> http://maven.apache.org/ref/2.2.1/maven-settings/apidocs/org/apache/maven/settings/MavenSettingsBuilder.html
> It
> was simple, one just invokes parameterless buildSettings method and he got
> everything.
>
> Am I missing sth or has the new maven-settings-builder less features than
> version 2.2.1.
>
> Thanks for any help.
>
>
> I am not subscribe to the list so just please CC me.

To be sure about having answers do it.

>
>
> Kind Regards,
>
> Marek Psiuk
>
> P.S.
>
> For now I thinking about copying code from 2.2.1 which resolves default
> whereabouts of settings.xml and only then using maven-settings-builder-3.0.3



-- 
Olivier Lamy
Talend: http://coders.talend.com
http://twitter.com/olamy | http://linkedin.com/in/olamy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to