public JApiCmpArchive toJapicmpArchive() { return new JApiCmpArchive(file, version); } }
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<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<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))); }
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));
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);