Search in sources :

Example 1 with MavenEjbClientConfiguration

use of org.jetbrains.jps.maven.model.impl.MavenEjbClientConfiguration in project intellij-community by JetBrains.

the class MavenEjbArtifactRootCopyingHandlerProvider method createCustomHandler.

@Nullable
@Override
public FileCopyingHandler createCustomHandler(@NotNull JpsArtifact artifact, @NotNull File root, @NotNull JpsPackagingElement contextElement, @NotNull JpsModel model, @NotNull BuildDataPaths buildDataPaths) {
    MavenProjectConfiguration projectConfiguration = JpsMavenExtensionService.getInstance().getMavenProjectConfiguration(buildDataPaths);
    if (projectConfiguration == null)
        return null;
    MavenEjbClientConfiguration ejbCfg = projectConfiguration.ejbClientArtifactConfigs.get(artifact.getName());
    if (ejbCfg == null) {
        JpsArtifact parentArtifact = findParentArtifact(contextElement);
        if (parentArtifact != null) {
            ejbCfg = projectConfiguration.ejbClientArtifactConfigs.get(parentArtifact.getName());
        }
    }
    return ejbCfg == null ? null : new FilterCopyHandler(new MavenResourceFileFilter(root, ejbCfg));
}
Also used : MavenProjectConfiguration(org.jetbrains.jps.maven.model.impl.MavenProjectConfiguration) MavenResourceFileFilter(org.jetbrains.jps.maven.model.impl.MavenResourceFileFilter) FilterCopyHandler(org.jetbrains.jps.incremental.artifacts.instructions.FilterCopyHandler) JpsArtifact(org.jetbrains.jps.model.artifact.JpsArtifact) MavenEjbClientConfiguration(org.jetbrains.jps.maven.model.impl.MavenEjbClientConfiguration) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

Nullable (org.jetbrains.annotations.Nullable)1 FilterCopyHandler (org.jetbrains.jps.incremental.artifacts.instructions.FilterCopyHandler)1 MavenEjbClientConfiguration (org.jetbrains.jps.maven.model.impl.MavenEjbClientConfiguration)1 MavenProjectConfiguration (org.jetbrains.jps.maven.model.impl.MavenProjectConfiguration)1 MavenResourceFileFilter (org.jetbrains.jps.maven.model.impl.MavenResourceFileFilter)1 JpsArtifact (org.jetbrains.jps.model.artifact.JpsArtifact)1