Package org.sonatype.nexus.artifact

Examples of org.sonatype.nexus.artifact.Gav


                        if ( request.getInfos() != null )
                        {
                            String repoFile = f.getAbsolutePath().substring(
                                request.getIndexingContext().getRepository().getAbsolutePath().length() + 1 );

                            Gav gav = gavCalculator.pathToGav( repoFile.replace( '\\', '/' ) );

                            if ( gav != null )
                            {
                                String uinfo = AbstractIndexCreator.getGAV( gav.getGroupId(), //
                                    gav.getArtifactId(),
                                    gav.getBaseVersion(),
                                    gav.getClassifier() );

                                if ( request.getInfos().contains( uinfo ) )
                                {
                                    continue; // skip already indexed file
                                }
View Full Code Here


     * Get ArtifactContext for given pom or artifact (jar, war, etc). A file can be
     */
    public ArtifactContext getArtifactContext( IndexingContext context, File file )
    {
        // TODO shouldn't this use repository layout instead?
        Gav gav = gavCalculator.pathToGav( file.getAbsolutePath().substring(
            context.getRepository().getAbsolutePath().length() + 1 ).replace( '\\', '/' ) );

        if ( gav == null )
        {
            // XXX what then? Without GAV we are screwed (look below).
            // It should simply stop, since it is not an artifact.
            return null;
        }

        String groupId = gav.getGroupId();

        String artifactId = gav.getArtifactId();

        String version = gav.getBaseVersion();

        String classifier = gav.getClassifier();

        File pom;

        File artifact;

View Full Code Here

                    close( jf );
                    IOUtil.close( is );
                }
            }

            Gav gav = gavCalculator.pathToGav( //
                ai.groupId.replace( '.', '/' ) + '/' //
                    + ai.artifactId + '/' //
                    + ai.version + '/' //
                    + ( artifact == null ? ai.artifactId + '-' + ai.version + ".jar" : artifact.getName() ) );
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.artifact.Gav

Copyright © 2018 www.massapicom. 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.