Skip to content

Commit

Permalink
Cleanup otherFiles on metadata (#424)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesbusy authored Dec 9, 2024
1 parent f654e23 commit 4316d5c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,13 @@ public String getDescription() {
*/
public static class MetadataAccumulator {
private final List<ArchetypeCommonFile> commonFiles = new ArrayList<>();
private final List<String> otherFiles = new ArrayList<>();
private final Set<MetadataFlag> flags = new HashSet<>();
private final Set<JDK> jdkVersions = new HashSet<>();

public List<ArchetypeCommonFile> getCommonFiles() {
return commonFiles;
}

public List<String> getOtherFiles() {
return otherFiles;
}

public Set<JDK> getJdkVersions() {
return jdkVersions;
}
Expand All @@ -79,10 +74,6 @@ public void addCommonFile(ArchetypeCommonFile file) {
commonFiles.add(file);
}

public void addOtherFile(String file) {
otherFiles.add(file);
}

public void addJdk(JDK jdk) {
jdkVersions.add(jdk);
}
Expand Down Expand Up @@ -116,7 +107,6 @@ public Tree visit(Tree tree, ExecutionContext ctx) {
acc.addCommonFile(commonFile);
LOG.debug("File {} is a common file", sourceFile.getSourcePath());
} else {
acc.addOtherFile(sourceFile.getSourcePath().toString());
LOG.debug("File {} is not a common file", sourceFile.getSourcePath());
}
groovyIsoVisitor.visit(tree, ctx);
Expand Down Expand Up @@ -263,7 +253,6 @@ public Xml.Document visitDocument(Xml.Document document, ExecutionContext ctx) {
resolvedPom.getManagedVersion("org.jenkins-ci.main", "jenkins-core", null, null));
pluginMetadata.setFlags(acc.getFlags());
pluginMetadata.setCommonFiles(acc.getCommonFiles());
pluginMetadata.setOtherFiles(acc.getOtherFiles());
pluginMetadata.setJdks(acc.getJdkVersions());

// Write the metadata to a file for later use by the plugin modernizer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ public class PluginMetadata extends CacheEntry<PluginMetadata> implements Serial
*/
private List<ArchetypeCommonFile> commonFiles;

/**
* List of other files present in the plugin
*/
private List<String> otherFiles;

/**
* JDK versions supported by the plugin
*/
Expand Down Expand Up @@ -143,14 +138,6 @@ public void setCommonFiles(List<ArchetypeCommonFile> commonFiles) {
this.commonFiles = commonFiles;
}

public List<String> getOtherFiles() {
return otherFiles;
}

public void setOtherFiles(List<String> otherFiles) {
this.otherFiles = otherFiles;
}

public Set<JDK> getJdks() {
return jdkVersions;
}
Expand Down

0 comments on commit 4316d5c

Please sign in to comment.