KIE EAP - Maven plugin 6.1.0.Final

org.kie.integration.eap.maven.patch
Class EAPWebfragmentPatch

java.lang.Object
  extended by org.kie.integration.eap.maven.patch.EAPAbstractPatch
      extended by org.kie.integration.eap.maven.patch.EAPDynamicModulesPatch
          extended by org.kie.integration.eap.maven.patch.EAPWebfragmentPatch
All Implemented Interfaces:
EAPPatch

@Component(role=EAPPatch.class,
           hint="webfragment")
public class EAPWebfragmentPatch
extends EAPDynamicModulesPatch

This patch impl is concerning webfragment descriptor files (servlet spec 3.0) If a JAR resource contains a webfragment.xml file, and this JAR is placed as a static module resource, this webfragment is not loaded by the JBoss container. So, this patch extracts the webfragment.xml file from JAR artifact and creates a new JAR "on the fly" adding this descriptor. Then, the new generated JAR file is added into the webapp that is used with the current modules distribution.


Field Summary
 
Fields inherited from class org.kie.integration.eap.maven.patch.EAPDynamicModulesPatch
staticLayerDistribution
 
Constructor Summary
EAPWebfragmentPatch()
          Default constructor.
 
Method Summary
 boolean doApply(EAPContainer eap)
          Used to check if this patch apply for a given container.
 void execute(EAPModuleGraphNode node, Properties patchProperties)
           
 String getId()
          The unique identifier for the patch.
 void patchAssembly(EAPDynamicModule module, EAPAssemblyTemplate assemblyTemplate)
          Add the webfragment generated JAR as file inclusion in the module assembly descriptor.
 
Methods inherited from class org.kie.integration.eap.maven.patch.EAPDynamicModulesPatch
execute, getArtifact, getNodePatchProperties, getStaticLayerDistribution, setStaticLayerDistribution
 
Methods inherited from class org.kie.integration.eap.maven.patch.EAPAbstractPatch
getArtifactsHolder, getCurrentPatchModulePropertyName, getOutputPath, getPatchProperties, setArtifactsHolder, setOutputPath
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EAPWebfragmentPatch

public EAPWebfragmentPatch()
Default constructor.

Method Detail

getId

public String getId()
Description copied from interface: EAPPatch
The unique identifier for the patch.

Returns:
The unique identifier for the patch.

doApply

public boolean doApply(EAPContainer eap)
Description copied from interface: EAPPatch
Used to check if this patch apply for a given container.

Parameters:
eap - The JBoss EAP/AS container instance.
Returns:
This patch apply for this container.

execute

public void execute(EAPModuleGraphNode node,
                    Properties patchProperties)
             throws EAPPatchException
Specified by:
execute in class EAPDynamicModulesPatch
Throws:
EAPPatchException

patchAssembly

public void patchAssembly(EAPDynamicModule module,
                          EAPAssemblyTemplate assemblyTemplate)
                   throws EAPPatchException
Add the webfragment generated JAR as file inclusion in the module assembly descriptor.

Overrides:
patchAssembly in class EAPDynamicModulesPatch
Parameters:
assemblyTemplate - The assembly teamplte model.
Throws:
EAPPatchException

KIE EAP - Maven plugin 6.1.0.Final

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.