@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 ); }
protected void mergeDependency_Type( Dependency target, Dependency source, boolean sourceDominant, Map<Object, Object> context ) { String src = source.getType(); if ( src != null ) { if ( sourceDominant || target.getType() == null ) { target.setType( src ); target.setLocation( "type", source.getLocation( "type" ) ); } } }
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; }
private void mergeDependencyWithDefaults( Dependency dep, Dependency def ) { if ( dep.getScope() == null && def.getScope() != null ) { dep.setScope( def.getScope() ); dep.setSystemPath( def.getSystemPath() ); } if ( dep.getVersion() == null && def.getVersion() != null ) { dep.setVersion( def.getVersion() ); } if ( dep.getClassifier() == null && def.getClassifier() != null ) { dep.setClassifier( def.getClassifier() ); } if ( dep.getType() == null && def.getType() != null ) { dep.setType( def.getType() ); } List exclusions = dep.getExclusions(); if ( exclusions == null || exclusions.isEmpty() ) { dep.setExclusions( def.getExclusions() ); } }
dependency.setArtifactId(dependencyJar.getArtifactId()); dependency.setGroupId(dependencyJar.getGroupId()); dependency.setType(dependencyJar.getType()); dependency.setVersion(dependencyJar.getVersion()); if (dependencyJar.getClassifier() != null) {
dependency.setType( interpolatedTrimmed( parser.nextText(), "type" ) );
dependency.setType( interpolatedTrimmed( parser.nextText(), "type" ) );
/** * {@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; }
dependency.setType( getTrimmedValue( value ) );
dependency.setType(type);
dependency.setArtifactId(dependencyJar.getArtifactId()); dependency.setGroupId(dependencyJar.getGroupId()); dependency.setType(dependencyJar.getType()); dependency.setVersion(dependencyJar.getVersion()); if (dependencyJar.getClassifier() != null) {
/** * 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; }