Skip to content

Commit

Permalink
JavaProject: Remove unused localRepositoryBaseDirectory field
Browse files Browse the repository at this point in the history
localRepositoryBaseDirectory only seemed to be only getting used by
JKubeArtifactResolverService which was removed in eclipse-jkube#1127. Removing this
field as it's no longer used anywhere.

Signed-off-by: Rohan Kumar <rohaan@redhat.com>
  • Loading branch information
rohanKanojia committed Nov 25, 2021
1 parent 120cb44 commit bf3f769
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,11 @@ public static JavaProject convertMavenProjectToJKubeProject(MavenProject mavenPr
JavaProject.JavaProjectBuilder builder = JavaProject.builder();

Properties properties = new Properties();
File localRepositoryBaseDir = null;

if (mavenProject.getProperties() != null) {
properties.putAll(mavenProject.getProperties());
}
if (mavenSession != null) {
if (mavenSession.getLocalRepository().getBasedir() != null) {
localRepositoryBaseDir = new File(mavenSession.getLocalRepository().getBasedir());
}
if (mavenSession.getUserProperties() != null) {
properties.putAll(mavenSession.getUserProperties());
}
Expand All @@ -348,7 +344,6 @@ public static JavaProject convertMavenProjectToJKubeProject(MavenProject mavenPr
.packaging(mavenProject.getPackaging())
.dependencies(getDependencies(mavenProject))
.dependenciesWithTransitive(getTransitiveDependencies(mavenProject))
.localRepositoryBaseDirectory(localRepositoryBaseDir)
.plugins(getPlugins(mavenProject));

if (mavenProject.getOrganization() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,6 @@ public class JavaProject implements Serializable {
* @return The project's generated artifact file.
*/
private File artifact;
/**
* Directory for the project's local repository.
*
* @param localRepositoryBaseDirectory New directory for the project's local repository.
* @return The project's local repository directory.
*/
private File localRepositoryBaseDirectory;
/**
* Project's packaging type. Specifies the type of artifact the project produces.
*
Expand Down Expand Up @@ -249,8 +242,8 @@ public JavaProject(
Properties properties, @Singular List<String> compileClassPathElements, @Singular List<Dependency> dependencies,
List<Dependency> dependenciesWithTransitive, @Singular List<Plugin> plugins,
String site, String description, String organizationName, String documentationUrl,
String buildFinalName, File artifact, File localRepositoryBaseDirectory,
String packaging, String issueManagementSystem, String issueManagementUrl, String url, String scmUrl, String scmTag,
String buildFinalName, File artifact, String packaging, String issueManagementSystem, String issueManagementUrl,
String url, String scmUrl, String scmTag,
@Singular List<Maintainer> maintainers) {

this.name = name;
Expand All @@ -271,7 +264,6 @@ public JavaProject(
this.documentationUrl = documentationUrl;
this.buildFinalName = buildFinalName;
this.artifact = artifact;
this.localRepositoryBaseDirectory = localRepositoryBaseDirectory;
this.packaging = packaging;
this.issueManagementSystem = issueManagementSystem;
this.issueManagementUrl = issueManagementUrl;
Expand Down

0 comments on commit bf3f769

Please sign in to comment.