本文整理汇总了Java中org.apache.maven.artifact.handler.ArtifactHandler.isAddedToClasspath方法的典型用法代码示例。如果您正苦于以下问题:Java ArtifactHandler.isAddedToClasspath方法的具体用法?Java ArtifactHandler.isAddedToClasspath怎么用?Java ArtifactHandler.isAddedToClasspath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.maven.artifact.handler.ArtifactHandler
的用法示例。
在下文中一共展示了ArtifactHandler.isAddedToClasspath方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: excludesDependencies
import org.apache.maven.artifact.handler.ArtifactHandler; //导入方法依赖的package包/类
/**
* Creates a new ArtifactHandler for the specified Artifact that overrides the includeDependencies flag. When set, this flag prevents transitive
* dependencies from being printed in dependencies plugin.
*
* @param artifact The artifact
* @return The handler for the artifact
*/
private ArtifactHandler excludesDependencies(final Artifact artifact) {
final ArtifactHandler orig = artifact.getArtifactHandler();
return new ArtifactHandler() {
@Override
public String getExtension() {
return orig.getExtension();
}
@Override
public String getDirectory() {
return orig.getDirectory();
}
@Override
public String getClassifier() {
return orig.getClassifier();
}
@Override
public String getPackaging() {
return orig.getPackaging();
}
// mark dependencies has excluded so they will appear in tree listing
@Override
public boolean isIncludesDependencies() {
return false;
}
@Override
public String getLanguage() {
return orig.getLanguage();
}
@Override
public boolean isAddedToClasspath() {
return orig.isAddedToClasspath();
}
};
}
示例2: newArtifactType
import org.apache.maven.artifact.handler.ArtifactHandler; //导入方法依赖的package包/类
public static ArtifactType newArtifactType(String id, ArtifactHandler handler) {
return new DefaultArtifactType(id, handler.getExtension(), handler.getClassifier(), handler.getLanguage(), handler.isAddedToClasspath(), handler.isIncludesDependencies());
}
示例3: newArtifactType
import org.apache.maven.artifact.handler.ArtifactHandler; //导入方法依赖的package包/类
public static ArtifactType newArtifactType( String id, ArtifactHandler handler )
{
return new DefaultArtifactType( id, handler.getExtension(), handler.getClassifier(), handler.getLanguage(),
handler.isAddedToClasspath(), handler.isIncludesDependencies() );
}