@Override public boolean apply(Entry input) { return entryNames.add(input.getName()); } };
@Override public void writeEntry(OutputStream outputStream) throws IOException { entry.writeEntry(outputStream); } }
String entryName = archiveEntry.getName(); if (useRoot == false) { entryName = entryName.substring(entryName.indexOf('/') + 1); entryName = entryName.substring(entryName.lastIndexOf("/") + 1); } else { if (archiveEntry.isDirectory()) { createDir(new File(outputDirectory, entryName)); continue; entryProcessor.processStream(archiveEntry.getName(), archiveEntry.getInputStream(), outputStream); int mode = archiveEntry.getFileMode(); setFilePermissions(outputFile, FileMode.toPermissionsSet(mode)); } else { if (archiveEntry.isDirectory()) { setFilePermissions(outputFile, PosixModes.intModeToPosix(0755)); } else {
@Override public void executeMojo() throws MojoExecutionException { try { Entry entry = pomPropertiesSource(project); try (OutputStream os = context.processOutput(new File(classesDirectory, entry.getName())).newOutputStream()) { entry.writeEntry(os); } } catch (IOException e) { throw new MojoExecutionException("Could not create Maven pom.properties file", e); } }
for (Source source : sources) { for (Entry entry : source.entries()) { String entryName = entry.getName(); if (!selector.include(entryName)) { continue; if (entry.isDirectory()) { continue; if (SelectorUtils.match(executable, entry.getName())) { isExecutable = true; break; if (entry.isDirectory() && !entryName.endsWith("/")) { entryName += "/";
@Override public ExtendedArchiveEntry createEntryFor(String entryName, Entry archiveEntry, boolean isExecutable) { ExtendedArchiveEntry entry = newEntry(entryName, archiveEntry); entry.setSize(archiveEntry.getSize()); // // If we have a valid file mode then use it for the entry we are creating if (archiveEntry.getFileMode() != -1) { entry.setFileMode(archiveEntry.getFileMode()); if (isExecutable) { entry.setFileMode(FileMode.makeExecutable(entry.getFileMode())); } } else { if (isExecutable) { entry.setFileMode(FileMode.EXECUTABLE_FILE.getBits()); } } return entry; } }
@Override public void executeMojo() throws MojoExecutionException { try { Entry entry = pomPropertiesSource(project); try (OutputStream os = context.processOutput(new File(classesDirectory, entry.getName())).newOutputStream()) { entry.writeEntry(os); } } catch (IOException e) { throw new MojoExecutionException("Could not create Maven pom.properties file", e); } }
@Override public void writeEntry(OutputStream outputStream) throws IOException { entry.writeEntry(outputStream); } }
@Override public boolean apply(Entry input) { return entryNames.add(input.getName()); } };