All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.redhat.ceylon.cmr.resolver.aether.DependencyDependencyDescriptor Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package com.redhat.ceylon.cmr.resolver.aether;

import java.io.File;
import java.util.List;

import org.apache.maven.model.Dependency;
import org.apache.maven.model.Exclusion;
import org.eclipse.aether.util.artifact.JavaScopes;

public class DependencyDependencyDescriptor implements DependencyDescriptor {

	private Dependency model;
    private List exclusions;

	DependencyDependencyDescriptor(Dependency model) {
		this.model = model;
		for(Exclusion x : model.getExclusions()){
		    exclusions.add(new ExclusionExclusionDescriptor(x));
		}
	}

	@Override
	public File getFile() {
		return null;
	}

	@Override
	public List getDependencies() {
		return null;
	}

	@Override
	public String getGroupId() {
		return model.getGroupId();
	}

	@Override
	public String getArtifactId() {
		return model.getArtifactId();
	}

	@Override
	public String getVersion() {
		return model.getVersion();
	}

	@Override
	public boolean isOptional() {
		return model.isOptional();
	}

    @Override
    public boolean isProvidedScope() {
        return JavaScopes.PROVIDED.equals(model.getScope());
    }

    @Override
    public boolean isRuntimeScope() {
        return JavaScopes.RUNTIME.equals(model.getScope());
    }
    
    @Override
    public boolean isCompileScope() {
        return JavaScopes.COMPILE.equals(model.getScope());
    }
    
    @Override
    public boolean isTestScope() {
        return JavaScopes.TEST.equals(model.getScope());
    }

    @Override
    public List getExclusions() {
        return exclusions;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy