You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Mirko Friedenhagen <mf...@gmail.com> on 2016/10/10 12:45:51 UTC

Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Hello,

I just tried to run "mvn help:effective-pom -Doutput=MVNVERSION.xml"
on one of our inhouse projects once with 3.3.9 and once with
3.4.0-SNAPSHOT (4ad0fb217c93d36cf3365b83baec48470196f5fa;
2016-10-09T21:16:52+02:00)

3.4.0 seems not to incorporate settings correctly (or I misconfigured
something). We override the 'central' repository in
$HOME/.m2/settings.xml and point to our internal Artifactory instance.
However in the effective-pom I see re

This is a part of the diff:

         <id>central</id>
-        <name>Everything via internal-central</name>
-        <url>http://inhouse.server/artifactory/internal-central/</url>
+        <name>Central Repository</name>
+        <url>https://repo.maven.apache.org/maven2</url>
       </repository>

Now I see not only effective-pom is afffected, I am unable to download
stuff from our internal Artifactory, so builds fail completely.

Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/

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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Christian Schulte <cs...@schulte.it>.
Am 10.10.2016 um 15:35 schrieb Igor Fedorenko:
> It is common to use repository with id=central in settings.xml to
> override central location. This functionality should continue to work,
> regardless how it is implemented in Maven internally.
> 

Do you have a wildcard mirror in the settings as well? Overriding
'central' is not enough when the projects to build contain repositories
(maybe central with a different id or something pointing somewhere
else). What I mean is: Overriding 'central' makes no sense most of the
time. This functionality should contine to work, of course.

Regards,
-- 
Christian


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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Christian Schulte <cs...@schulte.it>.
Am 10/10/16 um 20:49 schrieb Igor Fedorenko:
> Are repositories and other configuration defined in user settings.xml
> take precedence over global settings.xml?

Don't know for sure but would assume so. The current master 4.0.0 super
pom has already been reverted to not change in any way in 3.4.0. I think
that's how it will stay. I will just remove the 4.1.0 super pom and be
done with it.

<https://git1-us-west.apache.org/repos/asf?p=maven.git;a=tree;f=maven-model-builder/src/main/resources/org/apache/maven/model;h=fd14a89d91a806042e238be408099bf345a0b30d;hb=HEAD>


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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Igor Fedorenko <ig...@ifedorenko.com>.
Are repositories and other configuration defined in user settings.xml
take precedence over global settings.xml? 

-- 
Regards,
Igor

On Mon, Oct 10, 2016, at 10:16 AM, Christian Schulte wrote:
> Am 10.10.2016 um 15:35 schrieb Igor Fedorenko:
> > It is common to use repository with id=central in settings.xml to
> > override central location. This functionality should continue to work,
> > regardless how it is implemented in Maven internally.
> > 
> 
> <https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=apache-maven/src/conf/settings.xml;h=c24acfd1175b002438635d2a212032cd23a4381a;hb=HEAD#l248>
> 
> 
> ---------------------------------------------------------------------
> 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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Christian Schulte <cs...@schulte.it>.
Am 10/13/16 um 21:52 schrieb Robert Scholte:
> I'd say revert these changes. We see that this "hack" doesn't always work.  
> Better look for a more solid solution with another release in the future.

The better solution would be to completely remove repositories from the
poms and from all profiles and to remove all mirrors in a next major
release. I'd consider the whole repository/pluginRepository thing a
design flaw. Maven needs a list of repositories to query in order.
That's application settings only. I'll revert the changes and keep the
central repository in the 4.0.0 super pom. Let's just consider removing
all repositories from the pom and from profiles in Maven 4.0 and provide
a way to just setup a list of repositories to query in an order based on
some ordinal value (to not rely on the order of declaration) in the
settings. That's what the JIRA issue requesting the removal of the
central repository from the super pom really is about.

Regards,
-- 
Christian


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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Stephen Connolly <st...@gmail.com>.
On Friday 14 October 2016, Robert Scholte <rf...@apache.org> wrote:

> On Fri, 14 Oct 2016 00:09:26 +0200, Christian Schulte <cs...@schulte.it>
> wrote:
>
> Am 10/13/16 um 21:52 schrieb Robert Scholte:
>>
>>> On Thu, 13 Oct 2016 02:53:54 +0200, Christian Schulte <cs...@schulte.it>
>>>
>>>> Should I change the order of the effective settings so that things from
>>>> the global settings always come before the user settings? Will that blow
>>>> up somewhere else. We know nothing about how users have edited theire
>>>> global settings. Just leave the repositories in the 4.0.0 super pom and
>>>> revert the commits? I consider the order wrong, btw.
>>>>
>>>
>> What to do about that? It appears to be a bug never been triggered
>> because we never had someone put an active profile in the global settings.
>>
>> Regards,
>>
>
> Let's put all these kind of settings.xml changes in one release. Much
> easier to explain to the community.


+1

It may make sense to "move" the settings.xml from ~/.m2/settings.xml to
~/.m2/settings-4.1.0.xml along with a schema bump (for interoperability I
think it would be wrong to change the schema on a file older clients want
to read)


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

-- 
Sent from my phone

Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Robert Scholte <rf...@apache.org>.
On Fri, 14 Oct 2016 00:09:26 +0200, Christian Schulte <cs...@schulte.it>  
wrote:

> Am 10/13/16 um 21:52 schrieb Robert Scholte:
>> On Thu, 13 Oct 2016 02:53:54 +0200, Christian Schulte <cs...@schulte.it>
>>> Should I change the order of the effective settings so that things from
>>> the global settings always come before the user settings? Will that  
>>> blow
>>> up somewhere else. We know nothing about how users have edited theire
>>> global settings. Just leave the repositories in the 4.0.0 super pom and
>>> revert the commits? I consider the order wrong, btw.
>
> What to do about that? It appears to be a bug never been triggered
> because we never had someone put an active profile in the global  
> settings.
>
> Regards,

Let's put all these kind of settings.xml changes in one release. Much  
easier to explain to the community.

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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Christian Schulte <cs...@schulte.it>.
Am 10/13/16 um 21:52 schrieb Robert Scholte:
> On Thu, 13 Oct 2016 02:53:54 +0200, Christian Schulte <cs...@schulte.it>  
>> Should I change the order of the effective settings so that things from
>> the global settings always come before the user settings? Will that blow
>> up somewhere else. We know nothing about how users have edited theire
>> global settings. Just leave the repositories in the 4.0.0 super pom and
>> revert the commits? I consider the order wrong, btw.

What to do about that? It appears to be a bug never been triggered
because we never had someone put an active profile in the global settings.

Regards,
-- 
Christian



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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Mirko Friedenhagen <mf...@gmail.com>.
Hello,

reverting seems safer. As settings always override stuff in poms, my guess
would be that having global defining stuff for central will blow stuff for
lots of people. Overriding central seems very natural. And user's settings
will survive updates of Maven it self.

Regards
Mirko
-- 
Sent from my mobile

Am 13.10.2016 21:52 schrieb "Robert Scholte" <rf...@apache.org>:

> On Thu, 13 Oct 2016 02:53:54 +0200, Christian Schulte <cs...@schulte.it>
> wrote:
>
> Am 10/12/16 um 23:17 schrieb Robert Scholte:
>>
>>> It is a bit different: the *effective* settings are the global settings
>>> where parts can be overridden with the user settings. This means that all
>>> profiles will be there, during build the content of profiles will keep
>>> overriding each other. So is the order of profiles correct in the
>>> effective settings?
>>>
>>
>> It's done by method 'shallowMergeById' in the following class.
>>
>> <https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;
>> f=maven-settings-builder/src/main/java/org/apache/maven/
>> settings/merge/MavenSettingsMerger.java;h=8d9f67b1fcbee52000
>> cbed55a3c79a343c96ae26;hb=HEAD>
>>
>> It will add profiles from the global settings to the end of the list of
>> profiles from the user settings making that list the effective list of
>> profiles. So a profile from the global settings will be last in the list
>> of effective settings when no profile with the same id exists in the
>> user settings. The profile in question uses a UUID for the id. So that
>> will always come after any profiles of the user settings. Same for the
>> effective list of active profiles.
>>
>> This ends in the following class overriding any repository with id
>> 'central' from the user settings with the values from the global settings.
>>
>> <https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;
>> f=maven-model-builder/src/main/java/org/apache/maven/
>> model/profile/DefaultProfileInjector.java;h=aed837bf2b89479b
>> 2f150add0c77f684687d621d;hb=HEAD>
>>
>> Should I change the order of the effective settings so that things from
>> the global settings always come before the user settings? Will that blow
>> up somewhere else. We know nothing about how users have edited theire
>> global settings. Just leave the repositories in the 4.0.0 super pom and
>> revert the commits? I consider the order wrong, btw.
>>
>> Regards,
>>
>
> I'd say revert these changes. We see that this "hack" doesn't always work.
> Better look for a more solid solution with another release in the future.
>
> Robert
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Robert Scholte <rf...@apache.org>.
On Thu, 13 Oct 2016 02:53:54 +0200, Christian Schulte <cs...@schulte.it>  
wrote:

> Am 10/12/16 um 23:17 schrieb Robert Scholte:
>> It is a bit different: the *effective* settings are the global settings
>> where parts can be overridden with the user settings. This means that  
>> all
>> profiles will be there, during build the content of profiles will keep
>> overriding each other. So is the order of profiles correct in the
>> effective settings?
>
> It's done by method 'shallowMergeById' in the following class.
>
> <https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java;h=8d9f67b1fcbee52000cbed55a3c79a343c96ae26;hb=HEAD>
>
> It will add profiles from the global settings to the end of the list of
> profiles from the user settings making that list the effective list of
> profiles. So a profile from the global settings will be last in the list
> of effective settings when no profile with the same id exists in the
> user settings. The profile in question uses a UUID for the id. So that
> will always come after any profiles of the user settings. Same for the
> effective list of active profiles.
>
> This ends in the following class overriding any repository with id
> 'central' from the user settings with the values from the global  
> settings.
>
> <https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java;h=aed837bf2b89479b2f150add0c77f684687d621d;hb=HEAD>
>
> Should I change the order of the effective settings so that things from
> the global settings always come before the user settings? Will that blow
> up somewhere else. We know nothing about how users have edited theire
> global settings. Just leave the repositories in the 4.0.0 super pom and
> revert the commits? I consider the order wrong, btw.
>
> Regards,

I'd say revert these changes. We see that this "hack" doesn't always work.  
Better look for a more solid solution with another release in the future.

Robert

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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Christian Schulte <cs...@schulte.it>.
Am 10/12/16 um 23:17 schrieb Robert Scholte:
> It is a bit different: the *effective* settings are the global settings  
> where parts can be overridden with the user settings. This means that all  
> profiles will be there, during build the content of profiles will keep  
> overriding each other. So is the order of profiles correct in the  
> effective settings?

It's done by method 'shallowMergeById' in the following class.

<https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-settings-builder/src/main/java/org/apache/maven/settings/merge/MavenSettingsMerger.java;h=8d9f67b1fcbee52000cbed55a3c79a343c96ae26;hb=HEAD>

It will add profiles from the global settings to the end of the list of
profiles from the user settings making that list the effective list of
profiles. So a profile from the global settings will be last in the list
of effective settings when no profile with the same id exists in the
user settings. The profile in question uses a UUID for the id. So that
will always come after any profiles of the user settings. Same for the
effective list of active profiles.

This ends in the following class overriding any repository with id
'central' from the user settings with the values from the global settings.

<https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=maven-model-builder/src/main/java/org/apache/maven/model/profile/DefaultProfileInjector.java;h=aed837bf2b89479b2f150add0c77f684687d621d;hb=HEAD>

Should I change the order of the effective settings so that things from
the global settings always come before the user settings? Will that blow
up somewhere else. We know nothing about how users have edited theire
global settings. Just leave the repositories in the 4.0.0 super pom and
revert the commits? I consider the order wrong, btw.

Regards,
-- 
Christian


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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Robert Scholte <rf...@apache.org>.
It is a bit different: the *effective* settings are the global settings  
where parts can be overridden with the user settings. This means that all  
profiles will be there, during build the content of profiles will keep  
overriding each other. So is the order of profiles correct in the  
effective settings?

Robert

On Tue, 11 Oct 2016 00:52:57 +0200, Mirko Friedenhagen  
<mf...@gmail.com> wrote:

> But why would the server settings override the values of the user's
> settings? I thought the latter ones always had precedence.
>
> Regards
> Mirko

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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Mirko Friedenhagen <mf...@gmail.com>.
But why would the server settings override the values of the user's
settings? I thought the latter ones always had precedence.

Regards
Mirko
-- 
Sent from my mobile

Am 10.10.2016 22:57 schrieb "Robert Scholte" <rf...@apache.org>:

> so this is the first change:
> https://git1-us-west.apache.org/repos/asf?p=maven.git;a=commit;h=1b00a9e1
> removing it from the POM (I assumed it was really in the Java code)
>
> Maybe this is a candidate to add to a new version of the settings.xml
> This file is a Maven-only file, which makes is easier to change (in
> contrast to the pom).
> That we be much cleaner compared to the profile-hack.
>
> Robert
>
> On Mon, 10 Oct 2016 20:54:41 +0200, Igor Fedorenko <ig...@ifedorenko.com>
> wrote:
>
> Not just the url, but all aspect of "central" repository are
>> configurable in user settings.xml today. Even if we provide a better way
>> to express this configuration, I believe the old way should continue to
>> work for a few releases to allow graceful migration. Many users will use
>> multiple versions of maven side-by-side (think jenkins, for example).
>> And more generally, forcing settings.xml update is going to be a major
>> effort for larger organizations, with  100x or 1000x developers.
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Robert Scholte <rf...@apache.org>.
so this is the first change:
https://git1-us-west.apache.org/repos/asf?p=maven.git;a=commit;h=1b00a9e1
removing it from the POM (I assumed it was really in the Java code)

Maybe this is a candidate to add to a new version of the settings.xml
This file is a Maven-only file, which makes is easier to change (in  
contrast to the pom).
That we be much cleaner compared to the profile-hack.

Robert

On Mon, 10 Oct 2016 20:54:41 +0200, Igor Fedorenko <ig...@ifedorenko.com>  
wrote:

> Not just the url, but all aspect of "central" repository are
> configurable in user settings.xml today. Even if we provide a better way
> to express this configuration, I believe the old way should continue to
> work for a few releases to allow graceful migration. Many users will use
> multiple versions of maven side-by-side (think jenkins, for example).
> And more generally, forcing settings.xml update is going to be a major
> effort for larger organizations, with  100x or 1000x developers.

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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Mirko Friedenhagen <mf...@gmail.com>.
Hello everyone,

this is basically my settings.xml (stripped servers section and a few
sonarqube related properties):
<settings>
    <!-- Force all requests to go through the configured central mirror -->
    <mirrors>
        <mirror>
            <id>central</id>
            <mirrorOf>*</mirrorOf>
            <name>Internal mirror of all needed dependencies</name>
            <url>https://inhouse.server/artifactory/internal-central/</url>
        </mirror>
    </mirrors>
    <profiles>
        <profile>
            <id>internal-central</id>
            <properties>

<distribution.repo.snapshot>https://inhouse.server/artifactory//libs-snapshot-local</distribution.repo.snapshot>

<distribution.repo.staging>https://inhouse.server/artifactory/libs-staging-local</distribution.repo.staging>
                <!-- Redirect *all* snapshot and release deployments
to our internal Artifactory. -->

<altReleaseDeploymentRepository>central::default::${distribution.repo.staging}/</altReleaseDeploymentRepository>

<altSnapshotDeploymentRepository>central::default::${distribution.repo.snapshot}/</altSnapshotDeploymentRepository>
            </properties>
            <repositories>
                <repository>
                    <!-- We need to enable SNAPSHOTs here so
versions-maven-plugins:use-releases works properly.
                    -->
                    <id>central</id>
                    <name>Everything via internal-central</name>

<url>https://inhouse.server/artifactory/internal-central/</url>
                    <layout>default</layout>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                        <updatePolicy>interval:60</updatePolicy>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <!-- We need to enable SNAPSHOTs here so
versions-maven-plugins:use-releases works properly.
                    -->
                    <id>central</id>
                    <name>Everything via internal-central</name>

<url>https://inhouse.server/artifactory/internal-central/</url>
                    <layout>default</layout>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                        <updatePolicy>interval:60</updatePolicy>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>internal-central</activeProfile>
    </activeProfiles>
</settings>

Regards Mirko
--
http://illegalstateexception.blogspot.com/
https://github.com/mfriedenhagen/ (http://osrc.dfm.io/mfriedenhagen)
https://bitbucket.org/mfriedenhagen/


On Mon, Oct 10, 2016 at 8:54 PM, Igor Fedorenko <ig...@ifedorenko.com> wrote:
> Not just the url, but all aspect of "central" repository are
> configurable in user settings.xml today. Even if we provide a better way
> to express this configuration, I believe the old way should continue to
> work for a few releases to allow graceful migration. Many users will use
> multiple versions of maven side-by-side (think jenkins, for example).
> And more generally, forcing settings.xml update is going to be a major
> effort for larger organizations, with  100x or 1000x developers.
>
> --
> Regards,
> Igor
>
> On Mon, Oct 10, 2016, at 02:33 PM, Robert Scholte wrote:
>> On Mon, 10 Oct 2016 16:22:20 +0200, Christian Schulte <cs...@schulte.it>
>> wrote:
>>
>> > Am 10.10.2016 um 16:16 schrieb Christian Schulte:
>> >> Am 10.10.2016 um 15:35 schrieb Igor Fedorenko:
>> >>> It is common to use repository with id=central in settings.xml to
>> >>> override central location. This functionality should continue to work,
>> >>> regardless how it is implemented in Maven internally.
>> >>>
>> >>
>> >> <https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=apache-maven/src/conf/settings.xml;h=c24acfd1175b002438635d2a212032cd23a4381a;hb=HEAD#l248>
>> >>
>> >>
>> >
>> > Everyone. Would it be better to not enable that profile by default? So
>> > that a repository needs to be defined manually or Maven will not be able
>> > to download anything? That way users currently overriding 'central'
>> > somehow will not be affected and will just no longer override anything
>> > anymore. The super pom central will just disappear and the settings hold
>> > a template profile users need to enable themselves. Just needs to be
>> > documented in the introductory guides on the site as one of the first
>> > steps to do after installing Maven.
>> >
>> > Regards,
>>
>> So we want the URL of central to be configurable, or at least not
>> hard-coded? Why not define it in a properties file in the ${maven.conf}
>> directory? No profile hack required and a clean settings.xml.
>>
>> my 2 cents,
>> Robert
>>
>> ---------------------------------------------------------------------
>> 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
>

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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Igor Fedorenko <ig...@ifedorenko.com>.
Not just the url, but all aspect of "central" repository are
configurable in user settings.xml today. Even if we provide a better way
to express this configuration, I believe the old way should continue to
work for a few releases to allow graceful migration. Many users will use
multiple versions of maven side-by-side (think jenkins, for example).
And more generally, forcing settings.xml update is going to be a major
effort for larger organizations, with  100x or 1000x developers.

-- 
Regards,
Igor

On Mon, Oct 10, 2016, at 02:33 PM, Robert Scholte wrote:
> On Mon, 10 Oct 2016 16:22:20 +0200, Christian Schulte <cs...@schulte.it>  
> wrote:
> 
> > Am 10.10.2016 um 16:16 schrieb Christian Schulte:
> >> Am 10.10.2016 um 15:35 schrieb Igor Fedorenko:
> >>> It is common to use repository with id=central in settings.xml to
> >>> override central location. This functionality should continue to work,
> >>> regardless how it is implemented in Maven internally.
> >>>
> >>
> >> <https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=apache-maven/src/conf/settings.xml;h=c24acfd1175b002438635d2a212032cd23a4381a;hb=HEAD#l248>
> >>
> >>
> >
> > Everyone. Would it be better to not enable that profile by default? So
> > that a repository needs to be defined manually or Maven will not be able
> > to download anything? That way users currently overriding 'central'
> > somehow will not be affected and will just no longer override anything
> > anymore. The super pom central will just disappear and the settings hold
> > a template profile users need to enable themselves. Just needs to be
> > documented in the introductory guides on the site as one of the first
> > steps to do after installing Maven.
> >
> > Regards,
> 
> So we want the URL of central to be configurable, or at least not  
> hard-coded? Why not define it in a properties file in the ${maven.conf}  
> directory? No profile hack required and a clean settings.xml.
> 
> my 2 cents,
> Robert
> 
> ---------------------------------------------------------------------
> 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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Robert Scholte <rf...@apache.org>.
On Mon, 10 Oct 2016 16:22:20 +0200, Christian Schulte <cs...@schulte.it>  
wrote:

> Am 10.10.2016 um 16:16 schrieb Christian Schulte:
>> Am 10.10.2016 um 15:35 schrieb Igor Fedorenko:
>>> It is common to use repository with id=central in settings.xml to
>>> override central location. This functionality should continue to work,
>>> regardless how it is implemented in Maven internally.
>>>
>>
>> <https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=apache-maven/src/conf/settings.xml;h=c24acfd1175b002438635d2a212032cd23a4381a;hb=HEAD#l248>
>>
>>
>
> Everyone. Would it be better to not enable that profile by default? So
> that a repository needs to be defined manually or Maven will not be able
> to download anything? That way users currently overriding 'central'
> somehow will not be affected and will just no longer override anything
> anymore. The super pom central will just disappear and the settings hold
> a template profile users need to enable themselves. Just needs to be
> documented in the introductory guides on the site as one of the first
> steps to do after installing Maven.
>
> Regards,

So we want the URL of central to be configurable, or at least not  
hard-coded? Why not define it in a properties file in the ${maven.conf}  
directory? No profile hack required and a clean settings.xml.

my 2 cents,
Robert

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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Christian Schulte <cs...@schulte.it>.
Am 10.10.2016 um 16:16 schrieb Christian Schulte:
> Am 10.10.2016 um 15:35 schrieb Igor Fedorenko:
>> It is common to use repository with id=central in settings.xml to
>> override central location. This functionality should continue to work,
>> regardless how it is implemented in Maven internally.
>>
> 
> <https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=apache-maven/src/conf/settings.xml;h=c24acfd1175b002438635d2a212032cd23a4381a;hb=HEAD#l248>
> 
> 

Everyone. Would it be better to not enable that profile by default? So
that a repository needs to be defined manually or Maven will not be able
to download anything? That way users currently overriding 'central'
somehow will not be affected and will just no longer override anything
anymore. The super pom central will just disappear and the settings hold
a template profile users need to enable themselves. Just needs to be
documented in the introductory guides on the site as one of the first
steps to do after installing Maven.

Regards,
-- 
Christian


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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Christian Schulte <cs...@schulte.it>.
Am 10.10.2016 um 15:35 schrieb Igor Fedorenko:
> It is common to use repository with id=central in settings.xml to
> override central location. This functionality should continue to work,
> regardless how it is implemented in Maven internally.
> 

<https://git-wip-us.apache.org/repos/asf?p=maven.git;a=blob;f=apache-maven/src/conf/settings.xml;h=c24acfd1175b002438635d2a212032cd23a4381a;hb=HEAD#l248>


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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Christian Schulte <cs...@schulte.it>.
Am 10.10.2016 um 15:35 schrieb Igor Fedorenko:
> It is common to use repository with id=central in settings.xml to
> override central location. This functionality should continue to work,
> regardless how it is implemented in Maven internally.
> 

That is what has become the default. Did you look at the settings.xml
file? It contains a profile with the central repository. Just disable
that profile or change it. What you did in the past is what gets shipped
by default in 3.4.0-SNAPSHOT. There will be no repositories in the super
pom any more. What exactly does not work for you that way?

Regards,
-- 
Christian


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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Igor Fedorenko <ig...@ifedorenko.com>.
It is common to use repository with id=central in settings.xml to
override central location. This functionality should continue to work,
regardless how it is implemented in Maven internally.

-- 
Regards,
Igor

On Mon, Oct 10, 2016, at 09:10 AM, Christian Schulte wrote:
> Am 10/10/16 um 14:45 schrieb Mirko Friedenhagen:
> > Hello,
> > 
> > I just tried to run "mvn help:effective-pom -Doutput=MVNVERSION.xml"
> > on one of our inhouse projects once with 3.3.9 and once with
> > 3.4.0-SNAPSHOT (4ad0fb217c93d36cf3365b83baec48470196f5fa;
> > 2016-10-09T21:16:52+02:00)
> > 
> > 3.4.0 seems not to incorporate settings correctly (or I misconfigured
> > something). We override the 'central' repository in
> > $HOME/.m2/settings.xml and point to our internal Artifactory instance.
> > However in the effective-pom I see re
> > 
> > This is a part of the diff:
> > 
> >          <id>central</id>
> > -        <name>Everything via internal-central</name>
> > -        <url>http://inhouse.server/artifactory/internal-central/</url>
> > +        <name>Central Repository</name>
> > +        <url>https://repo.maven.apache.org/maven2</url>
> >        </repository>
> > 
> > Now I see not only effective-pom is afffected, I am unable to download
> > stuff from our internal Artifactory, so builds fail completely.
> 
> Did you take a look at the 3.4.0-SNAPSHOT settings.xml? You may need to
> disable the profile bringing in the 'central' repository. This is a
> relict of moving the central repository out of the super pom. Super POM
> 4.0.0 has the repository, current master super POM 4.1.0 does not have
> it and needs the profile. This is work in progress. Super POM 4.1.0 will
> get deleted in the next days. Maybe the central repository will be
> removed from super POM 4.0.0 instead. No release notes yet.
> 
> Regards,
> -- 
> Christian
> 
> 
> ---------------------------------------------------------------------
> 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


Re: Maven 3.4.0-SNAPSHOT 2016-10-09 and setttings.xml?

Posted by Christian Schulte <cs...@schulte.it>.
Am 10/10/16 um 14:45 schrieb Mirko Friedenhagen:
> Hello,
> 
> I just tried to run "mvn help:effective-pom -Doutput=MVNVERSION.xml"
> on one of our inhouse projects once with 3.3.9 and once with
> 3.4.0-SNAPSHOT (4ad0fb217c93d36cf3365b83baec48470196f5fa;
> 2016-10-09T21:16:52+02:00)
> 
> 3.4.0 seems not to incorporate settings correctly (or I misconfigured
> something). We override the 'central' repository in
> $HOME/.m2/settings.xml and point to our internal Artifactory instance.
> However in the effective-pom I see re
> 
> This is a part of the diff:
> 
>          <id>central</id>
> -        <name>Everything via internal-central</name>
> -        <url>http://inhouse.server/artifactory/internal-central/</url>
> +        <name>Central Repository</name>
> +        <url>https://repo.maven.apache.org/maven2</url>
>        </repository>
> 
> Now I see not only effective-pom is afffected, I am unable to download
> stuff from our internal Artifactory, so builds fail completely.

Did you take a look at the 3.4.0-SNAPSHOT settings.xml? You may need to
disable the profile bringing in the 'central' repository. This is a
relict of moving the central repository out of the super pom. Super POM
4.0.0 has the repository, current master super POM 4.1.0 does not have
it and needs the profile. This is work in progress. Super POM 4.1.0 will
get deleted in the next days. Maybe the central repository will be
removed from super POM 4.0.0 instead. No release notes yet.

Regards,
-- 
Christian


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