- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.codehaus.plexus.archiver.zip.ZipArchiver
类的一些代码示例,展示了ZipArchiver
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZipArchiver
类的具体详情如下:
包路径:org.codehaus.plexus.archiver.zip.ZipArchiver
类名称:ZipArchiver
暂无
代码示例来源:origin: apache/usergrid
/**
* @param jarFile Jar file to be created
* @param sourceFolder Jar file will be created out of the contents of this folder. This corresponds to the root
* folder of the jar file once it is created.
*/
public static void archiveWar( File jarFile, String sourceFolder ) throws MojoExecutionException {
try {
ZipArchiver archiver = new ZipArchiver();
archiver.enableLogging( new ConsoleLogger( org.codehaus.plexus.logging.Logger.LEVEL_INFO, "console" ) );
archiver.setDestFile( jarFile );
archiver.addDirectory( new File( sourceFolder ), "", new String[] { "**/*" }, null );
archiver.createArchive();
}
catch ( Exception e ) {
throw new MojoExecutionException( "Error while creating WAR file", e );
}
}
代码示例来源:origin: simpligility/android-maven-plugin
final ZipArchiver zipArchiver = new ZipArchiver();
zipArchiver.setDestFile( aarLibrary );
zipArchiver.addFile( destinationManifestFile, "AndroidManifest.xml" );
addDirectory( zipArchiver, assetsDirectory, "assets", false );
zipArchiver.addFile( classesJar, SdkConstants.FN_CLASSES_JAR );
zipArchiver.addFile( mergedConsumerProguardFile, "proguard.txt" );
zipArchiver.createArchive();
代码示例来源:origin: simpligility/android-maven-plugin
/**
* Adds a directory to a {@link JarArchiver} with a directory prefix.
*
* @param zipArchiver ZipArchiver to use to archive the file.
* @param directory The directory to add.
* @param prefix An optional prefix for where in the Jar file the directory's contents should go.
* @param includeEmptyFolders Whether to include an entry for empty folder in the archive.
*/
protected void addDirectory( ZipArchiver zipArchiver, File directory, String prefix, boolean includeEmptyFolders )
{
if ( directory != null && directory.exists() )
{
final DefaultFileSet fileSet = new DefaultFileSet();
fileSet.setPrefix( endWithSlash( prefix ) );
fileSet.setDirectory( directory );
fileSet.setIncludingEmptyDirectories( includeEmptyFolders );
zipArchiver.addFileSet( fileSet );
getLog().debug( "Added files from " + directory );
}
}
代码示例来源:origin: fabric8io/fabric8-maven-plugin
public static void createArchive(File sourceDir, File destinationFile, ZipArchiver archiver) throws MojoExecutionException {
try {
archiver.addDirectory(sourceDir);
archiver.setDestFile(destinationFile);
archiver.createArchive();
} catch (IOException e) {
throw new MojoExecutionException("Failed to create archive " + destinationFile + ": " + e, e);
}
}
代码示例来源:origin: org.codehaus.mojo/nbm-maven-plugin
ZipArchiver archiver = new ZipArchiver();
if ( codebase != null )
archiver.addDirectory( webstartBuildDir );
archiver.addDirectory( webstartBuildDir, null, new String[] { "**/*.jnlp" } );
for ( final File jnlp : webstartBuildDir.listFiles() )
archiver.addResource( new PlexusIoResource() {
public @Override InputStream getContents() throws IOException
}, jnlp.getName(), archiver.getDefaultFileMode() );
archiver.addFile( servlet, "WEB-INF/lib/jnlp-servlet.jar" );
archiver.addResource( new PlexusIoResource() {
public @Override InputStream getContents() throws IOException
}, "WEB-INF/web.xml", archiver.getDefaultFileMode() );
archiver.setDestFile( destinationFile );
archiver.createArchive();
代码示例来源:origin: mojohaus/nbm-maven-plugin
ZipArchiver archiver = new ZipArchiver();
DefaultFileSet fs = new DefaultFileSet();
fs.setDirectory( outputDirectory );
brandingToken + "/bin/*",
} );
archiver.addFileSet( fs );
File bins = new File( nbmBuildDirFile, "bin" );
for ( File bin : bins.listFiles() )
archiver.addFile( bin, brandingToken + "/bin/" + bin.getName(), 0755 );
archiver.setDestFile( zipFile );
archiver.setForced( false );
archiver.createArchive();
project.getArtifact().setFile( zipFile );
代码示例来源:origin: opoo/opoopress
zipArchiver.setDestFile(outputFile);
zipArchiver.setForced(forceCreation);
zipArchiver.addDirectory(basedir, getIncludes(), getExcludes());
zipArchiver.addDirectory(buildDirectory, new String[]{"plugins/**"}, null);
zipArchiver.createArchive();
代码示例来源:origin: org.codehaus.mojo/wagon-maven-plugin
private void createZip( String[] files, File zipFile, String basedir )
throws IOException
{
try
{
ZipArchiver archiver = (ZipArchiver) this.archiverManager.getArchiver( zipFile );
archiver.setDestFile( zipFile );
for ( String file : files )
{
archiver.addFile( new File( basedir, file ), file );
}
archiver.createArchive();
}
catch ( NoSuchArchiverException e )
{
// should never happen
}
}
}
代码示例来源:origin: org.mule.tools.maven/mule-packager
public MuleArchiver() {
this(new ZipArchiver());
}
代码示例来源:origin: simpligility/android-maven-plugin
private void addR( ZipArchiver zipArchiver ) throws MojoExecutionException, IOException
{
final File rFile = new File( targetDirectory, "R.txt" );
if ( !rFile.exists() )
{
getLog().debug( "No resources - creating empty R.txt" );
if ( !rFile.createNewFile() )
{
getLog().warn( "Unable to create R.txt in AAR" );
}
}
zipArchiver.addFile( rFile, "R.txt" );
getLog().debug( "Packaging R.txt in AAR" );
}
代码示例来源:origin: Evolveum/midpoint
private File generateArchive(File outDir, String archiveFilename) throws IOException, ArchiverException {
File zipFile = new File(buildDir, archiveFilename);
if (zipFile.exists()) {
zipFile.delete();
}
zipArchiver.addDirectory(outDir);
zipArchiver.setDestFile(zipFile);
zipArchiver.createArchive();
return zipFile;
}
代码示例来源:origin: mojohaus/nbm-maven-plugin
ZipArchiver archiver = new ZipArchiver();
if ( codebase != null )
archiver.addDirectory( webstartBuildDir );
archiver.addDirectory( webstartBuildDir, null, new String[] { "**/*.jnlp" } );
for ( final File jnlp : webstartBuildDir.listFiles() )
archiver.addResource( new PlexusIoResource() {
public @Override InputStream getContents() throws IOException
}, jnlp.getName(), archiver.getDefaultFileMode() );
archiver.addFile( servlet, "WEB-INF/lib/jnlp-servlet.jar" );
archiver.addResource( new PlexusIoResource() {
public @Override InputStream getContents() throws IOException
}, "WEB-INF/web.xml", archiver.getDefaultFileMode() );
archiver.setDestFile( destinationFile );
archiver.createArchive();
代码示例来源:origin: org.codehaus.mojo/nbm-maven-plugin
ZipArchiver archiver = new ZipArchiver();
DefaultFileSet fs = new DefaultFileSet();
fs.setDirectory( outputDirectory );
brandingToken + "/bin/*",
} );
archiver.addFileSet( fs );
File bins = new File( nbmBuildDirFile, "bin" );
for ( File bin : bins.listFiles() )
archiver.addFile( bin, brandingToken + "/bin/" + bin.getName(), 0755 );
archiver.setDestFile( zipFile );
archiver.setForced( false );
archiver.createArchive();
project.getArtifact().setFile( zipFile );
代码示例来源:origin: org.mule.tools.maven/mule-packager
public DomainBundleArchiver() {
this(new ZipArchiver());
}
代码示例来源:origin: simpligility/android-maven-plugin
/**
* Adds all shared libraries (.so) to a {@link JarArchiver} under 'jni'.
*
* @param zipArchiver The jarArchiver to add files to
* @param directory The directory to scan for .so files
* @param architecture The prefix for where in the jar the .so files will go.
*/
protected void addSharedLibraries( ZipArchiver zipArchiver, File directory, String architecture )
{
getLog().debug( "Searching for shared libraries in " + directory );
File[] libFiles = directory.listFiles( new FilenameFilter()
{
public boolean accept( final File dir, final String name )
{
return name.startsWith( "lib" ) && name.endsWith( ".so" );
}
} );
if ( libFiles != null )
{
for ( File libFile : libFiles )
{
String dest = NATIVE_LIBRARIES_FOLDER + "/" + architecture + "/" + libFile.getName();
getLog().debug( "Adding " + libFile + " as " + dest );
zipArchiver.addFile( libFile, dest );
}
}
}
代码示例来源:origin: org.codehaus.tycho/maven-osgi-packaging-plugin
private void packDir(File sourceDir, File targetZip) throws MojoExecutionException {
ZipArchiver archiver ;
try {
archiver = (ZipArchiver) plexus.lookup(ZipArchiver.ROLE, "zip");
} catch (ComponentLookupException e) {
throw new MojoExecutionException("Unable to resolve ZipArchiver", e);
}
archiver.setDestFile(targetZip);
try {
archiver.addDirectory(sourceDir);
archiver.createArchive();
} catch (Exception e) {
throw new MojoExecutionException("Error packing zip", e);
}
}
代码示例来源:origin: org.jetbrains.intellij.plugins/intellij-plugin-structure
@NotNull
public static AbstractArchiver createArchiver(@NotNull File file) {
final String name = file.getName().toLowerCase();
if (name.endsWith(".tar.gz")) {
return new TarArchiver();
} else if (name.endsWith(".zip")) {
return new ZipArchiver();
} else if (name.endsWith(".jar")) {
return new JarArchiver();
}
throw new IllegalArgumentException("Unable to extract " + file + "- unknown file extension: " + name);
}
代码示例来源:origin: org.apache.npanday.plugins/maven-aspx-plugin
archiver.setDestFile( destinationFile );
archiver.addDirectory( webappDir );
archiver.createArchive();
代码示例来源:origin: org.wisdom-framework/wisdom-maven-plugin
private void createApplicationDistribution() throws IOException {
File distFile = new File(this.buildDirectory, this.project.getArtifactId() + "-" + this.project
.getVersion() + "." + fileExtension.extensionName);
AbstractArchiver archiver;
if (fileExtension == ApplicationDistributionExtensions.zip) {
archiver = new ZipArchiver();
} else {
TarArchiver tarArchiver = new TarArchiver();
tarArchiver.setCompression(TarArchiver.TarCompressionMethod.gzip);
archiver = tarArchiver;
}
archiver.enableLogging(new PlexusLoggerWrapper(getLog()));
archiver.addDirectory(getWisdomRootDirectory(), new String[0], new String[]{
// Drop regular and test cache.
"*-cache/**",
"logs/**"});
archiver.setDestFile(distFile);
archiver.createArchive();
if (attachDistribution) {
projectHelper.attachArtifact(project, fileExtension.extensionName, distFile);
}
}
代码示例来源:origin: org.codehaus.tycho/maven-osgi-packaging-plugin
zipper.addDirectory( target );
zipper.setDestFile( destFile );
zipper.createArchive();
所以 codehaus 关闭了(显然是在周末):https://www.codehaus.org/ 现在它在这里说“Maven:所有存储库都镜像到 Central,我们的 Nexus 由 Sonaty
我们有一些引用“http://enunciate.codehaus.org/schemas/enunciate-1.27.xsd”的 XML 文件',现在已经消失了。 我正在使用的当前子: https
eclipse 中这个被上帝遗忘的错误不会消失。我已经尝试了这里和其他地方提到的所有东西来摆脱它,但它不会消失,现在我不能在 eclipse 中使用 Web 服务实用程序,因为它提示这个“问题”,这显
我创建了一个服务 公共(public)类 JsonSpiceService 扩展了 SpringAndroidSpiceService{ @Override public Re
我正在使用 Java 11、Spring Boot 2.1.1 和 Apache CXF 3.2.7 公开导入 XSD 架构的 SOAP Web 服务。在 WSDL 中它显示为: 当我发送查询失败
仅当将“-p”添加到 org.codehaus.mojo:exec-maven-plugin:1.6.0:exec 插件时,以下 pom.xml 执行才会失败,删除此参数后它运行正常,但我需要争论,有
本文整理了Java中org.codehaus.xfire.XFireException类的一些代码示例,展示了XFireException类的具体用法。这些代码示例主要来源于Github/Stacko
我正在尝试使用NetBeans构建JavaFX项目,但是当我运行它时,我有一个this: Plugin org.codehaus.mojo:exec-maven-plugin:1.2.1 or one
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 3年前关闭。 Improve thi
本文整理了Java中org.codehaus.stax2.validation.XMLValidationSchema类的一些代码示例,展示了XMLValidationSchema类的具体用法。这些代
本文整理了Java中org.codehaus.stax2.validation.XMLValidator类的一些代码示例,展示了XMLValidator类的具体用法。这些代码示例主要来源于Github
本文整理了Java中org.codehaus.stax2.validation.XMLValidationException类的一些代码示例,展示了XMLValidationException类的具体
本文整理了Java中org.codehaus.xfire.client.XFireProxyFactory类的一些代码示例,展示了XFireProxyFactory类的具体用法。这些代码示例主要来源于
本文整理了Java中org.codehaus.cargo.util.XmlReplacement类的一些代码示例,展示了XmlReplacement类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.codehaus.cargo.util.XmlUtils类的一些代码示例,展示了XmlUtils类的具体用法。这些代码示例主要来源于Github/Stackoverflow
截至今天,我突然在一个我有一段时间没有打开但以前工作的旧项目中遇到错误。 错误:程序类型已经存在:org.codehaus.jackson.JsonParser$1 它随机发生在各种 org.code
如何为对象读取器应用反序列化功能 (FAIL_ON_UNKNOWN_PROPERTIES)?我知道如何为 objectMapper 完成它,但是如何在 codehaus jackson 中的 obje
我从一本书下载的一个项目中有以下 pom.xml... 我收到以下错误, 无法在 http://snapshots.repository.codehaus.org 中找到 org.codehaus.m
本文整理了Java中org.codehaus.enunciate.contract.jaxws.WebMethod类的一些代码示例,展示了WebMethod类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中org.codehaus.xfire.XFireException.()方法的一些代码示例,展示了XFireException.()的具体用法。这些代码示例主要来源于Github/
我是一名优秀的程序员,十分优秀!