
org.jboss.maven.plugins.thirdparty.util.JarUtil Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of maven-buildmagic-thirdparty-plugin
Show all versions of maven-buildmagic-thirdparty-plugin
Plugin for deploying artifacts to JBoss ant/buildmagic repository, and building a thirdparty directory
from dependencies in a maven repository.
The newest version!
package org.jboss.maven.plugins.thirdparty.util;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.jar.Attributes;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.JarOutputStream;
import java.util.jar.Manifest;
import java.util.zip.Deflater;
import org.codehaus.plexus.util.DirectoryScanner;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.IOUtil;
public class JarUtil
{
public static List getJarEntries(File basedir) throws IOException
{
String [] includes = {"**"};
String [] excludes = null;
return getJarEntries(basedir, includes, excludes);
}
public static List getJarEntries(File basedir, String [] includes, String [] excludes) throws IOException
{
List fileEntries = new ArrayList ();
DirectoryScanner scanner = new DirectoryScanner();
scanner.setBasedir( basedir );
scanner.setIncludes( includes );
scanner.setExcludes( excludes );
scanner.addDefaultExcludes();
scanner.scan();
String [] filenames = scanner.getIncludedFiles();
for (int i=0; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy