Search in sources :

Example 1 with JarArtifactType

use of com.intellij.packaging.impl.artifacts.JarArtifactType in project azure-tools-for-java by Microsoft.

the class HDInsightModuleBuilder method createDefaultArtifact.

private void createDefaultArtifact(final Module module) {
    final Project project = module.getProject();
    final JarArtifactType type = new JarArtifactType();
    final PackagingElementFactory factory = PackagingElementFactory.getInstance();
    CompositePackagingElement root = factory.createArchive("default_artifact.jar");
    root.addOrFindChild(factory.createModuleOutput(module));
    ArtifactManager.getInstance(project).addArtifact(module.getName() + "_DefaultArtifact", type, root);
}
Also used : Project(com.intellij.openapi.project.Project) CompositePackagingElement(com.intellij.packaging.elements.CompositePackagingElement) PackagingElementFactory(com.intellij.packaging.elements.PackagingElementFactory) JarArtifactType(com.intellij.packaging.impl.artifacts.JarArtifactType)

Aggregations

Project (com.intellij.openapi.project.Project)1 CompositePackagingElement (com.intellij.packaging.elements.CompositePackagingElement)1 PackagingElementFactory (com.intellij.packaging.elements.PackagingElementFactory)1 JarArtifactType (com.intellij.packaging.impl.artifacts.JarArtifactType)1