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 2023/03/12 21:42:42 UTC

[maven-doxia-sitetools] branch replace-old-resolution created (now 41e782b)

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

michaelo pushed a change to branch replace-old-resolution
in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git


      at 41e782b  First try

This branch includes the following new commits:

     new 41e782b  First try

The 1 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.



[maven-doxia-sitetools] 01/01: First try

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

michaelo pushed a commit to branch replace-old-resolution
in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git

commit 41e782bdead030334005aa79d9d523e41be7880d
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Mar 12 22:42:29 2023 +0100

    First try
---
 .../apache/maven/doxia/tools/DefaultSiteTool.java  | 294 +++++++++++----------
 .../org/apache/maven/doxia/tools/SiteTool.java     |  21 +-
 2 files changed, 165 insertions(+), 150 deletions(-)

diff --git a/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java b/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
index 7b95cb8..1824783 100644
--- a/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
+++ b/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/DefaultSiteTool.java
@@ -40,11 +40,13 @@ import java.util.Objects;
 import java.util.StringTokenizer;
 
 import org.apache.commons.io.FilenameUtils;
+import org.apache.maven.RepositoryUtils;
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.factory.ArtifactFactory;
+import org.apache.maven.artifact.ArtifactUtils;
+import org.apache.maven.artifact.DefaultArtifact;
+import org.apache.maven.artifact.handler.ArtifactHandler;
+import org.apache.maven.artifact.handler.manager.ArtifactHandlerManager;
 import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.artifact.versioning.InvalidVersionSpecificationException;
 import org.apache.maven.artifact.versioning.VersionRange;
@@ -77,6 +79,13 @@ import org.codehaus.plexus.util.ReaderFactory;
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
+import org.eclipse.aether.RepositorySystem;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.artifact.ArtifactType;
+import org.eclipse.aether.resolution.ArtifactRequest;
+import org.eclipse.aether.resolution.ArtifactResolutionException;
+import org.eclipse.aether.resolution.ArtifactResult;
+import org.eclipse.aether.transfer.ArtifactNotFoundException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -95,16 +104,16 @@ public class DefaultSiteTool implements SiteTool {
     // ----------------------------------------------------------------------
 
     /**
-     * The component that is used to resolve additional artifacts required.
+     * The component that is used to resolve additional required artifacts.
      */
     @Inject
-    private ArtifactResolver artifactResolver;
+    protected RepositorySystem repositorySystem;
 
     /**
-     * The component used for creating artifact instances.
+     * The component used for getting artifact handler managers.
      */
     @Inject
-    private ArtifactFactory artifactFactory;
+    private ArtifactHandlerManager artifactHandlerManager;
 
     /**
      * Internationalization.
@@ -128,36 +137,45 @@ public class DefaultSiteTool implements SiteTool {
     // Public methods
     // ----------------------------------------------------------------------
 
+    /** {@inheritDoc} */
     public Artifact getSkinArtifactFromRepository(
-            ArtifactRepository localRepository,
+            RepositorySystemSession repoSession,
             List<ArtifactRepository> remoteArtifactRepositories,
-            DecorationModel decoration)
+            Skin skin)
             throws SiteToolException {
-        Objects.requireNonNull(localRepository, "localRepository cannot be null");
+        Objects.requireNonNull(repoSession, "repoSession cannot be null");
         Objects.requireNonNull(remoteArtifactRepositories, "remoteArtifactRepositories cannot be null");
-        Objects.requireNonNull(decoration, "decoration cannot be null");
-        Skin skin = Objects.requireNonNull(decoration.getSkin(), "decoration.skin cannot be null");
+        Objects.requireNonNull(skin, "skin cannot be null");
 
         String version = skin.getVersion();
-        Artifact artifact;
         try {
             if (version == null) {
                 version = Artifact.RELEASE_VERSION;
             }
             VersionRange versionSpec = VersionRange.createFromVersionSpec(version);
-            artifact = artifactFactory.createDependencyArtifact(
-                    skin.getGroupId(), skin.getArtifactId(), versionSpec, "jar", null, null);
-
-            artifactResolver.resolve(artifact, remoteArtifactRepositories, localRepository);
+            String type = "jar";
+            Artifact artifact = new DefaultArtifact(skin.getGroupId(), skin.getArtifactId(), versionSpec,
+                    Artifact.SCOPE_RUNTIME, type, null,
+                    artifactHandlerManager.getArtifactHandler(type));
+             ArtifactRequest request = new ArtifactRequest(
+                    RepositoryUtils.toArtifact(artifact),
+                    RepositoryUtils.toRepos(remoteArtifactRepositories),
+                    "remote-skin");
+            ArtifactResult result = repositorySystem.resolveArtifact(repoSession, request);
+
+            if (!result.isResolved())
+                throw new SiteToolException(
+                        "The skin '" + ArtifactUtils.key(artifact) + "' does not exist",
+                        result.getExceptions().stream().filter(
+                                e -> (e instanceof ArtifactNotFoundException))
+                                .findFirst().orElse(null));
+
+            return RepositoryUtils.toArtifact(result.getArtifact());
         } catch (InvalidVersionSpecificationException e) {
             throw new SiteToolException("The skin version '" + version + "' is not valid", e);
         } catch (ArtifactResolutionException e) {
             throw new SiteToolException("Unable to find skin", e);
-        } catch (ArtifactNotFoundException e) {
-            throw new SiteToolException("The skin does not exist", e);
         }
-
-        return artifact;
     }
 
     /**
@@ -325,8 +343,8 @@ public class DefaultSiteTool implements SiteTool {
      * Get a site descriptor from one of the repositories.
      *
      * @param project the Maven project, not null.
-     * @param localRepository the Maven local repository, not null.
-     * @param repositories the Maven remote repositories, not null.
+     * @param repoSession the repository system session, not null.
+     * @param remoteArtifactRepositories the Maven remote repositories, not null.
      * @param locale the locale wanted for the site descriptor, not null.
      * See {@link #getSiteDescriptor(File, Locale)} for details.
      * @return the site descriptor into the local repository after download of it from repositories or null if not
@@ -335,17 +353,17 @@ public class DefaultSiteTool implements SiteTool {
      */
     File getSiteDescriptorFromRepository(
             MavenProject project,
-            ArtifactRepository localRepository,
-            List<ArtifactRepository> repositories,
+            RepositorySystemSession repoSession,
+            List<ArtifactRepository> remoteArtifactRepositories,
             Locale locale)
             throws SiteToolException {
         Objects.requireNonNull(project, "project cannot be null");
-        Objects.requireNonNull(localRepository, "localRepository cannot be null");
-        Objects.requireNonNull(repositories, "repositories cannot be null");
+        Objects.requireNonNull(repoSession, "repoSession cannot be null");
+        Objects.requireNonNull(remoteArtifactRepositories, "remoteArtifactRepositories cannot be null");
         Objects.requireNonNull(locale, "locale cannot be null");
 
         try {
-            return resolveSiteDescriptor(project, localRepository, repositories, locale);
+            return resolveSiteDescriptor(project, repoSession, remoteArtifactRepositories, locale);
         } catch (ArtifactNotFoundException e) {
             LOGGER.debug("Unable to locate site descriptor", e);
             return null;
@@ -362,20 +380,20 @@ public class DefaultSiteTool implements SiteTool {
             Locale locale,
             MavenProject project,
             List<MavenProject> reactorProjects,
-            ArtifactRepository localRepository,
-            List<ArtifactRepository> repositories)
+            RepositorySystemSession repoSession,
+            List<ArtifactRepository> remoteArtifactRepositories)
             throws SiteToolException {
         Objects.requireNonNull(locale, "locale cannot be null");
         Objects.requireNonNull(project, "project cannot be null");
         Objects.requireNonNull(reactorProjects, "reactorProjects cannot be null");
-        Objects.requireNonNull(localRepository, "localRepository cannot be null");
-        Objects.requireNonNull(repositories, "repositories cannot be null");
+        Objects.requireNonNull(repoSession, "repoSession cannot be null");
+        Objects.requireNonNull(remoteArtifactRepositories, "remoteArtifactRepositories cannot be null");
 
         LOGGER.debug("Computing decoration model of '" + project.getId() + "' for "
                 + (locale.equals(SiteTool.DEFAULT_LOCALE) ? "default locale" : "locale '" + locale + "'"));
 
         Map.Entry<DecorationModel, MavenProject> result =
-                getDecorationModel(0, siteDirectory, locale, project, reactorProjects, localRepository, repositories);
+                getDecorationModel(0, siteDirectory, locale, project, reactorProjects, repoSession, remoteArtifactRepositories);
         DecorationModel decorationModel = result.getKey();
         MavenProject parentProject = result.getValue();
 
@@ -397,7 +415,7 @@ public class DefaultSiteTool implements SiteTool {
         }
 
         try {
-            populateModulesMenu(decorationModel, locale, project, reactorProjects, localRepository, true);
+            populateModulesMenu(decorationModel, locale, project, reactorProjects, repoSession.getLocalRepository(), true);
         } catch (IOException e) {
             throw new SiteToolException("Error while populating modules menu", e);
         }
@@ -796,8 +814,8 @@ public class DefaultSiteTool implements SiteTool {
 
     /**
      * @param project not null
-     * @param localRepository not null
-     * @param repositories not null
+     * @param repoSession the repository system session not null
+     * @param remoteArtifactRepositories not null
      * @param locale not null
      * @return the resolved site descriptor
      * @throws IOException if any
@@ -806,129 +824,125 @@ public class DefaultSiteTool implements SiteTool {
      */
     private File resolveSiteDescriptor(
             MavenProject project,
-            ArtifactRepository localRepository,
-            List<ArtifactRepository> repositories,
+            RepositorySystemSession repoSession,
+            List<ArtifactRepository> remoteArtifactRepositories,
             Locale locale)
             throws IOException, ArtifactResolutionException, ArtifactNotFoundException {
         String variant = locale.getVariant();
         String country = locale.getCountry();
         String language = locale.getLanguage();
 
+        String type = "xml";
+        ArtifactHandler artifactHandler = artifactHandlerManager.getArtifactHandler(type);
+
         Artifact artifact = null;
         File siteDescriptor = null;
         boolean found = false;
 
         if (!variant.isEmpty()) {
             String localeStr = language + "_" + country + "_" + variant;
-            // TODO: this is a bit crude - proper type, or proper handling as metadata rather than an artifact in 2.1?
-            artifact = artifactFactory.createArtifactWithClassifier(
-                    project.getGroupId(), project.getArtifactId(), project.getVersion(), "xml", "site_" + localeStr);
-
-            try {
-                artifactResolver.resolve(artifact, repositories, localRepository);
-
-                siteDescriptor = artifact.getFile();
-
-                // we use zero length files to avoid re-resolution (see below)
-                if (siteDescriptor.length() > 0) {
-                    found = true;
-                } else {
+            artifact = new DefaultArtifact(project.getGroupId(), project.getArtifactId(), project.getVersion(),
+                    Artifact.SCOPE_RUNTIME, type, "site_" + localeStr,
+                    artifactHandler);
+             ArtifactRequest request = new ArtifactRequest(
+                    RepositoryUtils.toArtifact(artifact),
+                    RepositoryUtils.toRepos(remoteArtifactRepositories),
+                    "remote-site-descriptor");
+
+             ArtifactResult result = repositorySystem.resolveArtifact(repoSession, request);
+
+             if (result.isResolved()) {
+                siteDescriptor = result.getArtifact().getFile();
+                found = true;
+             } else {
+                Exception anfe = result.getExceptions().stream().filter(
+                         e -> (e instanceof ArtifactNotFoundException)).findFirst().orElse(null);
+                 if (anfe == null) {
                     LOGGER.debug("No site descriptor found for '" + project.getId() + "' for locale '" + localeStr
-                            + "', trying without variant...");
-                }
-            } catch (ArtifactNotFoundException e) {
-                LOGGER.debug("Unable to locate site descriptor for locale '" + localeStr + "'", e);
-
-                // we can afford to write an empty descriptor here as we don't expect it to turn up later in the
-                // remote repository, because the parent was already released (and snapshots are updated
-                // automatically if changed)
-                siteDescriptor = new File(localRepository.getBasedir(), localRepository.pathOf(artifact));
-                siteDescriptor.getParentFile().mkdirs();
-                siteDescriptor.createNewFile();
-            }
+                             + "', trying without variant...");
+                 } else {
+                    LOGGER.debug("Unable to locate site descriptor for locale '" + localeStr + "'", anfe);
+                 }
+             }
         }
 
         if (!found && !country.isEmpty()) {
             String localeStr = language + "_" + country;
-            // TODO: this is a bit crude - proper type, or proper handling as metadata rather than an artifact in 2.1?
-            artifact = artifactFactory.createArtifactWithClassifier(
-                    project.getGroupId(), project.getArtifactId(), project.getVersion(), "xml", "site_" + localeStr);
-
-            try {
-                artifactResolver.resolve(artifact, repositories, localRepository);
-
-                siteDescriptor = artifact.getFile();
-
-                // we use zero length files to avoid re-resolution (see below)
-                if (siteDescriptor.length() > 0) {
-                    found = true;
-                } else {
+            artifact = new DefaultArtifact(project.getGroupId(), project.getArtifactId(), project.getVersion(),
+                    Artifact.SCOPE_RUNTIME, type, "site_" + localeStr,
+                    artifactHandler);
+             ArtifactRequest request = new ArtifactRequest(
+                    RepositoryUtils.toArtifact(artifact),
+                    RepositoryUtils.toRepos(remoteArtifactRepositories),
+                    "remote-site-descriptor");
+
+             ArtifactResult result = repositorySystem.resolveArtifact(repoSession, request);
+
+             if (result.isResolved()) {
+                siteDescriptor = result.getArtifact().getFile();
+                found = true;
+             } else {
+                Exception anfe = result.getExceptions().stream().filter(
+                         e -> (e instanceof ArtifactNotFoundException)).findFirst().orElse(null);
+                 if (anfe == null) {
                     LOGGER.debug("No site descriptor found for '" + project.getId() + "' for locale '" + localeStr
-                            + "', trying without country...");
-                }
-            } catch (ArtifactNotFoundException e) {
-                LOGGER.debug("Unable to locate site descriptor for locale '" + localeStr + "'", e);
-
-                // we can afford to write an empty descriptor here as we don't expect it to turn up later in the
-                // remote repository, because the parent was already released (and snapshots are updated
-                // automatically if changed)
-                siteDescriptor = new File(localRepository.getBasedir(), localRepository.pathOf(artifact));
-                siteDescriptor.getParentFile().mkdirs();
-                siteDescriptor.createNewFile();
-            }
+                             + "', trying without country...");
+                 } else {
+                    LOGGER.debug("Unable to locate site descriptor for locale '" + localeStr + "'", anfe);
+                 }
+             }
         }
 
         if (!found && !language.isEmpty()) {
             String localeStr = language;
-            // TODO: this is a bit crude - proper type, or proper handling as metadata rather than an artifact in 2.1?
-            artifact = artifactFactory.createArtifactWithClassifier(
-                    project.getGroupId(), project.getArtifactId(), project.getVersion(), "xml", "site_" + localeStr);
-
-            try {
-                artifactResolver.resolve(artifact, repositories, localRepository);
-
-                siteDescriptor = artifact.getFile();
-
-                // we use zero length files to avoid re-resolution (see below)
-                if (siteDescriptor.length() > 0) {
-                    found = true;
-                } else {
+            artifact = new DefaultArtifact(project.getGroupId(), project.getArtifactId(), project.getVersion(),
+                    Artifact.SCOPE_RUNTIME, type, "site_" + localeStr,
+                    artifactHandler);
+             ArtifactRequest request = new ArtifactRequest(
+                    RepositoryUtils.toArtifact(artifact),
+                    RepositoryUtils.toRepos(remoteArtifactRepositories),
+                    "remote-site-descriptor");
+
+             ArtifactResult result = repositorySystem.resolveArtifact(repoSession, request);
+
+             if (result.isResolved()) {
+                siteDescriptor = result.getArtifact().getFile();
+                found = true;
+             } else {
+                Exception anfe = result.getExceptions().stream().filter(
+                         e -> (e instanceof ArtifactNotFoundException)).findFirst().orElse(null);
+                 if (anfe == null) {
                     LOGGER.debug("No site descriptor found for '" + project.getId() + "' for locale '" + localeStr
-                            + "', trying default locale...");
-                }
-            } catch (ArtifactNotFoundException e) {
-                LOGGER.debug("Unable to locate site descriptor for locale '" + localeStr + "'", e);
-
-                // we can afford to write an empty descriptor here as we don't expect it to turn up later in the
-                // remote repository, because the parent was already released (and snapshots are updated
-                // automatically if changed)
-                siteDescriptor = new File(localRepository.getBasedir(), localRepository.pathOf(artifact));
-                siteDescriptor.getParentFile().mkdirs();
-                siteDescriptor.createNewFile();
-            }
+                             + "', trying default locale...");
+                 } else {
+                    LOGGER.debug("Unable to locate site descriptor for locale '" + localeStr + "'", anfe);
+                 }
+             }
         }
 
         if (!found) {
-            artifact = artifactFactory.createArtifactWithClassifier(
-                    project.getGroupId(), project.getArtifactId(), project.getVersion(), "xml", "site");
-            try {
-                artifactResolver.resolve(artifact, repositories, localRepository);
-            } catch (ArtifactNotFoundException e) {
-                // see above regarding this zero length file
-                siteDescriptor = new File(localRepository.getBasedir(), localRepository.pathOf(artifact));
-                siteDescriptor.getParentFile().mkdirs();
-                siteDescriptor.createNewFile();
-
-                throw e;
-            }
-
-            siteDescriptor = artifact.getFile();
-
-            // we use zero length files to avoid re-resolution (see below)
-            if (siteDescriptor.length() == 0) {
-                LOGGER.debug("No site descriptor found for '" + project.getId() + "' with default locale.");
-                siteDescriptor = null;
-            }
+            artifact = new DefaultArtifact(project.getGroupId(), project.getArtifactId(), project.getVersion(),
+                    Artifact.SCOPE_RUNTIME, type, "site",
+                    artifactHandler);
+             ArtifactRequest request = new ArtifactRequest(
+                    RepositoryUtils.toArtifact(artifact),
+                    RepositoryUtils.toRepos(remoteArtifactRepositories),
+                    "remote-site-descriptor");
+
+             ArtifactResult result = repositorySystem.resolveArtifact(repoSession, request);
+
+             if (result.isResolved()) {
+                siteDescriptor = result.getArtifact().getFile();
+             } else {
+                Exception anfe = result.getExceptions().stream().filter(
+                         e -> (e instanceof ArtifactNotFoundException)).findFirst().orElse(null);
+                 if (anfe == null) {
+                    LOGGER.debug("No site descriptor found for '" + project.getId() + "' with default locale.");
+                    siteDescriptor = null;
+                 } else {
+                    throw (ArtifactNotFoundException) anfe;
+                 }
+             }
         }
 
         return siteDescriptor;
@@ -940,8 +954,8 @@ public class DefaultSiteTool implements SiteTool {
      * @param locale not null
      * @param project not null
      * @param reactorProjects not null
-     * @param localRepository not null
-     * @param repositories not null
+     * @param repoSession not null
+     * @param remoteArtifactRepositories not null
      * @return the decoration model depending the locale and the parent project
      * @throws SiteToolException if any
      */
@@ -951,15 +965,15 @@ public class DefaultSiteTool implements SiteTool {
             Locale locale,
             MavenProject project,
             List<MavenProject> reactorProjects,
-            ArtifactRepository localRepository,
-            List<ArtifactRepository> repositories)
+            RepositorySystemSession repoSession,
+            List<ArtifactRepository> remoteArtifactRepositories)
             throws SiteToolException {
         // 1. get site descriptor File
         File siteDescriptor;
         if (project.getBasedir() == null) {
             // POM is in the repository: look into the repository for site descriptor
             try {
-                siteDescriptor = getSiteDescriptorFromRepository(project, localRepository, repositories, locale);
+                siteDescriptor = getSiteDescriptorFromRepository(project, repoSession, remoteArtifactRepositories, locale);
             } catch (SiteToolException e) {
                 throw new SiteToolException("The site descriptor cannot be resolved from the repository", e);
             }
@@ -1021,8 +1035,8 @@ public class DefaultSiteTool implements SiteTool {
                             locale,
                             parentProject,
                             reactorProjects,
-                            localRepository,
-                            repositories)
+                            repoSession,
+                            remoteArtifactRepositories)
                     .getKey();
 
             // MSHARED-116 requires an empty decoration model (instead of a null one)
diff --git a/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/SiteTool.java b/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/SiteTool.java
index c31d30e..c4e3578 100644
--- a/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/SiteTool.java
+++ b/doxia-integration-tools/src/main/java/org/apache/maven/doxia/tools/SiteTool.java
@@ -26,8 +26,10 @@ import java.util.Map;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.doxia.site.decoration.DecorationModel;
+import org.apache.maven.doxia.site.decoration.Skin;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.reporting.MavenReport;
+import org.eclipse.aether.RepositorySystemSession;
 
 /**
  * Tool to play with <a href="http://maven.apache.org/doxia/">Doxia</a> objects
@@ -46,17 +48,16 @@ public interface SiteTool {
     /**
      * Get a skin artifact from one of the repositories.
      *
-     * @param localRepository the Maven local repository, not null.
+     * @param repoSession the repository system session, not null.
      * @param remoteArtifactRepositories the Maven remote repositories, not null.
-     * @param decoration the Doxia site descriptor model, not null.
-     * @return the <code>Skin</code> artifact defined in a <code>DecorationModel</code> from a given project and a
-     * local repository
+     * @param skin the Skin model, not null.
+     * @return the <code>Skin</code> artifact defined in a <code>DecorationModel</code> from a given project
      * @throws SiteToolException if any
      */
     Artifact getSkinArtifactFromRepository(
-            ArtifactRepository localRepository,
+            RepositorySystemSession repoSession,
             List<ArtifactRepository> remoteArtifactRepositories,
-            DecorationModel decoration)
+            Skin skin)
             throws SiteToolException;
 
     /**
@@ -115,8 +116,8 @@ public interface SiteTool {
      * See {@link #getSiteDescriptor(File, Locale)} for details.
      * @param project the Maven project, not null.
      * @param reactorProjects the Maven reactor projects, not null.
-     * @param localRepository the Maven local repository, not null.
-     * @param repositories the Maven remote repositories, not null.
+     * @param repoSession the repository system session, not null.
+     * @param remoteArtifactRepositories the Maven remote repositories, not null.
      * @return the <code>DecorationModel</code> object corresponding to the <code>site.xml</code> file with some
      * interpolations.
      * @throws SiteToolException if any
@@ -127,8 +128,8 @@ public interface SiteTool {
             Locale locale,
             MavenProject project,
             List<MavenProject> reactorProjects,
-            ArtifactRepository localRepository,
-            List<ArtifactRepository> repositories)
+            RepositorySystemSession repoSession,
+            List<ArtifactRepository> remoteArtifactRepositories)
             throws SiteToolException;
 
     /**