use of com.intellij.packaging.artifacts.ArtifactType in project intellij-community by JetBrains.
the class ArtifactsTestUtil method assertManifest.
public static void assertManifest(Artifact artifact, PackagingElementResolvingContext context, @Nullable String mainClass, @Nullable String classpath) {
final CompositePackagingElement<?> rootElement = artifact.getRootElement();
final ArtifactType type = artifact.getArtifactType();
assertManifest(rootElement, context, type, mainClass, classpath);
}
use of com.intellij.packaging.artifacts.ArtifactType in project google-cloud-intellij by GoogleCloudPlatform.
the class AppEngineStandardSupportProvider method findOrCreateWebArtifact.
@NotNull
static Artifact findOrCreateWebArtifact(AppEngineStandardFacet appEngineStandardFacet) {
Module module = appEngineStandardFacet.getModule();
ArtifactType webArtifactType = AppEngineStandardWebIntegration.getInstance().getAppEngineWebArtifactType();
final Collection<Artifact> artifacts = ArtifactUtil.getArtifactsContainingModuleOutput(module);
for (Artifact artifact : artifacts) {
if (webArtifactType.equals(artifact.getArtifactType())) {
return artifact;
}
}
ArtifactManager artifactManager = ArtifactManager.getInstance(module.getProject());
PackagingElementFactory elementFactory = PackagingElementFactory.getInstance();
ArtifactRootElement<?> root = elementFactory.createArtifactRootElement();
elementFactory.getOrCreateDirectory(root, "WEB-INF/classes").addOrFindChild(elementFactory.createModuleOutput(module));
return artifactManager.addArtifact(module.getName(), webArtifactType, root);
}
use of com.intellij.packaging.artifacts.ArtifactType in project google-cloud-intellij by GoogleCloudPlatform.
the class ArtifactsTestUtil method assertManifest.
public static void assertManifest(Artifact artifact, PackagingElementResolvingContext context, @Nullable String mainClass, @Nullable String classpath) {
final CompositePackagingElement<?> rootElement = artifact.getRootElement();
final ArtifactType type = artifact.getArtifactType();
assertManifest(rootElement, context, type, mainClass, classpath);
}
Aggregations