Search in sources :

Example 11 with ModuleVersionArtifact

use of org.eclipse.ceylon.cmr.api.ModuleVersionArtifact in project ceylon by eclipse.

the class JarUtils method readModuleInfo.

@Override
public ModuleVersionDetails readModuleInfo(String moduleName, String version, File moduleArchive, boolean includeMembers, Overrides overrides) {
    ModuleInfo info = getDependencies(moduleArchive, moduleName, version, overrides);
    ModuleVersionDetails mvd = new ModuleVersionDetails(moduleName, version, info != null ? info.getGroupId() : null, info != null ? info.getArtifactId() : null);
    mvd.getArtifactTypes().add(new ModuleVersionArtifact(ArtifactContext.JAR, null, null));
    if (info != null) {
        mvd.getDependencies().addAll(info.getDependencies());
    }
    if (includeMembers) {
        mvd.setMembers(getMembers(moduleArchive));
    }
    return mvd;
}
Also used : ModuleInfo(org.eclipse.ceylon.cmr.api.ModuleInfo) ModuleVersionDetails(org.eclipse.ceylon.cmr.api.ModuleVersionDetails) ModuleVersionArtifact(org.eclipse.ceylon.cmr.api.ModuleVersionArtifact)

Aggregations

ModuleVersionArtifact (org.eclipse.ceylon.cmr.api.ModuleVersionArtifact)11 ModuleVersionDetails (org.eclipse.ceylon.cmr.api.ModuleVersionDetails)10 ModuleDependencyInfo (org.eclipse.ceylon.cmr.api.ModuleDependencyInfo)5 HashSet (java.util.HashSet)2 Map (java.util.Map)2 ModuleInfo (org.eclipse.ceylon.cmr.api.ModuleInfo)2 File (java.io.File)1 ArrayList (java.util.ArrayList)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 TreeSet (java.util.TreeSet)1 ArtifactContext (org.eclipse.ceylon.cmr.api.ArtifactContext)1 ArtifactOverrides (org.eclipse.ceylon.cmr.api.ArtifactOverrides)1 DependencyOverride (org.eclipse.ceylon.cmr.api.DependencyOverride)1 MavenArtifactContext (org.eclipse.ceylon.cmr.api.MavenArtifactContext)1 ModuleInfoReader (org.eclipse.ceylon.cmr.api.ModuleInfoReader)1 DependencyDescriptor (org.eclipse.ceylon.cmr.resolver.aether.DependencyDescriptor)1 Annotation (org.eclipse.ceylon.langtools.classfile.Annotation)1 ClassFile (org.eclipse.ceylon.langtools.classfile.ClassFile)1