@Deprecated public List<Dependency> getTestDependencies() { Set<Artifact> artifacts = getArtifacts(); if ( ( artifacts == null ) || artifacts.isEmpty() ) { return Collections.emptyList(); } List<Dependency> list = new ArrayList<>( artifacts.size() ); for ( Artifact a : getArtifacts() ) { Dependency dependency = new Dependency(); dependency.setArtifactId( a.getArtifactId() ); dependency.setGroupId( a.getGroupId() ); dependency.setVersion( a.getVersion() ); dependency.setScope( a.getScope() ); dependency.setType( a.getType() ); dependency.setClassifier( a.getClassifier() ); list.add( dependency ); } return Collections.unmodifiableList( list ); }
public List getSystemDependencies() { Set artifacts = getArtifacts(); if ( artifacts == null || artifacts.isEmpty() ) { return Collections.EMPTY_LIST; } List list = new ArrayList( artifacts.size() ); for ( Iterator i = getArtifacts().iterator(); i.hasNext(); ) { Artifact a = (Artifact) i.next(); // TODO: let the scope handler deal with this if ( Artifact.SCOPE_SYSTEM.equals( a.getScope() ) ) { Dependency dependency = new Dependency(); dependency.setArtifactId( a.getArtifactId() ); dependency.setGroupId( a.getGroupId() ); dependency.setVersion( a.getVersion() ); dependency.setScope( a.getScope() ); dependency.setType( a.getType() ); dependency.setClassifier( a.getClassifier() ); list.add( dependency ); } } return list; }
public List getRuntimeDependencies() { Set artifacts = getArtifacts(); if ( artifacts == null || artifacts.isEmpty() ) { return Collections.EMPTY_LIST; } List list = new ArrayList( artifacts.size() ); for ( Iterator i = artifacts.iterator(); i.hasNext(); ) { Artifact a = (Artifact) i.next(); // TODO: let the scope handler deal with this if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_RUNTIME.equals( a.getScope() ) ) { Dependency dependency = new Dependency(); dependency.setArtifactId( a.getArtifactId() ); dependency.setGroupId( a.getGroupId() ); dependency.setVersion( a.getVersion() ); dependency.setScope( a.getScope() ); dependency.setType( a.getType() ); dependency.setClassifier( a.getClassifier() ); list.add( dependency ); } } return list; }
@Deprecated public List<Dependency> getSystemDependencies() { Set<Artifact> artifacts = getArtifacts(); if ( ( artifacts == null ) || artifacts.isEmpty() ) { return Collections.emptyList(); } List<Dependency> list = new ArrayList<>( artifacts.size() ); for ( Artifact a : getArtifacts() ) { // TODO let the scope handler deal with this if ( Artifact.SCOPE_SYSTEM.equals( a.getScope() ) ) { Dependency dependency = new Dependency(); dependency.setArtifactId( a.getArtifactId() ); dependency.setGroupId( a.getGroupId() ); dependency.setVersion( a.getVersion() ); dependency.setScope( a.getScope() ); dependency.setType( a.getType() ); dependency.setClassifier( a.getClassifier() ); list.add( dependency ); } } return Collections.unmodifiableList( list ); }
public List getCompileDependencies() { Set artifacts = getArtifacts(); if ( artifacts == null || artifacts.isEmpty() ) { return Collections.EMPTY_LIST; } List list = new ArrayList( artifacts.size() ); for ( Iterator i = getArtifacts().iterator(); i.hasNext(); ) { Artifact a = (Artifact) i.next(); // TODO: let the scope handler deal with this if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_PROVIDED.equals( a.getScope() ) || Artifact.SCOPE_SYSTEM.equals( a.getScope() ) ) { Dependency dependency = new Dependency(); dependency.setArtifactId( a.getArtifactId() ); dependency.setGroupId( a.getGroupId() ); dependency.setVersion( a.getVersion() ); dependency.setScope( a.getScope() ); dependency.setType( a.getType() ); dependency.setClassifier( a.getClassifier() ); list.add( dependency ); } } return list; }
public List getTestDependencies() { Set artifacts = getArtifacts(); if ( artifacts == null || artifacts.isEmpty() ) { return Collections.EMPTY_LIST; } List list = new ArrayList( artifacts.size() ); for ( Iterator i = getArtifacts().iterator(); i.hasNext(); ) { Artifact a = (Artifact) i.next(); // TODO: let the scope handler deal with this // NOTE: [jc] scope == 'test' is the widest possible scope, so we don't really need to perform // this check... // if ( Artifact.SCOPE_TEST.equals( a.getScope() ) || Artifact.SCOPE_COMPILE.equals( a.getScope() ) || // Artifact.SCOPE_RUNTIME.equals( a.getScope() ) ) // { // } Dependency dependency = new Dependency(); dependency.setArtifactId( a.getArtifactId() ); dependency.setGroupId( a.getGroupId() ); dependency.setVersion( a.getVersion() ); dependency.setScope( a.getScope() ); dependency.setType( a.getType() ); dependency.setClassifier( a.getClassifier() ); list.add( dependency ); } return list; }
@Deprecated public List<Dependency> getCompileDependencies() { Set<Artifact> artifacts = getArtifacts(); if ( ( artifacts == null ) || artifacts.isEmpty() ) { return Collections.emptyList(); } List<Dependency> list = new ArrayList<>( artifacts.size() ); for ( Artifact a : getArtifacts() ) { // TODO let the scope handler deal with this if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_PROVIDED.equals( a.getScope() ) || Artifact.SCOPE_SYSTEM.equals( a.getScope() ) ) { Dependency dependency = new Dependency(); dependency.setArtifactId( a.getArtifactId() ); dependency.setGroupId( a.getGroupId() ); dependency.setVersion( a.getVersion() ); dependency.setScope( a.getScope() ); dependency.setType( a.getType() ); dependency.setClassifier( a.getClassifier() ); list.add( dependency ); } } return Collections.unmodifiableList( list ); }
@Deprecated // used by the Maven ITs public List<Dependency> getRuntimeDependencies() { Set<Artifact> artifacts = getArtifacts(); if ( ( artifacts == null ) || artifacts.isEmpty() ) { return Collections.emptyList(); } List<Dependency> list = new ArrayList<>( artifacts.size() ); for ( Artifact a : getArtifacts() ) { // TODO let the scope handler deal with this if ( Artifact.SCOPE_COMPILE.equals( a.getScope() ) || Artifact.SCOPE_RUNTIME.equals( a.getScope() ) ) { Dependency dependency = new Dependency(); dependency.setArtifactId( a.getArtifactId() ); dependency.setGroupId( a.getGroupId() ); dependency.setVersion( a.getVersion() ); dependency.setScope( a.getScope() ); dependency.setType( a.getType() ); dependency.setClassifier( a.getClassifier() ); list.add( dependency ); } } return Collections.unmodifiableList( list ); }
private Dependency createSystemScopeDependency( Artifact artifact, File location, String suffix ) { String artifactId = artifact.getArtifactId(); if ( suffix != null ) { artifactId += "_" + suffix; } final Dependency dependency = new Dependency(); dependency.setGroupId( artifact.getGroupId() ); dependency.setArtifactId( artifactId ); dependency.setVersion( artifact.getBaseVersion() ); dependency.setScope( Artifact.SCOPE_SYSTEM ); dependency.setSystemPath( location.getAbsolutePath() ); return dependency; }
public static Dependency cloneDependency( Dependency src ) { Dependency result = null; if ( src != null ) { result = new Dependency(); result.setArtifactId( src.getArtifactId() ); result.setClassifier( src.getClassifier() ); result.setExclusions( cloneList( src.getExclusions(), DEPENDENCY_EXCLUSION_CLONER ) ); result.setGroupId( src.getGroupId() ); result.setOptional( src.isOptional() ); result.setScope( src.getScope() ); result.setSystemPath( src.getSystemPath() ); result.setType( src.getType() ); result.setVersion( src.getVersion() ); } return result; }
dependenciesTask.setProject(project); for (DependencyJar dependencyJar : dependencies) { Dependency dependency = new Dependency(); dependency.setArtifactId(dependencyJar.getArtifactId()); dependency.setGroupId(dependencyJar.getGroupId());
Dependency dependency = new Dependency(); for ( int i = parser.getAttributeCount() - 1; i >= 0; i-- )
@Override public Object construct(Node node) { ScalarNode scalar = (ScalarNode) node; return createDependency(scalar.getValue(), new Dependency()); }
public Object newInstance(FactoryBuilderSupport builder, Object name, Object value, Map attrs) throws InstantiationException, IllegalAccessException { Dependency node; if (value != null) { node = parse(value); if (node == null) { throw new NodeValueParseException(this, value); } } else { node = new Dependency(); } return node; }
public default Dependency dependency(String definition, String scope) { Dependency dependency = new Dependency(); String[] parts = definition.split(":"); dependency.setGroupId(parts[0]); dependency.setArtifactId(parts[1]); if (parts.length > 2) { dependency.setVersion(parts[3]); } if (scope != null) { dependency.setScope(scope); } return dependency; }
Dependency dependency = new Dependency(); InputLocation _location; _location = new InputLocation( parser.getLineNumber(), parser.getColumnNumber(), source );
/** * {@inheritDoc} */ @Override public ConnectivityTestingServiceBuilder addDependency(String groupId, String artifactId, String artifactVersion, String classifier, String type) { Dependency dependency = new Dependency(); dependency.setGroupId(groupId); dependency.setArtifactId(artifactId); dependency.setVersion(artifactVersion); dependency.setType(type); dependency.setClassifier(classifier); if (!MULE_PLUGIN_CLASSIFIER.equals(classifier)) { addSharedLibraryDependency(model, dependency); } model.getDependencies().add(dependency); return this; }
public static Dependency parse(final Object value) { assert value != null; if (value instanceof String) { Dependency node = new Dependency(); String[] items = ((String) value).split(":"); switch (items.length) { case 4: node.setGroupId(items[0]); node.setArtifactId(items[1]); node.setVersion(items[2]); node.setScope(items[3]); return node; case 3: node.setGroupId(items[0]); node.setArtifactId(items[1]); node.setVersion(items[2]); return node; case 2: node.setGroupId(items[0]); node.setArtifactId(items[1]); return node; } } return null; } }
public Dependency getDependency() { Dependency dependency = new Dependency();
/** * Creates a {@link Dependency} object from this artifact with scope compile. * * @return a maven */ public Dependency getAsMavenDependency() { Dependency dependency = new Dependency(); dependency.setVersion(getVersion()); dependency.setGroupId(getGroupId()); dependency.setArtifactId(getArtifactId()); dependency.setClassifier(getClassifier()); dependency.setType(getType()); dependency.setScope(COMPILE_SCOPE); return dependency; }