Examples of ZipHandle


Examples of org.apache.maven.index.util.zip.ZipHandle

    }

    private boolean updateArtifactInfo( ArtifactInfo ai, File f )
        throws IOException
    {
        ZipHandle handle = null;

        boolean updated = false;

        try
        {
            handle = ZipFacade.getZipHandle( f );

            final List<String> entries = handle.getEntries();

            for ( String name : entries )
            {
                if ( name.equals( "META-INF/MANIFEST.MF" ) )
                {
                    Manifest manifest = new Manifest( handle.getEntryContent( name ) );

                    Attributes mainAttributes = manifest.getMainAttributes();

                    if ( mainAttributes != null )
                    {
View Full Code Here

Examples of org.apache.maven.index.util.zip.ZipHandle

            }
        }
        // Otherwise, check for pom contained in maven generated artifact
        else if ( getArtifact() != null )
        {
            ZipHandle handle = null;

            try
            {
                handle = ZipFacade.getZipHandle( getArtifact() );

                final String embeddedPomPath =
                    "META-INF/maven/" + getGav().getGroupId() + "/" + getGav().getArtifactId() + "/pom.xml";

                if ( handle.hasEntry( embeddedPomPath ) )
                {
                    return new ModelReader().readModel( handle.getEntryContent( embeddedPomPath ) );
                }
            }
            catch ( IOException e )
            {
            }
View Full Code Here

Examples of org.apache.maven.index.util.zip.ZipHandle

    }

    private void updateArtifactInfo( final ArtifactInfo ai, final File f, final String strippedPrefix )
        throws IOException
    {
        ZipHandle handle = null;

        try
        {
            handle = ZipFacade.getZipHandle( f );

            final List<String> entries = handle.getEntries();

            final StringBuilder sb = new StringBuilder();

            for ( String name : entries )
            {
View Full Code Here

Examples of org.apache.maven.index.util.zip.ZipHandle

        }
    }

    private void checkMavenPlugin( ArtifactInfo ai, File artifact )
    {
        ZipHandle handle = null;

        try
        {
            handle = ZipFacade.getZipHandle( artifact );

            final String pluginDescriptorPath = "META-INF/maven/plugin.xml";

            if ( handle.hasEntry( pluginDescriptorPath ) )
            {
                InputStream is = new BufferedInputStream( handle.getEntryContent( pluginDescriptorPath ) );

                try
                {
                    // here the reader is closed
                    PlexusConfiguration plexusConfig =
View Full Code Here

Examples of org.apache.maven.index.util.zip.ZipHandle

     * @param ai
     * @param artifact
     */
    private void checkMavenArchetype( ArtifactInfo ai, File artifact )
    {
        ZipHandle handle = null;

        try
        {
            handle = ZipFacade.getZipHandle( artifact );

            for ( String path : ARCHETYPE_XML_LOCATIONS )
            {
                if ( handle.hasEntry( path ) )
                {
                    ai.packaging = MAVEN_ARCHETYPE_PACKAGING;

                    return;
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.