Search in sources :

Example 6 with Dependency

use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.

the class DependenciesPresenterTest method testAddDependency.

@Test
public void testAddDependency() {
    final Dependency dependency = mock(Dependency.class);
    dependenciesPresenter.add(dependency);
    verify(enhancedDependenciesManager).addNew(eq(dependency));
}
Also used : Dependency(org.guvnor.common.services.project.model.Dependency) EnhancedDependency(org.kie.workbench.common.services.shared.dependencies.EnhancedDependency) Test(org.junit.Test)

Example 7 with Dependency

use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.

the class DependencyLoader method returnDefault.

private void returnDefault() {
    final EnhancedDependencies enhancedDependencies = new EnhancedDependencies();
    for (final Dependency dependency : updateQueue) {
        enhancedDependencies.add(new NormalEnhancedDependency(dependency, new HashSet<>()));
    }
    updateQueue.clear();
    manager.onEnhancedDependenciesUpdated(enhancedDependencies);
}
Also used : EnhancedDependencies(org.kie.workbench.common.services.shared.dependencies.EnhancedDependencies) NormalEnhancedDependency(org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency) Dependency(org.guvnor.common.services.project.model.Dependency) NormalEnhancedDependency(org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency) HashSet(java.util.HashSet)

Example 8 with Dependency

use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.

the class DependencyTestUtils method makeDependency.

public static Dependency makeDependency(final String groupID, final String artifactID, final String version, final String scope) {
    final Dependency dependency = new Dependency(new GAV(groupID, artifactID, version));
    dependency.setScope(scope);
    return dependency;
}
Also used : Dependency(org.guvnor.common.services.project.model.Dependency) EnhancedDependency(org.kie.workbench.common.services.shared.dependencies.EnhancedDependency) GAV(org.guvnor.common.services.project.model.GAV)

Example 9 with Dependency

use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.

the class DependencyLoaderLoadFailureTest method makeDependency.

private Dependency makeDependency(final String groupId, final String artifactId, final String version) {
    final Dependency dependency = new Dependency();
    dependency.setGroupId(groupId);
    dependency.setArtifactId(artifactId);
    dependency.setVersion(version);
    return dependency;
}
Also used : Dependency(org.guvnor.common.services.project.model.Dependency)

Example 10 with Dependency

use of org.guvnor.common.services.project.model.Dependency in project kie-wb-common by kiegroup.

the class EnhancedDependenciesManagerResetTest method makeDependency.

private Dependency makeDependency() {
    final Dependency dependency = new Dependency();
    dependency.setScope("compile");
    return dependency;
}
Also used : NormalEnhancedDependency(org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency) Dependency(org.guvnor.common.services.project.model.Dependency)

Aggregations

Dependency (org.guvnor.common.services.project.model.Dependency)32 GAV (org.guvnor.common.services.project.model.GAV)17 Test (org.junit.Test)16 HashSet (java.util.HashSet)10 NormalEnhancedDependency (org.kie.workbench.common.services.shared.dependencies.NormalEnhancedDependency)8 EnhancedDependency (org.kie.workbench.common.services.shared.dependencies.EnhancedDependency)6 EnhancedDependencies (org.kie.workbench.common.services.shared.dependencies.EnhancedDependencies)4 POM (org.guvnor.common.services.project.model.POM)3 Set (java.util.Set)2 ByteArrayInputStream (java.io.ByteArrayInputStream)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 ArrayList (java.util.ArrayList)1 Artifact (org.apache.maven.artifact.Artifact)1 MavenProject (org.apache.maven.project.MavenProject)1 Dependencies (org.guvnor.common.services.project.model.Dependencies)1 Before (org.junit.Before)1 Util.makeDependency (org.kie.workbench.common.screens.projecteditor.client.forms.dependencies.Util.makeDependency)1 DependencyValidator (org.kie.workbench.common.screens.projecteditor.client.forms.dependencies.validation.DependencyValidator)1 TransitiveEnhancedDependency (org.kie.workbench.common.services.shared.dependencies.TransitiveEnhancedDependency)1