public String getName() { if (this.module == null) { return "UNKNOWN"; } return this.module.getName(); }
public ModuleDescriptorImpl(String descriptorName, Node node) { super(descriptorName); this.model = node; addDefaultNamespaces(); }
public ModuleAnalyzer(InputStream in) throws IOException { NodeImporter importer = new XmlDomNodeImporterImpl(); Node node = importer.importAsNode(in, true); String rootName = node.getName(); if (rootName.equals("module")) { this.module = new ModuleDescriptorImpl(null, node); } in.close(); }
public List<ArtifactSpec> getDependencies() { if (this.module == null) { return Collections.emptyList(); } List<ArtifactType<ResourcesType<ModuleDescriptor>>> artifacts = this.module.getOrCreateResources().getAllArtifact(); List<ArtifactSpec> dependencies = new ArrayList<>(); for (ArtifactType<ResourcesType<ModuleDescriptor>> artifact : artifacts) { ArtifactSpec dep = ArtifactSpec.fromMscGav(artifact.getName()); dep.shouldGather = true; dependencies.add(dep); } return dependencies; } }
/** * Adds the default namespaces as defined in the specification * @return the current instance of <code>ModuleDescriptor</code> */ public ModuleDescriptor addDefaultNamespaces() { addNamespace("xmlns", "urn:jboss:module:1.3"); return this; }
public ModuleAnalyzer(InputStream in) throws IOException { NodeImporter importer = new XmlDomNodeImporterImpl(); Node node = importer.importAsNode(in, true); String rootName = node.getName(); if (rootName.equals("module")) { this.module = new ModuleDescriptorImpl(null, node); } in.close(); }
public List<ArtifactSpec> getDependencies() { if (this.module == null) { return Collections.emptyList(); } List<ArtifactType<ResourcesType<ModuleDescriptor>>> artifacts = this.module.getOrCreateResources().getAllArtifact(); List<ArtifactSpec> dependencies = new ArrayList<>(); String localRepo = System.getProperty("maven.repo.local", DEFAULT_LOCAL_REPO); for (ArtifactType<ResourcesType<ModuleDescriptor>> artifact : artifacts) { ArtifactSpec dep = ArtifactSpec.fromMscGav(artifact.getName()); File file = Paths.get(localRepo, dep.jarRepoPath()).toFile(); if (!file.exists()) { dep.shouldGather = true; } else { dep.file = file; dep.shouldGather = false; } dependencies.add(dep); } return dependencies; }
public String getName() { if (this.module == null) { return "UNKNOWN"; } return this.module.getName(); }
public ModuleAnalyzer(InputStream in) throws IOException { NodeImporter importer = new XmlDomNodeImporterImpl(); Node node = importer.importAsNode(in, true); String rootName = node.getName(); if (rootName.equals("module")) { this.module = new ModuleDescriptorImpl(null, node); } in.close(); }
public List<ArtifactSpec> getDependencies() { if (this.module == null) { return Collections.emptyList(); } List<ArtifactType<ResourcesType<ModuleDescriptor>>> artifacts = this.module.getOrCreateResources().getAllArtifact(); List<ArtifactSpec> dependencies = new ArrayList<>(); String localRepo = System.getProperty("maven.repo.local", DEFAULT_LOCAL_REPO); for (ArtifactType<ResourcesType<ModuleDescriptor>> artifact : artifacts) { ArtifactSpec dep = ArtifactSpec.fromMscGav(artifact.getName()); File file = Paths.get(localRepo, dep.jarRepoPath()).toFile(); if (!file.exists()) { dep.shouldGather = true; } else { dep.file = file; dep.shouldGather = false; } dependencies.add(dep); } return dependencies; }
public String getName() { if (this.module == null) { return "UNKNOWN"; } return this.module.getName(); }