Package org.codehaus.plexus.component.repository

Examples of org.codehaus.plexus.component.repository.ComponentDependency


        assertEquals( "org.codehaus.plexus.archiver.Archiver", cr.getRole() );
        assertEquals( "jar", cr.getRoleHint() );
        assertEquals( "jarArchiver", cr.getFieldName() );

        ComponentDependency cd = pd.getDependencies().get( 0 );

        assertEquals( "org.apache.maven", cd.getGroupId() );
        assertEquals( "maven-plugin-api", cd.getArtifactId() );
        assertEquals( "2.0.6", cd.getVersion() );
        assertEquals( "jar", cd.getType() );

        md = pd.getMojos().get( 1 );

        assertEquals( "war", md.getGoal() );
        assertEquals( null, md.getDependencyResolutionRequired() );
View Full Code Here


        pluginDescriptor.addMojo( mojoDescriptor );

        pluginDescriptor.setArtifactId( "maven-unitTesting-plugin" );
        pluginDescriptor.setGoalPrefix( "test" );

        ComponentDependency dependency = new ComponentDependency();
        dependency.setGroupId( "testGroup" );
        dependency.setArtifactId( "testArtifact" );
        dependency.setVersion( "0.0.0" );

        pluginDescriptor.setDependencies( Collections.singletonList( dependency ) );

        File destinationDirectory = new File( System.getProperty( "java.io.tmpdir" ), "testGenerator-outDir" );
        FileUtils.deleteDirectory( destinationDirectory );
View Full Code Here

        for ( int i = 0; i < dependencies.length; i++ )
        {
            PlexusConfiguration d = dependencies[i];

            ComponentDependency cd = new ComponentDependency();

            cd.setArtifactId( d.getChild( "artifact-id" ).getValue() );

            cd.setGroupId( d.getChild( "group-id" ).getValue() );

            String type = d.getChild( "type" ).getValue();
            if(type != null)
            {
                cd.setType( type );
            }

            cd.setVersion( d.getChild( "version" ).getValue() );

            csd.addDependency( cd );
        }

        return csd;
View Full Code Here

        for ( int i = 0; i < dependencies.length; i++ )
        {
            PlexusConfiguration d = dependencies[i];

            ComponentDependency cd = new ComponentDependency();

            cd.setArtifactId( d.getChild( "artifact-id" ).getValue() );

            cd.setGroupId( d.getChild( "group-id" ).getValue() );

            String type = d.getChild( "type" ).getValue();
            if(type != null)
            {
                cd.setType( type );
            }

            cd.setVersion( d.getChild( "version" ).getValue() );

            csd.addDependency( cd );
        }

        return csd;
View Full Code Here

        for ( int i = 0; i < dependencies.length; i++ )
        {
            PlexusConfiguration d = dependencies[i];

            ComponentDependency cd = new ComponentDependency();

            cd.setArtifactId( d.getChild( "artifact-id" ).getValue() );

            cd.setGroupId( d.getChild( "group-id" ).getValue() );

            String type = d.getChild( "type" ).getValue();
            if(type != null)
            {
                cd.setType( type );
            }

            cd.setVersion( d.getChild( "version" ).getValue() );

            csd.addDependency( cd );
        }

        return csd;
View Full Code Here

        for ( int i = 0; i < dependencyConfigurations.length; i++ )
        {
            PlexusConfiguration d = dependencyConfigurations[i];

            ComponentDependency cd = new ComponentDependency();

            cd.setArtifactId( d.getChild( "artifactId" ).getValue() );

            cd.setGroupId( d.getChild( "groupId" ).getValue() );

            cd.setType( d.getChild( "type" ).getValue() );

            cd.setVersion( d.getChild( "version" ).getValue() );

            dependencies.add( cd );
        }

        pluginDescriptor.setDependencies( dependencies );
View Full Code Here

        List<ComponentDependency> dependencies = new ArrayList<ComponentDependency>();

        for ( PlexusConfiguration d : dependencyConfigurations )
        {
            ComponentDependency cd = new ComponentDependency();

            cd.setArtifactId( d.getChild( "artifactId" ).getValue() );

            cd.setGroupId( d.getChild( "groupId" ).getValue() );

            cd.setType( d.getChild( "type" ).getValue() );

            cd.setVersion( d.getChild( "version" ).getValue() );

            dependencies.add( cd );
        }

        pluginDescriptor.setDependencies( dependencies );
View Full Code Here

        Artifact artifact = (Artifact) dep;
        log.info("Dep-artifact " + artifact + " scope " + artifact.getScope());
      }
      for (Object dep : mojoExecution.getMojoDescriptor().getPluginDescriptor().getDependencies()) {
        log.info("Dependency " + dep + " class " + dep.getClass());
        ComponentDependency dependency = (ComponentDependency) dep;
        log.info("type " + dependency.getType());
      }
      log.info("components");
      for (Object dep : mojoExecution.getMojoDescriptor().getPluginDescriptor().getArtifacts()) {
        Artifact artifact = (Artifact) dep;
        log.info("Articatf " + artifact + " scope " + artifact.getScope());
View Full Code Here

        assertEquals( "org.codehaus.plexus.archiver.Archiver", cr.getRole() );
        assertEquals( "jar", cr.getRoleHint() );
        assertEquals( "jarArchiver", cr.getFieldName() );

        ComponentDependency cd = pd.getDependencies().get( 0 );

        assertEquals( "org.apache.maven", cd.getGroupId() );
        assertEquals( "maven-plugin-api", cd.getArtifactId() );
        assertEquals( "2.0.6", cd.getVersion() );
        assertEquals( "jar", cd.getType() );

        md = pd.getMojos().get( 1 );

        assertEquals( "war", md.getGoal() );
        assertEquals( null, md.getDependencyResolutionRequired() );
View Full Code Here

        List<ComponentDependency> dependencies = new ArrayList<ComponentDependency>();

        for ( PlexusConfiguration d : dependencyConfigurations )
        {
            ComponentDependency cd = new ComponentDependency();

            cd.setArtifactId( d.getChild( "artifactId" ).getValue() );

            cd.setGroupId( d.getChild( "groupId" ).getValue() );

            cd.setType( d.getChild( "type" ).getValue() );

            cd.setVersion( d.getChild( "version" ).getValue() );

            dependencies.add( cd );
        }

        pluginDescriptor.setDependencies( dependencies );
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.component.repository.ComponentDependency

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.