Skip to content

Commit

Permalink
[MPIR-476] Remove direct usage of localRepository as Mojo parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed Jan 29, 2025
1 parent 03b9832 commit b1b55bb
Show file tree
Hide file tree
Showing 25 changed files with 3 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,6 @@ public abstract class AbstractProjectInfoReport extends AbstractMavenReport {
@Parameter
private List<LicenseMapping> licenseMappings;

/**
* The local repository.
*/
@Parameter(defaultValue = "${localRepository}", readonly = true, required = true)
protected ArtifactRepository localRepository;

// ----------------------------------------------------------------------
// Mojo components
// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public boolean canGenerateReport() throws MavenReportException {
public void executeReport(Locale locale) {
ProjectBuildingRequest buildingRequest =
new DefaultProjectBuildingRequest(getSession().getProjectBuildingRequest());
buildingRequest.setLocalRepository(localRepository);
buildingRequest.setLocalRepository(getSession().getLocalRepository());
buildingRequest.setRemoteRepositories(remoteRepositories);
buildingRequest.setPluginArtifactRepositories(pluginRepositories);
buildingRequest.setProcessPlugins(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void executeReport(Locale locale) {
getReactorProjects(),
projectBuilder,
getSession().getProjectBuildingRequest(),
localRepository,
getSession().getLocalRepository(),
getName(locale),
getDescription(locale),
getSink(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void executeReport(Locale locale) {
getReactorProjects(),
projectBuilder,
getSession().getProjectBuildingRequest(),
localRepository,
getSession().getLocalRepository(),
getI18N(locale),
locale,
getLog(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/ci-mangement</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.CiManagementStub"/>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/ci-management-with-ci-section</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.CiManagementWithCiSectionStub"/>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/mailing-lists</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.MailingListsStub2"/>
<customBundle>${basedir}/src/test/resources/plugin-configs/custom-bundle/src/site/custom/project-info-reports.properties</customBundle>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/dependencies</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.DependenciesStub"/>
<settings implementation="org.apache.maven.report.projectinfo.stubs.SettingsStub"/>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/dependency-convergence</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.DependencyConvergenceStub"/>
<reactorProjects>
<project implementation="org.apache.maven.report.projectinfo.stubs.SubProject1Stub"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/dependency-management</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.DependencyManagementStub"/>
</configuration>
</plugin>
Expand Down
1 change: 0 additions & 1 deletion src/test/resources/plugin-configs/index-plugin-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/index</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.IndexStub"/>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/issue-management</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.IssueManagementStub"/>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/licenses</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.LicensesStub"/>
<settings implementation="org.apache.maven.report.projectinfo.stubs.SettingsStub"/>
<offline>false</offline>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/licenses</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.LicensesStub"/>
<settings implementation="org.apache.maven.report.projectinfo.stubs.SettingsStub"/>
<offline>false</offline>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/mailing-lists</outputDirectory>
<localRepository>${localRepository}</localRepository>
<locale>fr</locale>
<project implementation="org.apache.maven.report.projectinfo.stubs.MailingListsStub"/>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/mailing-lists</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.MailingListsInvalidLinkStub"/>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/mailing-lists</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.MailingListsStub"/>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/modules</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.ModulesStub"/>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/modules</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.ModulesVariableSettingInterpolationStub"/>
<settings implementation="org.apache.maven.report.projectinfo.stubs.SettingsSitePublishVariableStub"/>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/plugin-management</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.PluginManagementMPIR375Stub"/>

<pluginManagementExcludes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/plugin-management</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.PluginManagementStub"/>
</configuration>
</plugin>
Expand Down
1 change: 0 additions & 1 deletion src/test/resources/plugin-configs/scm-plugin-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ under the License.
<configuration>
<outputDirectory>target/test-harness/scm</outputDirectory>
<project implementation="org.apache.maven.report.projectinfo.stubs.ScmStub"/>
<localRepository>${localRepository}</localRepository>
<checkoutDirectoryName>test-artifactId</checkoutDirectoryName>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ under the License.
<configuration>
<outputDirectory>target/test-harness/scm</outputDirectory>
<project implementation="org.apache.maven.report.projectinfo.stubs.ScmStub"/>
<localRepository>${localRepository}</localRepository>
<checkoutDirectoryName>test-artifactId</checkoutDirectoryName>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/summary</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.SummaryStub"/>
</configuration>
</plugin>
Expand Down
1 change: 0 additions & 1 deletion src/test/resources/plugin-configs/team-plugin-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ under the License.
<artifactId>maven-project-info-reports-plugin</artifactId>
<configuration>
<outputDirectory>target/test-harness/team</outputDirectory>
<localRepository>${localRepository}</localRepository>
<project implementation="org.apache.maven.report.projectinfo.stubs.TeamStub"/>
</configuration>
</plugin>
Expand Down

0 comments on commit b1b55bb

Please sign in to comment.