3 Replies Last post: Jan 11, 2010 4:30 PM by Frank Wienberg  
Frank Wienberg Newbie 22 posts since
Oct 2, 2002
Currently Being Moderated

Jan 5, 2010 1:29 PM

No CustomWebBuildParticipant in IDEA 9

Hi,

 

for my IDEA 8 plugin, I use com.intellij.javaee.web.make.CustomWebBuildParticipant, which is part of plugins/JavaEE/lib/javaee-openapi.jar. Despite of the JAR's name ("openapi"), this class disappeared in IDEA 9.

My use case is that for depdencies to certain libraries, certain additional files have to be copied into the Web app, similar to copying JARs to WEB-INF/lib. I simply had to extend CustomWebBuildParticipant, declare my subclass in plugin.xml, and implement registerBuildInstructions(), like so:

 

plugin.xml:

 

<extensions defaultExtensionNs="com.intellij">
  <javaee.web.customBuildParticipant implementation="net.jangaroo.ide.idea.JangarooWebBuildParticipant"/>
</extensions>

 

JangarooWebBuildParticipant.java:

 

...

public class JangarooWebBuildParticipant extends com.intellij.javaee.web.make.CustomWebBuildParticipant {

 

  public void registerBuildInstructions(WebFacet webFacet, BuildRecipe buildRecipe, CompileContext compileContext) {

    ...

  }

}

 

As an attachment, find the complete Java code of that class.

How can I achieve the same effect in IDEA 9? Any help would be appreciated!

 

Greetings,

Frank

Yann Cébron IDEA Plugin Contest Winner 1,265 posts since
Aug 22, 2002
Currently Being Moderated
Jan 9, 2010 9:05 PM in response to: Frank Wienberg
Re: No CustomWebBuildParticipant in IDEA 9

blind guess:

 

com.intellij.javaee.web.artifact.WebArtifactUtil

Guest
Currently Being Moderated
Jan 11, 2010 3:59 PM in response to: Frank Wienberg
Re: No CustomWebBuildParticipant in IDEA 9

Hello,

 

exploded/war configurations have been moved from facets to artifacts so it wasn't possible to keep old API. In order to achive the same effect in IDEA

9 you can add DirectoryCopyPackagingElement to an artifact output layout when your facet is created. Use the following methods to add directory copy

to an artifact layout:

ArtifactManager.getInstance(project).addElementsToDirectory(artifact, relativeOutputPath,

PackagingElementFactory.getInstance().createDirectoryCopyWithParentDirectories(pathToDirectory, ""));

 

To obtain all artifacts which contains some web facet use method

JavaeeArtifactUtil.getInstance().getArtifactsContainingFacet(webFacet, null)

 

 

Hi,

 

for my IDEA 8 plugin, I use com.intellij.javaee.web.make.CustomWebBuildParticipant, which is part of plugins/JavaEE/lib/javaee-openapi.jar. Despite of the JAR's name ("openapi"), this class disappeared in IDEA 9.

My use case is that for depdencies to certain libraries, certain additional files have to be copied into the Web app, similar to copying JARs to WEB-INF/lib. I simply had to extend CustomWebBuildParticipant, declare my subclass in plugin.xml, and implement registerBuildInstructions(), like so:

 

plugin.xml:

 

<extensions defaultExtensionNs="com.intellij">

  <javaee.web.customBuildParticipant implementation="net.jangaroo.ide.idea.JangarooWebBuildParticipant"/>

</extensions>

 

JangarooWebBuildParticipant.java:

 

..

public class JangarooWebBuildParticipant extends com.intellij.javaee.web.make.CustomWebBuildParticipant {

 

  public void registerBuildInstructions(WebFacet webFacet, BuildRecipe buildRecipe, CompileContext compileContext) {

    ...

  }

 

}

 

 

As an attachment, find the complete Java code of that class.

How can I achieve the same effect in IDEA 9? Any help would be appreciated!

 

Greetings,

Frank

 

---

Original message URL: http://www.jetbrains.net/devnet/message/5253633#5253633

 

 

--

Nikolay Chashnikov

Software Developer

JetBrains, Inc

http://www.jetbrains.com

"Develop with pleasure!"

 

More Like This

  • Retrieving data ...