Package org.apache.maven.model

Examples of org.apache.maven.model.Plugin.addDependency()


        Plugin plugin = new Plugin();
        plugin.setGroupId( pluginProject.getGroupId() );
        plugin.setArtifactId( pluginProject.getArtifactId() );
        plugin.setVersion( pluginProject.getVersion() );

        plugin.addDependency( createDependency( pluginLevelDepProject ) );

        Model model = declaringProject.getModel();
        Build build = model.getBuild();

        if ( build == null )
View Full Code Here


        Plugin plugin = new Plugin();
        plugin.setGroupId( pluginProject.getGroupId() );
        plugin.setArtifactId( pluginProject.getArtifactId() );
        plugin.setVersion( pluginProject.getVersion() );

        plugin.addDependency( createDependency( pluginLevelDepProject ) );

        Model model = parentProject.getModel();
        Build build = model.getBuild();

        if ( build == null )
View Full Code Here

    public void testShouldUseProfilePluginDependencyVersionOverMainPluginDepVersion()
    {
        PluginContainer profile = new PluginContainer();
        Plugin profilePlugin = createPlugin( "group", "artifact", "1", Collections.EMPTY_MAP );
        Dependency profileDep = createDependency( "g", "a", "2" );
        profilePlugin.addDependency( profileDep );
        profile.addPlugin( profilePlugin );

        PluginContainer model = new PluginContainer();
        Plugin plugin = createPlugin( "group", "artifact", "1", Collections.EMPTY_MAP );
        Dependency dep = createDependency( "g", "a", "1" );
View Full Code Here

        profile.addPlugin( profilePlugin );

        PluginContainer model = new PluginContainer();
        Plugin plugin = createPlugin( "group", "artifact", "1", Collections.EMPTY_MAP );
        Dependency dep = createDependency( "g", "a", "1" );
        plugin.addDependency( dep );
        model.addPlugin( plugin );

        new DefaultProfileInjector().injectPlugins( profile, model );

        assertEquals( profileDep.getVersion(), ((Dependency) plugin.getDependencies().get( 0 ) ).getVersion() );
View Full Code Here

        {
            Dependency dep = new Dependency();
            dep.setGroupId( Constants.getGroupId() );
            dep.setArtifactId( Constants.getArtifactId( flavour ) );
            dep.setVersion( "${" + TESLA_VERSION + "}" );
            plugin.addDependency( dep );
        }
    }

    private BuildBase getBuild( final Model model, String profileId )
    {
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.