Search in sources :

Example 1 with FakeAnalyzer

use of org.jetbrains.osgi.jps.build.FakeAnalyzer in project intellij-plugins by JetBrains.

the class ImporterUtil method postProcessAdditionalProperties.

/**
   * Postprocessing step which handles Embed-Dependency and replaces placeholders on Import-Resources etc.
   */
static void postProcessAdditionalProperties(@NotNull Map<String, String> props, @NotNull MavenProject mavenProject, @NotNull Project project) {
    Analyzer analyzer = new FakeAnalyzer(props);
    Collection<MavenArtifact> dependencies = collectDependencies(props, mavenProject);
    DependencyEmbedder embedder = new DependencyEmbedder(dependencies);
    try {
        embedder.processHeaders(analyzer);
    } catch (DependencyEmbedderException e) {
        String message = OsmorcBundle.message("maven.import.embed.error", mavenProject.getPath(), e.getMessage());
        OsmorcProjectComponent.IMPORTANT_NOTIFICATIONS.createNotification(message, NotificationType.ERROR).notify(project);
    }
    ResourceCollector.includeMavenResources(mavenProject, analyzer);
    // finally post-process the Include-Resources header to account for backslashes and relative paths
    sanitizeIncludedResources(props, mavenProject);
}
Also used : Analyzer(aQute.bnd.osgi.Analyzer) FakeAnalyzer(org.jetbrains.osgi.jps.build.FakeAnalyzer) FakeAnalyzer(org.jetbrains.osgi.jps.build.FakeAnalyzer) MavenArtifact(org.jetbrains.idea.maven.model.MavenArtifact)

Aggregations

Analyzer (aQute.bnd.osgi.Analyzer)1 MavenArtifact (org.jetbrains.idea.maven.model.MavenArtifact)1 FakeAnalyzer (org.jetbrains.osgi.jps.build.FakeAnalyzer)1