You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/03/14 20:16:01 UTC

[maven] branch MNG-7118 updated (0482052 -> 0417b36)

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a change to branch MNG-7118
in repository https://gitbox.apache.org/repos/asf/maven.git.


 discard 0482052  [MNG-7118] block HTTP repositories by default
 discard 591e9f1  [MNG-7117] add support for blocked mirror
     new f0516cf  [MNG-7117] Add support for blocking mirrors
     new 0417b36  [MNG-7118] Block HTTP repositories by default

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (0482052)
            \
             N -- N -- N   refs/heads/MNG-7118 (0417b36)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 apache-maven/src/assembly/maven/conf/settings.xml                   | 2 +-
 .../internal/aether/DefaultRepositorySystemSessionFactory.java      | 2 +-
 maven-settings/src/main/mdo/settings.mdo                            | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)


[maven] 01/02: [MNG-7117] Add support for blocking mirrors

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MNG-7118
in repository https://gitbox.apache.org/repos/asf/maven.git

commit f0516cfc9c50f2717cb6b14711dfb6b99c491886
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat Mar 13 18:00:59 2021 +0100

    [MNG-7117] Add support for blocking mirrors
---
 .../aether/DefaultRepositorySystemSessionFactory.java       |  4 ++--
 maven-settings/pom.xml                                      |  2 +-
 maven-settings/src/main/mdo/settings.mdo                    | 13 +++++++++++++
 3 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
index 86cb551..99aa6f4 100644
--- a/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
+++ b/maven-core/src/main/java/org/apache/maven/internal/aether/DefaultRepositorySystemSessionFactory.java
@@ -188,8 +188,8 @@ public class DefaultRepositorySystemSessionFactory
         DefaultMirrorSelector mirrorSelector = new DefaultMirrorSelector();
         for ( Mirror mirror : request.getMirrors() )
         {
-            mirrorSelector.add( mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.getMirrorOf(),
-                                mirror.getMirrorOfLayouts() );
+            mirrorSelector.add( mirror.getId(), mirror.getUrl(), mirror.getLayout(), false, mirror.isBlock(),
+                                mirror.getMirrorOf(), mirror.getMirrorOfLayouts() );
         }
         session.setMirrorSelector( mirrorSelector );
 
diff --git a/maven-settings/pom.xml b/maven-settings/pom.xml
index 83288e5..4405e5c 100644
--- a/maven-settings/pom.xml
+++ b/maven-settings/pom.xml
@@ -46,7 +46,7 @@ under the License.
         <groupId>org.codehaus.modello</groupId>
         <artifactId>modello-maven-plugin</artifactId>
         <configuration>
-          <version>1.1.0</version>
+          <version>1.2.0</version>
           <models>
             <model>src/main/mdo/settings.mdo</model>
           </models>
diff --git a/maven-settings/src/main/mdo/settings.mdo b/maven-settings/src/main/mdo/settings.mdo
index 333d8bd..3e1492f 100644
--- a/maven-settings/src/main/mdo/settings.mdo
+++ b/maven-settings/src/main/mdo/settings.mdo
@@ -633,6 +633,15 @@
             of the mirror to repositories with a matching layout (apart from a matching id). Since Maven 3.
           </description>
         </field>
+        <field>
+          <name>block</name>
+          <version>1.2.0+</version>
+          <type>boolean</type>
+          <defaultValue>false</defaultValue>
+          <description>
+            Whether this mirror should block any download request and fail the download process, explaining why.
+          </description>
+        </field>
       </fields>
       <codeSegments>
         <codeSegment>
@@ -648,6 +657,10 @@
         sb.append( ",mirrorOf=" ).append( mirrorOf );
         sb.append( ",url=" ).append( this.url );
         sb.append( ",name=" ).append( this.name );
+        if ( isBlock() )
+        {
+            sb.append( ",block" );
+        }
         sb.append( "]" );
         return sb.toString();
     }


[maven] 02/02: [MNG-7118] Block HTTP repositories by default

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch MNG-7118
in repository https://gitbox.apache.org/repos/asf/maven.git

commit 0417b369df0724b9945915dfa4e996438f7fa09a
Author: Hervé Boutemy <hb...@apache.org>
AuthorDate: Sat Mar 13 19:03:43 2021 +0100

    [MNG-7118] Block HTTP repositories by default
---
 apache-maven/src/assembly/maven/conf/settings.xml | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/apache-maven/src/assembly/maven/conf/settings.xml b/apache-maven/src/assembly/maven/conf/settings.xml
index b5a5a03..8ffeb24 100644
--- a/apache-maven/src/assembly/maven/conf/settings.xml
+++ b/apache-maven/src/assembly/maven/conf/settings.xml
@@ -43,9 +43,9 @@ under the License.
  | values (values used when the setting is not specified) are provided.
  |
  |-->
-<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0"
+<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 https://maven.apache.org/xsd/settings-1.1.0.xsd">
+          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
   <!-- localRepository
    | The path to the local repository maven will use to store artifacts.
    |
@@ -156,6 +156,13 @@ under the License.
       <url>http://my.repository.com/repo/path</url>
     </mirror>
     -->
+    <mirror>
+      <id>maven-default-http-blocker</id>
+      <mirrorOf>external:http:*</mirrorOf>
+      <name>Pseudo repository to mirror external repositories initially using HTTP.</name>
+      <url>http://0.0.0.0/</url>
+      <block>true</block>
+    </mirror>
   </mirrors>
 
   <!-- profiles