public JApiCmpArchive toJapicmpArchive() { return new JApiCmpArchive(file, version); } }
public static List<File> toFileList(List<JApiCmpArchive> archives) { List<File> files = new ArrayList<>(archives.size()); for (JApiCmpArchive archive : archives) { files.add(archive.getFile()); } return files; }
private List<String> toVersionList(List<JApiCmpArchive> archives) { List<String> versions = new ArrayList<>(archives.size()); for (JApiCmpArchive archive : archives) { String stringVersion = archive.getVersion().getStringVersion(); if (stringVersion != null) { versions.add(stringVersion); } } return versions; }
private List<String> toPathList(List<JApiCmpArchive> archives) { List<String> paths = new ArrayList<>(archives.size()); for (JApiCmpArchive archive : archives) { if (this.reportOnlyFilename) { paths.add(archive.getFile().getName()); } else { paths.add(archive.getFile().getAbsolutePath()); } } return paths; }
public static List<JApiCmpArchive> createFileList(String option) { String[] parts = option.split(";"); List<JApiCmpArchive> jApiCmpArchives = new ArrayList<>(parts.length); for (String part : parts) { File file = new File(part); JApiCmpArchive jApiCmpArchive = new JApiCmpArchive(file, "n.a."); jApiCmpArchives.add(jApiCmpArchive); } return jApiCmpArchives; } }
public static List<String> toVersionList(List<JApiCmpArchive> archives) { List<String> versions = new ArrayList<>(archives.size()); for (JApiCmpArchive archive : archives) { versions.add(archive.getVersion().getStringVersion()); } return versions; }
public static List<File> toFileList(List<JApiCmpArchive> archives) { List<File> files = new ArrayList<>(archives.size()); for (JApiCmpArchive archive : archives) { files.add(archive.getFile()); } return files; }
public static List<JApiCmpArchive> createFileList(String option) { String[] parts = option.split(";"); List<JApiCmpArchive> jApiCmpArchives = new ArrayList<>(parts.length); for (String part : parts) { File file = new File(part); JApiCmpArchive jApiCmpArchive = new JApiCmpArchive(file, "n.a."); jApiCmpArchives.add(jApiCmpArchive); } return jApiCmpArchives; } }
private List<String> toVersionList(List<JApiCmpArchive> archives) { List<String> versions = new ArrayList<>(archives.size()); for (JApiCmpArchive archive : archives) { String stringVersion = archive.getVersion().getStringVersion(); if (stringVersion != null) { versions.add(stringVersion); } } return versions; }
private List<String> toPathList(List<JApiCmpArchive> archives) { List<String> paths = new ArrayList<>(archives.size()); for (JApiCmpArchive archive : archives) { if (this.reportOnlyFilename) { paths.add(archive.getFile().getName()); } else { paths.add(archive.getFile().getAbsolutePath()); } } return paths; }
private List<JApiCmpArchive> resolveConfigurationFileToFile(String parameterName, ConfigurationFile configurationFile, ConfigurationVersion configurationVersion, PluginParameters pluginParameters) throws MojoFailureException { String path = configurationFile.getPath(); if (path == null) { throw new MojoFailureException(String.format("The path element in the configuration of the plugin is missing for %s.", parameterName)); } File file = new File(path); if (!file.exists()) { if (!ignoreMissingArtifact(pluginParameters, configurationVersion)) { throw new MojoFailureException(String.format("The path '%s' does not point to an existing file.", path)); } else { getLog().warn("The file given by path '" + file.getAbsolutePath() + "' does not exist."); } } if (!file.isFile() || !file.canRead()) { if (!ignoreMissingArtifact(pluginParameters, configurationVersion)) { throw new MojoFailureException(String.format("The file given by path '%s' is either not a file or is not readable.", path)); } else { getLog().warn("The file given by path '" + file.getAbsolutePath() + "' is either not a file or is not readable."); } } return Collections.singletonList(new JApiCmpArchive(file, guessVersion(file))); }
public static List<String> toVersionList(List<JApiCmpArchive> archives) { List<String> versions = new ArrayList<>(archives.size()); for (JApiCmpArchive archive : archives) { versions.add(archive.getVersion().getStringVersion()); } return versions; }
File file = artifact.getFile(); if (file != null) { jApiCmpArchives.add(new JApiCmpArchive(file, artifact.getVersion())); } else { throw new MojoFailureException(String.format("Could not resolve dependency with descriptor '%s'.", descriptor)); jApiCmpArchives.add(new JApiCmpArchive(file, version));
List<SemanticVersion> newVersions = new ArrayList<>(); for (JApiCmpArchive file : this.oldArchives) { Optional<SemanticVersion> semanticVersion = file.getVersion().getSemanticVersion(); if (semanticVersion.isPresent()) { oldVersions.add(semanticVersion.get()); Optional<SemanticVersion> semanticVersion = file.getVersion().getSemanticVersion(); if (semanticVersion.isPresent()) { newVersions.add(semanticVersion.get());
File file = artifact.getFile(); if (file != null) { oldArchives.add(new JApiCmpArchive(file, guessVersion(file))); } else { getLog().warn("Artifact '" + artifact + " does not have a file."); try (JarFile jarFile = new JarFile(file)) { getLog().debug("Could open file '" + file.getAbsolutePath() + "' of artifact as jar archive: " + jarFile.getName()); newArchives.add(new JApiCmpArchive(file, guessVersion(file))); } catch (IOException e) { getLog().warn("No new version specified and file '" + file.getAbsolutePath() + "' of artifact could not be opened as jar archive: " + e.getMessage(), e); newArchives.add(new JApiCmpArchive(file, guessVersion(file))); } catch (IOException e) { getLog().warn("No new version specified and file '" + file.getAbsolutePath() + "' of artifact could not be opened as jar archive: " + e.getMessage(), e);
List<SemanticVersion> newVersions = new ArrayList<>(); for (JApiCmpArchive file : options.getOldArchives()) { Optional<SemanticVersion> semanticVersion = file.getVersion().getSemanticVersion(); if (semanticVersion.isPresent()) { oldVersions.add(semanticVersion.get()); Optional<SemanticVersion> semanticVersion = file.getVersion().getSemanticVersion(); if (semanticVersion.isPresent()) { newVersions.add(semanticVersion.get());
List<SemanticVersion> newVersions = new ArrayList<>(); for (JApiCmpArchive file : options.getOldArchives()) { Optional<SemanticVersion> semanticVersion = file.getVersion().getSemanticVersion(); if (semanticVersion.isPresent()) { oldVersions.add(semanticVersion.get()); Optional<SemanticVersion> semanticVersion = file.getVersion().getSemanticVersion(); if (semanticVersion.isPresent()) { newVersions.add(semanticVersion.get());