Skip to content

Commit b1b55bb

Browse files
[MPIR-476] Remove direct usage of localRepository as Mojo parameter
1 parent 03b9832 commit b1b55bb

25 files changed

Lines changed: 3 additions & 30 deletions

src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,12 +119,6 @@ public abstract class AbstractProjectInfoReport extends AbstractMavenReport {
119119
@Parameter
120120
private List<LicenseMapping> licenseMappings;
121121

122-
/**
123-
* The local repository.
124-
*/
125-
@Parameter(defaultValue = "${localRepository}", readonly = true, required = true)
126-
protected ArtifactRepository localRepository;
127-
128122
// ----------------------------------------------------------------------
129123
// Mojo components
130124
// ----------------------------------------------------------------------

src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public boolean canGenerateReport() throws MavenReportException {
9696
public void executeReport(Locale locale) {
9797
ProjectBuildingRequest buildingRequest =
9898
new DefaultProjectBuildingRequest(getSession().getProjectBuildingRequest());
99-
buildingRequest.setLocalRepository(localRepository);
99+
buildingRequest.setLocalRepository(getSession().getLocalRepository());
100100
buildingRequest.setRemoteRepositories(remoteRepositories);
101101
buildingRequest.setPluginArtifactRepositories(pluginRepositories);
102102
buildingRequest.setProcessPlugins(false);

src/main/java/org/apache/maven/report/projectinfo/IndexReport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public void executeReport(Locale locale) {
7676
getReactorProjects(),
7777
projectBuilder,
7878
getSession().getProjectBuildingRequest(),
79-
localRepository,
79+
getSession().getLocalRepository(),
8080
getName(locale),
8181
getDescription(locale),
8282
getSink(),

src/main/java/org/apache/maven/report/projectinfo/ModulesReport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public void executeReport(Locale locale) {
7878
getReactorProjects(),
7979
projectBuilder,
8080
getSession().getProjectBuildingRequest(),
81-
localRepository,
81+
getSession().getLocalRepository(),
8282
getI18N(locale),
8383
locale,
8484
getLog(),

src/test/resources/plugin-configs/ci-management-plugin-config.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ under the License.
3939
<artifactId>maven-project-info-reports-plugin</artifactId>
4040
<configuration>
4141
<outputDirectory>target/test-harness/ci-mangement</outputDirectory>
42-
<localRepository>${localRepository}</localRepository>
4342
<project implementation="org.apache.maven.report.projectinfo.stubs.CiManagementStub"/>
4443
</configuration>
4544
</plugin>

src/test/resources/plugin-configs/ci-management-plugin-with-ci-section-config.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ under the License.
3939
<artifactId>maven-project-info-reports-plugin</artifactId>
4040
<configuration>
4141
<outputDirectory>target/test-harness/ci-management-with-ci-section</outputDirectory>
42-
<localRepository>${localRepository}</localRepository>
4342
<project implementation="org.apache.maven.report.projectinfo.stubs.CiManagementWithCiSectionStub"/>
4443
</configuration>
4544
</plugin>

src/test/resources/plugin-configs/custom-bundle/plugin-config.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ under the License.
5252
<artifactId>maven-project-info-reports-plugin</artifactId>
5353
<configuration>
5454
<outputDirectory>target/test-harness/mailing-lists</outputDirectory>
55-
<localRepository>${localRepository}</localRepository>
5655
<project implementation="org.apache.maven.report.projectinfo.stubs.MailingListsStub2"/>
5756
<customBundle>${basedir}/src/test/resources/plugin-configs/custom-bundle/src/site/custom/project-info-reports.properties</customBundle>
5857
</configuration>

src/test/resources/plugin-configs/dependencies-plugin-config.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ under the License.
3939
<artifactId>maven-project-info-reports-plugin</artifactId>
4040
<configuration>
4141
<outputDirectory>target/test-harness/dependencies</outputDirectory>
42-
<localRepository>${localRepository}</localRepository>
4342
<project implementation="org.apache.maven.report.projectinfo.stubs.DependenciesStub"/>
4443
<settings implementation="org.apache.maven.report.projectinfo.stubs.SettingsStub"/>
4544
</configuration>

src/test/resources/plugin-configs/dependency-convergence-plugin-config.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ under the License.
3939
<artifactId>maven-project-info-reports-plugin</artifactId>
4040
<configuration>
4141
<outputDirectory>target/test-harness/dependency-convergence</outputDirectory>
42-
<localRepository>${localRepository}</localRepository>
4342
<project implementation="org.apache.maven.report.projectinfo.stubs.DependencyConvergenceStub"/>
4443
<reactorProjects>
4544
<project implementation="org.apache.maven.report.projectinfo.stubs.SubProject1Stub"/>

src/test/resources/plugin-configs/dependency-management-plugin-config.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ under the License.
4848
<artifactId>maven-project-info-reports-plugin</artifactId>
4949
<configuration>
5050
<outputDirectory>target/test-harness/dependency-management</outputDirectory>
51-
<localRepository>${localRepository}</localRepository>
5251
<project implementation="org.apache.maven.report.projectinfo.stubs.DependencyManagementStub"/>
5352
</configuration>
5453
</plugin>

0 commit comments

Comments
 (0)