Content-package-maven-plugin use filter.xml

Is there a way to get the Maven plugin (content-package-maven-plugin) to use the filter.xml used by VLT for the filtering for the content package. At the moment I need to specifiy the filtering again in the POM.
<plugin>
<groupId>com.day.jcr.vault</groupId>
<artifactId>content-package-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<group>geometrixx</group>
<filters>
<filter><root>/apps/geometrixx</root></filter>               
<filter><root>/etc/designs/geometrixx</root></filter> 
<filter><root>/content/geometrixx</root></filter> 
</filters>
<embeddeds>
<embedded>
<groupId>${project.groupId}</groupId>
<artifactId>geometrixx-bundle</artifactId>
<target>/apps/geometrixx/install</target>
</embedded>
</embeddeds>
<targetURL>http://${crx.host}:${crx.port}/crx/packmgr/service.jsp</targetURL>
</configuration>
</plugin>
Filter.xml
<?xml version="1.0" encoding="UTF-8"?>
<workspaceFilter version="1.0">
<filter root="/apps/geometrixx">
<include pattern="/apps/geometrixx(/.*)?" />
</filter>   
<filter root="/etc/designs/geometrixx"/>
<filter root="/content/geometrixx"/>
<filter root="/apps/geometrixx/install">
<exclude pattern="/apps/geometrixx/install/.*"/>
</filter>
</workspaceFilter>

Dan-
Rather than having a filters element within the configuration, put
<filterSource>src/main/content/META-INF/vault/filter.xml</filterSource>
(correcting the path as necessary).
Regards,
Justin

Similar Messages

  • Maven plugin for managing CQ5 packages

    Hi,
    Here's some new documentation that explains how to use the Content Package Maven plugin. You can package and install content from your maven build...for example, in your POM, add goals for package creation and installation to automatically deploy the OSGi bundle that was built. You can perform other package management tasks on remote servers, like rebuild packages,  and list, uninstall, and remove them.
    http://dev.day.com/docs/en/cq/current/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.h tml
    scott

    Thank you so much for prompt reply!!
    I am new to this so I am bit confused.
    Would it be possible for you to check my pom file? And let me know if the configuration looks Ok?
    Command used: mvn clean package content-package:install -P felix-deploy
    Setting.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
        <pluginGroups>
            <pluginGroup>content-package-maven-plugin</pluginGroup>
        </pluginGroups>
        <proxies />
        <servers>
            <server>
                <id>snapshots</id>
                <username>cqadmin</username>
                <password>internal1</password>
            </server>
            <server>
                <id>internal</id>
                <username>cqadmin</username>
                <password>internal1</password>
            </server>
        </servers>
        <mirrors>
            <mirror>
                <id>internal</id>
                <url>http://localhost:9090/archiva/repository/internal/</url>
                <mirrorOf>*</mirrorOf>
            </mirror>
        </mirrors>
        <profiles>
            <profile>
                <id>adobe-public</id>
                <activation>
                    <activeByDefault>false</activeByDefault>
                </activation>
                <properties>
                    <releaseRepository-Id>adobe-public-releases</releaseRepository-Id>
                    <releaseRepository-Name>Adobe Public Releases</releaseRepository-Name>
                    <releaseRepository-URL>
                        http://repo.adobe.com/nexus/content/groups/public/com/day/cq/wcm/cq-content/</releaseRepository-URL>
                </properties>
                <repositories>
                    <repository>
                        <id>adobe-public-releases</id>
                        <name>Adobe Public Repository</name>
                        <url>http://repo.adobe.com/nexus/content/groups/public</url>
                        <releases>
                            <enabled>true</enabled>
                            <updatePolicy>never</updatePolicy>
                        </releases>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </repository>
                </repositories>
                <pluginRepositories>
                    <pluginRepository>
                        <id>adobe-public-releases</id>
                        <name>Adobe Public Repository</name>
                        <url> http://repo.adobe.com/nexus/content/groups/public/com/day/cq/wcm/cq-content/</url>
                        <releases>
                            <enabled>true</enabled>
                            <updatePolicy>never</updatePolicy>
                        </releases>
                        <snapshots>
                            <enabled>false</enabled>
                        </snapshots>
                    </pluginRepository>
                </pluginRepositories>
            </profile>
        </profiles>
    </settings>
    POM.xml
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>common</groupId>
        <artifactId>common-ui</artifactId>
        <version>0.0.1</version>
        <name>common-ui</name>
        <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <!-- timestamp property used when filtering files from META-INF path -->
            <maven.build.timestamp.format>yyyy-MM-dd'T'HH:mm:ss.SZ</maven.build.timestamp.format>
            <timestamp>${maven.build.timestamp}</timestamp>
            <cq5.package.group>Common UI</cq5.package.group>
            <cq5.app.name>common-ui</cq5.app.name>
        </properties>
        <profiles>
            <profile>
                <id>felix-deploy</id>
                <build>
                    <plugins>
                        <plugin>
                            <groupId>com.day.jcr.vault</groupId>
                            <artifactId>content-package-maven-plugin</artifactId>
                            <version>0.0.19</version>
                            <configuration>
                                <name>common-ui</name>
                                <failOnError>true</failOnError>
                                <packageFile>
                                    ${project.artifactId}-${project.version}-cq5-package.zip
                                </packageFile>
                                <targetURL>http://localhost:4502/crx/packmgr/service.jsp</targetURL>
                            </configuration>
                            <executions>
                                <execution>
                                    <goals>
                                        <goal>package</goal>
                                    </goals>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </build>
            </profile>
        </profiles>
        <build>
            <plugins>
                <plugin>
                    <!-- Assembly plugin used to make cq5 package zip file -->
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.3</version>
                    <configuration>
                        <builtContentDirectory>jcr_root</builtContentDirectory>
                        <targetURL>http://localhost:4502/crx/packmgr/service.jsp</targetURL>
                    </configuration>
                    <executions>
                        <execution>
                            <id>make-assembly</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
            <resources>
                <resource>
                    <directory>src/main/content</directory>
                    <includes>
                        <include>**/*.*</include>
                    </includes>
                </resource>
            </resources>
        </build>
    </project>
    ERROR:
    C:\workspace-aaa-eris\wms-cms-common-ui>mvn clean package content-package:install -P felix-deploy
    [INFO] Scanning for projects...
    [WARNING] Failed to retrieve plugin descriptor for com.day.jcr.vault:content-package-maven-plugin:0.0.19: Invalid plugin descriptor for com.day.jcr.vault:content-package-maven-plug
    in:0.0.19  (C:\Users\gxoshre\.m2\repository\com\day\jcr\vault\content-package-maven-plugin\0.0.19\co ntent-package-maven-plugin-0.0.19.jar), Plugin's descriptor contains the wrong ve
    rsion: 0.0.16
    Downloading: http://localhost:9090/archiva/repository/internal/org/codehaus/mojo/maven-metadata.xml
    Downloading: http://localhost:9090/archiva/repository/internal/content-package-maven-plugin/maven-metad ata.xml
    Downloading: http://localhost:9090/archiva/repository/internal/org/apache/maven/plugins/maven-metadata. xml
    Downloaded: http://localhost:9090/archiva/repository/internal/org/apache/maven/plugins/maven-metadata. xml (11 KB at 0.7 KB/sec)
    Downloaded: http://localhost:9090/archiva/repository/internal/org/codehaus/mojo/maven-metadata.xml (21 KB at 1.4 KB/sec)
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 15.148s
    [INFO] Finished at: Wed Oct 03 12:34:25 MST 2012
    [INFO] Final Memory: 4M/15M
    [INFO] ------------------------------------------------------------------------
    [ERROR] No plugin found for prefix 'content-package' in the current project and in the plugin groups [content-package-maven-plugin, org.apache.maven.plugins, org.codehaus.mojo] ava
    ilable from the repositories [local (C:\Users\gxoshre\.m2\repository), internal (http://localhost:9090/archiva/repository/internal/)] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException
    C:\workspace-aaa-eris\wms-cms-common-ui

  • Deploy maven artifact using the wls-maven-plugin (12.1.1.0)

    I am trying to use the wls maven plugin to deploy an artifact located in my local repository.
    According to the documentation ( http://docs.oracle.com/cd/E24329_01/web.1211/e24368/maven.htm#autoId6 ) this can be done by specifying the maven coordinates in the source parameter. Again according to the doc it should be specified as groupId:artifactID:packaging:classifier:version.
    I tried this but as was not working I decompiled the wls-maven-plugin jar where I first of all discoverd that what should be passed is groupId:artifactID:version instead of the full one.
    The next problem is the regular expression used to detect this:
    if (this.source.matches("\\S:\\S:\\S")) {As you can see this will only detect one character long groupID, artifactID and version (obviously this has never been tested ...).
    Can the source code of this plugin be found somewhere so I can fix it myself, can oracle fix this quickly, ... what are my options here?
    Thanks

    My first question regards step number 2...
    2. Extract the contents of the supplemental zip (eg: extract into /home/myhome/mywls )
    wls12120 directory will be automatically created during extraction.
    The file name is wls12120_dev_supplemental.zip .
    When I put this file in the mywls directory and Extract All ( using Windows Explorer, if that matters ),
    the directory created is actually named " wls12120_dev_supplemental " and it has 1 sub-directory named " wls12120 ".
    So, is there something wrong with Step 2's text ?
    Is there something wrong with how I interpreted Step 2's text ?
    Is the actual directory and sub-directory I see being created the successful response / result ?  Or did this step fail ?

  • How to create new XML file using retreived XML content by using SAX API?

    hi all,
    * How to create new XML file using retreived XML content by using SAX ?
    * I have tried my level best, but output is coming invalid format, my code is follows,
    XMLFileParser.java class :-
    import java.io.StringReader;
    import java.io.StringWriter;
    import javax.xml.transform.OutputKeys;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.TransformerHandler;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.xml.sax.Attributes;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.helpers.XMLFilterImpl;
    public class PdfParser extends XMLFilterImpl {
        private TransformerHandler handler;
        Document meta_data;
        private StringWriter meta_data_text = new StringWriter();
        public void startDocument() throws SAXException {
        void startValidation() throws SAXException {
            StreamResult streamResult = new StreamResult(meta_data_text);
            SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
            try
                handler = factory.newTransformerHandler();
                Transformer transformer = handler.getTransformer();
                transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                handler.setResult(streamResult);
                handler.startDocument();
            catch (TransformerConfigurationException tce)
                System.out.println("Error during the parse :"+ tce.getMessageAndLocation());
            super.startDocument();
        public void startElement(String namespaceURI, String localName,
                String qualifiedName, Attributes atts) throws SAXException {
            handler.startElement(namespaceURI, localName, qualifiedName, atts);
            super.startElement(namespaceURI, localName, qualifiedName, atts);
        public void characters(char[] text, int start, int length)
                throws SAXException {
            handler.characters(text, start, length);
            super.characters(text, start, length);
        public void endElement(String namespaceURI, String localName,
                String qualifiedName) throws SAXException {
            super.endElement("", localName, qualifiedName);
            handler.endElement("", localName, qualifiedName);
        public void endDocument() throws SAXException {
        void endValidation() throws SAXException {
            handler.endDocument();
            try {
                TransformerFactory transfactory = TransformerFactory.newInstance();
                Transformer trans = transfactory.newTransformer();
                SAXSource sax_source = new SAXSource(new InputSource(new StringReader(meta_data_text.toString())));
                DOMResult dom_result = new DOMResult();
                trans.transform(sax_source, dom_result);
                meta_data = (Document) dom_result.getNode();
                System.out.println(meta_data_text);
            catch (TransformerConfigurationException tce) {
                System.out.println("Error occurs during the parse :"+ tce.getMessageAndLocation());
            catch (TransformerException te) {
                System.out.println("Error in result transformation :"+ te.getMessageAndLocation());
    } CreateXMLFile.java class :-
    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();
    Sax.endElement("", "basic-metadata", "basic-metadata");* In CreateXMLFile.java
    class, I have retreived the xml content in the meta_data object, after that i have converted into character array and this will be sends to SAX
    * In this case , the XML file created successfully but the retreived XML content added as an text in between basic-metadata Element, that is, retreived XML content
    is not an XML type text, it just an Normal text Why that ?
    * Please help me what is the problem in my code?
    Cheers,
    JavaImran

    Sax.startDocument();
    Sax.startValidation();
    Sax.startElement("", "pdf", "pdf", new AttributesImpl());
    Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());          
    String xmp_str = new String(meta_data.getByteArray(),"UTF8");
    char[] xmp_arr = xmp_str.toCharArray();
    Sax.characters(xmp_arr, 0, xmp_arr.length);
    </code><code>Sax.endElement("", "basic-metadata", "basic-metadata");</code>
    <code class="jive-code jive-java">Sax.endElement("", "pdf", "pdf");
    Sax.endValidation();
    Sax.endDocument();     
    * I HAVE CHANGED MY AS PER YOUR SUGGESTION, NOW SAME RESULT HAS COMING.
    * I AM NOT ABLE TO GET THE EXACT OUTPUT.,WHY THAT ?
    Thanks,
    JavaImran{code}

  • Filter xml data Class and use pushView to populate List (Flex Mobile project)

    I am such noob so I apologize for my ignorance. Trying to learn and work at the same time but i'm stumped been searching and my understanding is not up to snuff just yet.
    I looked at the Mobile Shopping Cart that Adobe has little over my head to grasp and impliment but my project is similar without the cart option basically.
    I'm currently using a single view with 3 states
    <s:states>
    <s:State name="default"/>
    <s:State name="productView"/>
    <s:State name="detailsView"/>
    </s:states>
    Default state has a list that uses a xml file with categoryID number's that correspond with the main products xml file.
    Which when the item is selected it filters and updates the List on the productView and so on to the detailsView.
    Like this:
    Category -> Products-> Details
    I'm using a filterCollection from an .as Class file to complete this here is a small snipet.
    private function productService_resultHandler(event:ResultEvent):void
    var productsArray:Array = new Array();
    var resultData:XMLList = event.result..product;
    for each (var p:XML in resultData) {
    var product:Product = Product.buildProductFromAttributes( p );
         productsArray.push( product );
    products = new ArrayCollection( productsArray );
         products.filterFunction = filterForCategory;
         products.refresh();
    private function filterForCategory(item:Product):Boolean{
    return item.catID == selectedCategory;
    public function filterCollection(id:Number):void{
    selectedCategory = id;
         products.refresh();
    Project works great but incredibly slow on Mobile device iOS. In-between the states I have transition animations and it bogs right down.
    So I was trying to experiment by using pushView and basically do the same but utilize Flex's viewNavigator to see if it speeds things up but I can't get the filter function to push the filtered data to the newView component.
    Or I was thinking of trying to order the events such as seletedItem->transition->filtered Data it seems like it is all happing at once and the app just sits for 3 seconds before the state is updated.
    Any help appreciated or more info needed let me know. THX

    So I will solve this later.
    I was able to stick to the original project layout with states within views instead of view states. Ditched the transition Move effects averaging 1 to 2 seconds on all state changes.
    It is a really basic product view app that all files are local. I'm not super impressed at the first go but it works and into the First Project archieve's and will revisit it on version 2. Which will probably start soon. It's better than hello world!

  • [svn] 3652: Fix for SDK-17328 - Package description missing when they' re set using Overviews_Base.xml

    Revision: 3652
    Author: [email protected]
    Date: 2008-10-15 10:18:08 -0700 (Wed, 15 Oct 2008)
    Log Message:
    Fix for SDK-17328 - Package description missing when they're set using Overviews_Base.xml
    Fix for SDK-17185 - Allow HTML chars to be set for footer string
    Fix for SDK-17259 - Exception name missing when generating asdoc with @throw tag
    QA: Yes
    Doc: No
    Tests: checkintests
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17328
    http://bugs.adobe.com/jira/browse/SDK-17185
    http://bugs.adobe.com/jira/browse/SDK-17259
    Modified Paths:
    flex/sdk/trunk/asdoc/templates/asdoc-util.xslt
    flex/sdk/trunk/asdoc/templates/package-detail.xslt
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va

    I believe I have found my solution!
    I can currently boot with my bios in ide mode- but my raid1 mirror is showing as independent drives (c and d)
    I do a simple windows search for winload.exe on the C: drive and get nothing
    that same search on the D: turns up winload.exe all over
    When I look at I my BCD 'device partation=C:'
    shouldnt this be D:?
    If so is this just a simple bcdedit, reboot into the bios, change my bios from IDE mode to RAID mode, save to cmos then, theoretically boot into windows with my raid correct (showing as a singe drive C: )
    Please someone correct me if I am wrong
    C:\>bcdedit
    Windows Boot Manager
    identifier              {bootmgr}
    device                  partition=C:
    description             Windows Boot Manager
    locale                  en-US
    inherit                 {globalsettings}
    default                 {current}
    resumeobject            {8b18c20b-c12d-11db-afc2-ac36bbabc8b2}
    displayorder            {current}
    toolsdisplayorder       {memdiag}
    timeout                 30
    Windows Boot Loader
    identifier              {current}
    device                  partition=C:
    path                    \Windows\system32\winload.exe
    description             Microsoft Windows Vista
    locale                  en-US
    inherit                 {bootloadersettings}
    osdevice                partition=C:
    systemroot              \Windows
    resumeobject            {8b18c20b-c12d-11db-afc2-ac36bbabc8b2}
    nx                      OptIn
    vga                     No
    quietboot               Yes

  • Problem with the weblogic-maven-plugin

    I am in the process of converting from ant to maven, but I am having a problem with the weblogic-maven-plugin. Has anyone used this plugin successfully? Here is the error I am receiving even though I have a dependency on the xbean.jar in my pom, and it is in my local repo.
    java.lang.NoClassDefFoundError: com/bea/xml/XmlException
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescript
    orManager(AbstractDescriptorLoader2.java:301)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescript
    orBeanFromReader(AbstractDescriptorLoader2.java:749)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescr
    iptorBean(AbstractDescriptorLoader2.java:376)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescrip
    torBeanWithoutPlan(AbstractDescriptorLoader2.java:720)
    at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescrip
    torBean(AbstractDescriptorLoader2.java:729)
    at weblogic.servlet.internal.WebAppDescriptor.getWebAppBean(WebAppDescri
    ptor.java:134)
    at weblogic.servlet.jsp.JspcInvoker.parseDescriptors(JspcInvoker.java:27
    6)
    at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:187)
    at weblogic.application.compiler.AppcUtils.compileWAR(AppcUtils.java:353
    at weblogic.application.compiler.WARCompiler.compile(WARCompiler.java:78
    at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCo
    mpilerFlow.java:118)
    at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompile
    rFlow.java:43)
    at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDri
    ver.java:69)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD
    river.java:26)
    at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36
    at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:26)
    at weblogic.application.compiler.Appc.runBody(Appc.java:163)
    at weblogic.utils.compiler.Tool.run(Tool.java:158)
    at weblogic.utils.compiler.Tool.run(Tool.java:115)
    at weblogic.application.compiler.Appc.main(Appc.java:174)
    at weblogic.appc.main(appc.java:14)
    at jrockit.reflect.InitialMethodInvoker.invoke(Ljava.lang.Object;[Ljava.
    lang.Object;)Ljava.lang.Object;(Unknown Source)
    at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;
    I)Ljava.lang.Object;(Unknown Source)
    at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:
    290)
    at weblogic.ant.taskdefs.j2ee.Appc.privateExecute(Appc.java:250)
    at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:159)
    at org.codehaus.mojo.weblogic.AppcMojo.execute(AppcMojo.java:180)
    at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
    nManager.java:412)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
    ultLifecycleExecutor.java:534)

    Here is what you need to get the maven-weblogic-plugin appc goal to work:
    <project>
    <build>
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>weblogic-maven-plugin</artifactId>
    <version>2.9.0-SNAPSHOT</version>
    <configuration>
    <inputArtifactPath>${basedir}/../../jar/broker.war</inputArtifactPath>
    <verbose>true</verbose>
    </configuration>
    <executions>
    <execution>
    <phase>package</phase>
    <goals>
    <goal>appc</goal>
    </goals>
    <inherited>false</inherited>
    <configuration>
    <verbose>false</verbose>
    <debug>false</debug>
    <projectPackaging>war</projectPackaging>
    </configuration>
    </execution>
    </executions>
    <dependencies>
    <dependency>
    <groupId>com.sun</groupId>
    <artifactId>tools</artifactId>
    <version>1.5.0</version>
    </dependency>
    <dependency>
    <groupId>weblogic</groupId>
    <artifactId>wlxbean</artifactId>
    <version>9.2</version>
    </dependency>
    <dependency>
    <groupId>weblogic</groupId>
    <artifactId>xbean</artifactId>
    <version>9.2</version>
    </dependency>
    <dependency>
    <groupId>weblogic</groupId>
    <artifactId>weblogic-container-binding</artifactId>
    <version>9.2</version>
    </dependency>
    <dependency>
    <groupId>weblogic</groupId>
    <artifactId>wlw-util</artifactId>
    <version>9.2</version>
    </dependency>
    <dependency>
    <groupId>weblogic</groupId>
    <artifactId>javelinx</artifactId>
    <version>9.2</version>
    </dependency>
    <dependency>
    <groupId>weblogic</groupId>
    <artifactId>wlw-langx</artifactId>
    <version>9.2</version>
    </dependency>
    <dependency>
    <groupId>weblogic</groupId>
    <artifactId>bcel</artifactId>
    <version>5.1</version>
    </dependency>
    </plugin>
    </build>
    <dependencies>
    <dependency>
    <groupId>weblogic</groupId>
    <artifactId>wlw-langx</artifactId>
    <version>9.2</version>
    </dependency>
    </dependencies>
    <project>
    You need to install/deploy all of the above dependencies manually into your repo.

  • Maven Plugin not accepting values from a property file.

    Hi,
    I want to create javadocs using maven.
    It works fine when i provide all the absolute paths in the pom.
    But when i try to provide paths by reading a property file then the maven-javadoc-plugin does not get the paths from this property file.
    The property file is defined as mentioned in below format:
    src_mvn_consult_framework_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/projects/framework
    src_mvn_consult_module_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/projects/module
    src_mvn_consult_appx_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/projects/appx
    src_mvn_consult_client_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/projects/client
    src_mvn_consult_app_webservice_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/application/com.ofss.fc.cz.nab.webservices
    src_mvn_consult_app_middleware_dir=/var/lib/hudson/jobs/CZ_NAB_CORE_MVN_CHECKOUT/workspace/middleware/application/com.ofss.fc.cz.nab.middleware
    Calling this property file in the pom like:
    <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>properties-maven-plugin</artifactId>
         <version>1.0-alpha-2</version>
         <executions>
         <execution>
         <phase>initialize</phase>
         <goals>
    <goal>read-project-properties</goal>
         </goals>
         <configuration>
    <files>
         <file>/var/build/consult/maven/cz_javadoc-config.properties</file>
    </files>
         </configuration>
         </execution>
         </executions>
    </plugin>
    Finally we are using keys defined in property file in pom like:
    <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-javadoc-plugin</artifactId>
              <version>2.7</version>
              <configuration>
              <sourcepath>${src_mvn_consult_framework_dir};
                   ${src_mvn_consult_module_dir};
                   ${src_mvn_consult_appx_dir};
                   ${src_mvn_consult_client_dir};
                   ${src_mvn_consult_app_webservice_dir};
                   ${src_mvn_consult_app_middleware_dir};
              </sourcepath>
              </configuration>
    </plugin>
    Please suggest how we can get the value of keys defined in the property file in POM
    Thanks for your invaluable support

    I've had to do something similar in one of my apps.  In order to populate values in the THIS scope, you'll need to put a copy of the XML loading/processing logic in the pseudo-constructor (or encapsulate it in a separate CFM/CFC file and include it in both places).  It's ugly, but that's the only way I'm aware of to access the THIS scope.
    -Carl V.

  • FlexPMD maven plugin no longer useable with Maven due to imcompatible binaries?

    I am using Maven 2.2.1 with FlexPMD 1.2 and Flexmojos 3.7.1, with the maven-site-plugin 3.0
    I get the following error:
    [INFO] [site:site {execution: default-site}]
    [FATAL ERROR] org.apache.maven.plugins.site.SiteMojo#execute() caused a linkage
    error (java.lang.AbstractMethodError) and may be out-of-date. Check the realms:
    [FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven
    -site-plugin:3.0]
    urls[0] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/plugins/mav
    en-site-plugin/3.0/maven-site-plugin-3.0.jar
    urls[1] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/reporting/m
    aven-reporting-exec/1.0.1/maven-reporting-exec-1.0.1.jar
    urls[2] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-u
    tils/1.5.10/plexus-utils-1.5.10.jar
    urls[3] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/maven-setti
    ngs-builder/3.0/maven-settings-builder-3.0.jar
    urls[4] = file:/C:/dreammachine/cache/m2/repository/org/apache/velocity/velocity
    /1.5/velocity-1.5.jar
    urls[5] = file:/C:/dreammachine/cache/m2/repository/commons-collections/commons-
    collections/3.2.1/commons-collections-3.2.1.jar
    urls[6] = file:/C:/dreammachine/cache/m2/repository/commons-lang/commons-lang/2.
    5/commons-lang-2.5.jar
    urls[7] = file:/C:/dreammachine/cache/m2/repository/oro/oro/2.0.8/oro-2.0.8.jar
    urls[8] = file:/C:/dreammachine/cache/m2/repository/velocity/velocity/1.5/veloci
    ty-1.5.jar
    urls[9] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxia
    -core/1.2/doxia-core-1.2.jar
    urls[10] = file:/C:/dreammachine/cache/m2/repository/xerces/xercesImpl/2.9.1/xer
    cesImpl-2.9.1.jar
    urls[11] = file:/C:/dreammachine/cache/m2/repository/xml-apis/xml-apis/1.3.04/xm
    l-apis-1.3.04.jar
    urls[12] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomponents/h
    ttpclient/4.0.2/httpclient-4.0.2.jar
    urls[13] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomponents/h
    ttpcore/4.0.1/httpcore-4.0.1.jar
    urls[14] = file:/C:/dreammachine/cache/m2/repository/commons-codec/commons-codec
    /1.3/commons-codec-1.3.jar
    urls[15] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-module-xhtml/1.2/doxia-module-xhtml-1.2.jar
    urls[16] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-module-apt/1.2/doxia-module-apt-1.2.jar
    urls[17] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-module-xdoc/1.2/doxia-module-xdoc-1.2.jar
    urls[18] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-module-fml/1.2/doxia-module-fml-1.2.jar
    urls[19] = file:/C:/dreammachine/cache/m2/repository/javax/servlet/servlet-api/2
    .5/servlet-api-2.5.jar
    urls[20] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-decoration-model/1.2/doxia-decoration-model-1.2.jar
    urls[21] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/doxia/doxi
    a-site-renderer/1.2/doxia-site-renderer-1.2.jar
    urls[22] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
    i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
    urls[23] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
    velocity/1.1.8/plexus-velocity-1.1.8.jar
    urls[24] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/shared/mav
    en-doxia-tools/1.4/maven-doxia-tools-1.4.jar
    urls[25] = file:/C:/dreammachine/cache/m2/repository/commons-io/commons-io/1.4/c
    ommons-io-1.4.jar
    urls[26] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
    archiver/1.0/plexus-archiver-1.0.jar
    urls[27] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/plexus-
    io/1.0/plexus-io-1.0.jar
    urls[28] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/jetty/6.1
    .25/jetty-6.1.25.jar
    urls[29] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/jetty-uti
    l/6.1.25/jetty-util-6.1.25.jar
    urls[30] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/servlet-a
    pi/2.5-20081211/servlet-api-2.5-20081211.jar
    [FATAL ERROR] Container realm = plexus.core
    urls[0] = file:/C:/dreammachine/tools/m2/lib/maven-2.2.1-uber.jar
    [INFO] ------------------------------------------------------------------------
    [ERROR] FATAL ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] null
    [INFO] ------------------------------------------------------------------------
    [INFO] Trace
    java.lang.AbstractMethodError
            at org.apache.maven.plugins.site.AbstractSiteRenderingMojo.getReports(Ab
    stractSiteRenderingMojo.java:246)
            at org.apache.maven.plugins.site.SiteMojo.execute(SiteMojo.java:121)
            at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
    nManager.java:490)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
    ultLifecycleExecutor.java:694)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLi
    fecycle(DefaultLifecycleExecutor.java:556)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
    ltLifecycleExecutor.java:535)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHan
    dleFailures(DefaultLifecycleExecutor.java:387)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
    ts(DefaultLifecycleExecutor.java:348)
            at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
    If I revert to maven-site-plugin 2.1 this issue disappears, but I then get the error reported here:
    https://issues.sonatype.org/browse/FLEXMOJOS-310?page=com.atlassian.jira.plugin.system.iss uetabpanels:comment-tabpanel#issue-tabs
    If I migrate to maven 3.0.3 with maven-site-plugin 3.0 I get the following error:
    [INFO] configuring report plugin com.adobe.ac:flex-pmd-maven-plugin:1.2
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1:31.730s
    [INFO] Finished at: Tue Sep 27 17:21:49 BST 2011
    [INFO] Final Memory: 21M/243M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.0:si
    te (default-site) on project cafe-parsley: Execution default-site of goal org.ap
    ache.maven.plugins:maven-site-plugin:3.0:site failed: An API incompatibility was
    encountered while executing org.apache.maven.plugins:maven-site-plugin:3.0:site
    : java.lang.AbstractMethodError: null
    [ERROR] -----------------------------------------------------
    [ERROR] realm =    plugin>org.apache.maven.plugins:maven-site-plugin:3.0
    [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
    [ERROR] urls[0] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/plu
    gins/maven-site-plugin/3.0/maven-site-plugin-3.0.jar
    [ERROR] urls[1] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/rep
    orting/maven-reporting-exec/1.0.1/maven-reporting-exec-1.0.1.jar
    [ERROR] urls[2] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/rep
    orting/maven-reporting-api/3.0/maven-reporting-api-3.0.jar
    [ERROR] urls[3] = file:/C:/dreammachine/cache/m2/repository/org/apache/velocity/
    velocity/1.5/velocity-1.5.jar
    [ERROR] urls[4] = file:/C:/dreammachine/cache/m2/repository/oro/oro/2.0.8/oro-2.
    0.8.jar
    [ERROR] urls[5] = file:/C:/dreammachine/cache/m2/repository/velocity/velocity/1.
    5/velocity-1.5.jar
    [ERROR] urls[6] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/aether/
    aether-util/1.7/aether-util-1.7.jar
    [ERROR] urls[7] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/sisu/si
    su-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
    [ERROR] urls[8] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/sisu/si
    su-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
    [ERROR] urls[9] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus/
    plexus-interpolation/1.14/plexus-interpolation-1.14.jar
    [ERROR] urls[10] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
    [ERROR] urls[11] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/plexus
    /plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
    [ERROR] urls[12] = file:/C:/dreammachine/cache/m2/repository/org/sonatype/plexus
    /plexus-cipher/1.4/plexus-cipher-1.4.jar
    [ERROR] urls[13] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-sink-api/1.2/doxia-sink-api-1.2.jar
    [ERROR] urls[14] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-logging-api/1.2/doxia-logging-api-1.2.jar
    [ERROR] urls[15] = file:/C:/dreammachine/cache/m2/repository/junit/junit/3.8.1/j
    unit-3.8.1.jar
    [ERROR] urls[16] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-core/1.2/doxia-core-1.2.jar
    [ERROR] urls[17] = file:/C:/dreammachine/cache/m2/repository/xerces/xercesImpl/2
    .9.1/xercesImpl-2.9.1.jar
    [ERROR] urls[18] = file:/C:/dreammachine/cache/m2/repository/xml-apis/xml-apis/1
    .3.04/xml-apis-1.3.04.jar
    [ERROR] urls[19] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomp
    onents/httpclient/4.0.2/httpclient-4.0.2.jar
    [ERROR] urls[20] = file:/C:/dreammachine/cache/m2/repository/org/apache/httpcomp
    onents/httpcore/4.0.1/httpcore-4.0.1.jar
    [ERROR] urls[21] = file:/C:/dreammachine/cache/m2/repository/commons-codec/commo
    ns-codec/1.3/commons-codec-1.3.jar
    [ERROR] urls[22] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-module-xhtml/1.2/doxia-module-xhtml-1.2.jar
    [ERROR] urls[23] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-module-apt/1.2/doxia-module-apt-1.2.jar
    [ERROR] urls[24] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-module-xdoc/1.2/doxia-module-xdoc-1.2.jar
    [ERROR] urls[25] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-module-fml/1.2/doxia-module-fml-1.2.jar
    [ERROR] urls[26] = file:/C:/dreammachine/cache/m2/repository/javax/servlet/servl
    et-api/2.5/servlet-api-2.5.jar
    [ERROR] urls[27] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-decoration-model/1.2/doxia-decoration-model-1.2.jar
    [ERROR] urls[28] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/do
    xia/doxia-site-renderer/1.2/doxia-site-renderer-1.2.jar
    [ERROR] urls[29] = file:/C:/dreammachine/cache/m2/repository/commons-collections
    /commons-collections/3.2.1/commons-collections-3.2.1.jar
    [ERROR] urls[30] = file:/C:/dreammachine/cache/m2/repository/org/apache/maven/sh
    ared/maven-doxia-tools/1.4/maven-doxia-tools-1.4.jar
    [ERROR] urls[31] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-archiver/1.0/plexus-archiver-1.0.jar
    [ERROR] urls[32] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-io/1.0/plexus-io-1.0.jar
    [ERROR] urls[33] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-i18n/1.0-beta-7/plexus-i18n-1.0-beta-7.jar
    [ERROR] urls[34] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-velocity/1.1.8/plexus-velocity-1.1.8.jar
    [ERROR] urls[35] = file:/C:/dreammachine/cache/m2/repository/org/codehaus/plexus
    /plexus-utils/1.5.10/plexus-utils-1.5.10.jar
    [ERROR] urls[36] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/j
    etty/6.1.25/jetty-6.1.25.jar
    [ERROR] urls[37] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/s
    ervlet-api/2.5-20081211/servlet-api-2.5-20081211.jar
    [ERROR] urls[38] = file:/C:/dreammachine/cache/m2/repository/org/mortbay/jetty/j
    etty-util/6.1.25/jetty-util-6.1.25.jar
    [ERROR] urls[39] = file:/C:/dreammachine/cache/m2/repository/commons-lang/common
    s-lang/2.5/commons-lang-2.5.jar
    [ERROR] urls[40] = file:/C:/dreammachine/cache/m2/repository/commons-io/commons-
    io/1.4/commons-io-1.4.jar
    [ERROR] Number of foreign imports: 1
    [ERROR] import: Entry[import  from realm ClassRealm[project>com.jpmorgan.ib.arch
    itecture.deia.app:cafe-parsley:1.0-SNAPSHOT, parent: ClassRealm[maven.api, paren
    t: null]]]
    [ERROR]
    [ERROR] -----------------------------------------------------
    [ERROR] -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
    ch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please rea
    d the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContaine
    Thus it seems FlexPMD can no longer be used with Maven due to some sort of binary incompatibility issue...
    Does anyone know how to resolve this issue?

    Hooray, I got to the bottom of issue.
    Basically the flex PMD maven plugin is broken at version 1.2 with more recent version of  maven-site-plugin.  This is because of a new abstract method introduced to the class AbstractMavenReport - canGenerateReport(); 
    This method isn't implemented in the FlexPmdMojo and FlexPmdReportMojo classes on the SVN trunk or in flexPMD 1.2 and was causing >mvn site to fail as outlined above. Add implementations of this method, returning true in both classes and the plugin works again!
    Note the method also needs to be added to the relevant Mojo and ReportMojo classes for the FlexMetrics and CPD maven plugins to get them working too.
    Flex PMD commiters - please release a new version of the project to resolve this showstopper!

  • Detecting transform errors when using org.xml.sax.XMLFilter

    I am using javax.xml.transform.sax.SAXTransformerFactory.newXMLFilter to transform xml against a pipeline of stylesheets (See function testPipelineTransform in the example below). The process works okay, excepting that I cannot figure out how to detect errors in the transformation process.
    I would like to achieve the same result for the pipeline process as I would for a single transformation using javax.xml.transform.Transformer.setErrorListener. The example below demonstrates how the call to javax.xml.transform.Transformer.setErrorListener does not generate the same result when using org.xml.sax.XMLFilter as it does when using a single transformation.
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.SAXException;
    import org.xml.sax.InputSource;
    import org.xml.sax.XMLReader;
    import org.xml.sax.XMLFilter;
    import javax.xml.transform.ErrorListener;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.sax.SAXTransformerFactory;
    import javax.xml.transform.sax.SAXSource;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    import java.io.*;
    public class FilterChain {
        static private final String newline = System.getProperty("line.separator");
         public static void main(String argv[]) {
              System.out.println("Testing pipeline transform");
              testPipelineTransform();
              System.out.println("Testing single transform");
              testXsltSingleTransform();
         } // main
         static private void testPipelineTransform() {
              try {
                   // Set up the input stream
                   BufferedInputStream bis = new BufferedInputStream(
                             new ByteArrayInputStream(getExample().getBytes()));
                   InputSource input = new InputSource(bis);
                   // Set up to read the input file
                   SAXParserFactory spf = SAXParserFactory.newInstance();
                   SAXParser parser = spf.newSAXParser();
                   XMLReader reader = parser.getXMLReader();
                   // Create the filters
                   SAXTransformerFactory stf = (SAXTransformerFactory) TransformerFactory
                             .newInstance();
                   XMLFilter filter1 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet1())));
                   XMLFilter filter2 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet2())));
                   // Wire the output of the reader to filter1
                   // and the output of filter1 to filter2
                   filter1.setParent(reader);
                   filter2.setParent(filter1);
                   // Set up the output stream
                   StreamResult result = new StreamResult(System.out);
                   // Set up the transformer to process the SAX events generated
                   // by the last filter in the chain
                   Transformer transformer = stf.newTransformer();
                   transformer.setErrorListener(new ErrorListener() {
                        public void error(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Error");
                             System.out.println(te.getMessage());
                        public void fatalError(TransformerException te)
                                  throws TransformerException {
                             System.out
                                       .println("Transform generated Transform Fatal Error");
                             System.out.println(te.getMessage());
                        public void warning(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Warning");
                             System.out.println(te.getMessage());
                   SAXSource transformSource = new SAXSource(filter2, input);
                   transformer.transform(transformSource, result);
              } catch (TransformerConfigurationException tce) {
                   // Error generated by the parser
                   System.out.println("\n** Transformer Factory error");
                   System.out.println("   " + tce.getMessage());
                   // Use the contained exception, if any
                   Throwable x = tce;
                   if (tce.getException() != null)
                        x = tce.getException();
                   x.printStackTrace();
              } catch (TransformerException te) {
                   // Error generated by the parser
                   System.out.println("\n** Transformation error");
                   System.out.println("   " + te.getMessage());
                   // Use the contained exception, if any
                   Throwable x = te;
                   if (te.getException() != null)
                        x = te.getException();
                   x.printStackTrace();
              } catch (SAXException sxe) {
                   // Error generated by this application
                   // (or a parser-initialization error)
                   Exception x = sxe;
                   if (sxe.getException() != null)
                        x = sxe.getException();
                   x.printStackTrace();
              } catch (ParserConfigurationException pce) {
                   // Parser with specified options can't be built
                   pce.printStackTrace();
         static private void testXsltSingleTransform() {
              try {
                   BufferedInputStream bis = new BufferedInputStream(
                             new ByteArrayInputStream(getExample().getBytes()));
                   // Set up the output stream
                   StreamResult result = new StreamResult(System.out);
                   InputSource input = new InputSource(bis);
                   TransformerFactory factory = TransformerFactory.newInstance();
                   Source source = new StreamSource(new StringReader(getStylesheet2()));
                   Transformer stylesheet = factory.newTransformer(source);
                   stylesheet.setErrorListener(new ErrorListener() {
                        public void error(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Error");
                             System.out.println(te.getMessage());
                        public void fatalError(TransformerException te)
                                  throws TransformerException {
                             System.out
                                       .println("Transform generated Transform Fatal Error");
                             System.out.println(te.getMessage());
                        public void warning(TransformerException te)
                                  throws TransformerException {
                             System.out.println("Transform generated Transform Warning");
                             System.out.println(te.getMessage());
                   SAXSource transformSource = new SAXSource(input);
                   stylesheet.transform(transformSource, result);
              } catch (Exception exc) {
                   exc.printStackTrace();
         private static String getStylesheet1() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<xsl:stylesheet" + newline
                   + "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'" + newline
                   + "version='1.0'>" + newline
                   + "<xsl:output method='xml'/>" + newline
                   + "<xsl:template match='/'>" + newline
                   + "<DontCareAboutContent></DontCareAboutContent>" + newline
                   + "</xsl:template>" + newline
                   + "</xsl:stylesheet>" + newline;
         private static String getStylesheet2() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<xsl:stylesheet" + newline
                   + "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'" + newline
                   + "version='1.0'>" + newline
                   + "<xsl:output method='html'/>" + newline
                   + "<xsl:template match='/'>" + newline
                  + "<html><body>" + newline
                 + "<xsl:message>" + newline
                 + "Error Message for the xslt processor" + newline
                 + "</xsl:message>" + newline
                 + "Dont care about the xslt content," + newline
                 + "The only significant part is the xsl:message element" + newline
                 + "which results in a error to be handled by the xslt" + newline
                 + "processor" + newline
                   + "</body></html>" + newline
                   + "</xsl:template>" + newline
                   + "</xsl:stylesheet>" + newline;
         private static String getExample() {
              return
                     "<?xml version='1.0' encoding='ISO-8859-1'?>" + newline
                   + "<DontCareAboutContent>" + newline
                   + "</DontCareAboutContent>" + newline;
    }

    I made the following change which solves the problem but the sollution is tightly coupled to Xalan. If anyone has any ideas, I would still like to find a way to achieve the desired result using JAXP API's.
                   XMLFilter filter1 = stf.newXMLFilter(new StreamSource(new StringReader(getStylesheet1())));
                   if (filter1 instanceof org.apache.xalan.transformer.TrAXFilter) {
                        ((org.apache.xalan.transformer.TrAXFilter)filter1).getTransformer().setErrorListener(...);
    ...

  • Problem for using oracle xml parser v2 for 8.1.7

    My first posting was messed up. This is re-posting the same question.
    Problem for using oracle xml parser v2 for 8.1.7
    I have a sylesheet with
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">.
    It works fine if I refer this xsl file in xml file as follows:
    <?xml-stylesheet type="text/xsl" href="http://...../GN.xsl"?>.
    When I use this xsl in pl/sql package, I got
    ORA-20100: Error occurred while processing: XSL-1009: Attribute 'xsl:version' not found in 'xsl:stylesheet'.
    After I changed name space definition to
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> in xsl file, I got
    ORA-20100: Error occurred while processing: XSL-1019: Expected ']' instead of '$'.
    I am using xml parser v2 for 8.1.7
    Can anyone explain why it happens? What is the solution?
    Yi

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Steven Muench ([email protected]):
    Element's dont have text content, they [b]contain text node children.
    So instead of trying to setNodeValue() on the element, construct a Text node and use the appendChild method on the element to append the text node as a child of the element.<HR></BLOCKQUOTE>
    Steve,
    We are also creating an XML DOM from java and are having trouble getting the tags created as we want. When we use XMLText it creates the tag as <tagName/>value rather than <tagName>value</tagName>. We want separate open and close tags. Any ideas?
    Lori

  • When reading the Rich Text present in Excel column using open XML its taking it as plain text

    Hello All,
    When i am reading excel columns using open Xml in C# everything is working fine except the column that
    contain Rich Text (ex: bold, italic,color,size). Its reading the Rich Text content as plain text. As we know for Rich Text in open XML we get the text as Runs (C#
    object) which contains the text as value and rpr as run properties. I have also written the code to convert Runs to html. But the issue is that for some Rich Text format its reading it as Runs but most of the Rich Text its reading it as plain text.
    The issue i am getting is, for some rich text its creating RUN and for some of the rich text its not creatingRUN.
    Let me give the example for more understanding:
    Suppose i have two cells in excel which contains the below text.
    1. Rich Text
    1
    2. RichText
    2
    Now when i read these cells using the below code
    var stringTable =spreadsheetDocument.WorkbookPart.GetPartsOfType<SharedStringTablePart>().FirstOrDefault();
    if (stringTable.SharedStringTable.ElementAt(index1).ChildElements.GetItem(0).GetType().Name == "Run")
    Custom code to convert Rich text to HTML...
    else
    Read the plain text...
    Though both the cell contains rich text, one is going in RUN block and one is going in Plain text bloc.
    Also, one thing that i have noticed is when i use standard color for text its consider it as RUNS and when i use color apart from the standard color it does not consider it as RUNS. Same behavior occurs for different combination of text viz. bold, italic, underline
    etc

    Hi Ejaz,
    This forum is for software developers who are using the Open Specification documentation to assist them in developing systems, services, and applications that are interoperable with Microsoft products. The Open Specifications can be found at:
    http://msdn.microsoft.com/en-us/library/cc203350(PROT.10).aspx. Since your post does not appear to be related to the Open Specification documentation set, we would appreciate it if
    you could try to post your question in a more relevant forum. Thank you.
    Open XML Format SDK
    https://social.msdn.microsoft.com/Forums/en-US/home?forum=oxmlsdk&filter=alltypes&sort=lastpostdesc
    Josh Curry (jcurry) | Escalation Engineer | Open Specifications Support Team

  • Maven2 and axistools-maven-plugin - strange error

    Hi all,
    I am using maven2 for the build proccess and I get this strange error message while compiling.
    =========
    [INFO] Scanning for projects...
    [INFO] ----------------------------------------------------------------------------
    [INFO] Building Maven Quick Start Archetype
    [INFO] task-segment: [compile]
    [INFO] ----------------------------------------------------------------------------
    [INFO] ----------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ----------------------------------------------------------------------------
    [INFO] The plugin 'org.codehaus.mojo:axistools-maven-plugin' does not exist or no valid version could be found
    [INFO] ----------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ----------------------------------------------------------------------------
    [INFO] Total time: 1 second
    [INFO] Finished at: Mon Jan 30 08:45:42 GMT+02:00 2006
    [INFO] Final Memory: 1M/3M
    [INFO] ----------------------------------------------------------------------------
    =========
    The plugin defined in pom.xml is:
    ==========
                   <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>axistools-maven-plugin</artifactId>
                        <configuration>               <fileNStoPkg>${srcdir}/properties/namespaces2packages.properties</fileNStoPkg>
                             <serverSide>true</serverSide>
                        </configuration>
                        <executions>
                             <execution>
                                  <goals>
                                       <goal>wsdl2java</goal>
                                  </goals>
                             </execution>
                        </executions>
                   </plugin>
    ==========
    Any ideas guys?

    Sorry, forgot to paste the trace. Here it is now:
    [INFO] Trace
    org.apache.maven.lifecycle.LifecycleExecutionException: The plugin 'org.codehaus.mojo:axistools-maven-plugin' does not e
    xist or no valid version could be found
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1203)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.bindPluginToLifecycle(DefaultLifecycleExecutor.java:1139)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.constructLifecycleMappings(DefaultLifecycleExecutor.java:
    948)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:450)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.jav
    a:303)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
    Caused by: org.apache.maven.plugin.version.PluginVersionNotFoundException: The plugin 'org.codehaus.mojo:axistools-maven
    -plugin' does not exist or no valid version could be found
    at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.
    java:225)
    at org.apache.maven.plugin.version.DefaultPluginVersionManager.resolvePluginVersion(DefaultPluginVersionManager.
    java:87)
    at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:177)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.verifyPlugin(DefaultLifecycleExecutor.java:1174)
    ... 17 more
    [INFO] ----------------------------------------------------------------------------

  • Overriding web.xml using Plan.xml

    Hi,
    I want to override certain values (MAX_ROW_FETCH_SIZE)  in web.xml using Plan.xml for a servlet deployed on weblogic server.
    My web.xml looks like this.
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
             version="2.5">
      <servlet>
        <servlet-name>trial</servlet-name>
        <servlet-class>oracle.apps.cmi.sv.fwk.webui.trial</servlet-class>
        <init-param>
          <param-name>MAX_ROW_FETCH_SIZE</param-name>
          <param-value>50</param-value>
        </init-param>
        <init-param>
          <param-name>JDBC_MAX_FETCH_SIZE</param-name>
          <param-value>20</param-value>
        </init-param>
      </servlet>
      <servlet-mapping>
        <servlet-name>trial</servlet-name>
        <url-pattern>/trial</url-pattern>
      </servlet-mapping>
    </web-app>
    My Plan.xml looks like this
    <?xml version='1.0' encoding='UTF-8'?>
    <deployment-plan xmlns="http://xmlns.oracle.com/weblogic/deployment-plan" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/deployment-plan http://xmlns.oracle.com/weblogic/deployment-plan/1.0/deployment-plan.xsd">
      <application-name>SPUF</application-name>
      <variable-definition>
        <variable>
          <name>SessionDescriptor_timeoutSecs_13708393894780</name>
          <value>3602</value>
        </variable>
        <variable>
          <name>MAX_ROW_FETCH_SIZE</name>
          <value>3</value>
        </variable>
        <variable>
          <name>JDBC_MAX_FETCH_SIZE</name>
          <value>2</value>
        </variable>       
      </variable-definition>
      <module-override>
        <module-name>SPUF.war</module-name>
        <module-type>war</module-type>
        <module-descriptor external="false">
          <root-element>weblogic-web-app</root-element>
          <uri>WEB-INF/weblogic.xml</uri>
          <variable-assignment>
            <name>SessionDescriptor_timeoutSecs_13708393894780</name>
            <xpath>/weblogic-web-app/session-descriptor/timeout-secs</xpath>
          </variable-assignment>
        </module-descriptor>
        <module-descriptor external="false">
          <root-element>web-app</root-element>
          <uri>WEB-INF/web.xml</uri>
          <variable-assignment>
            <name>MAX_ROW_FETCH_SIZE</name>
            <xpath>/web-app/servlet/init-param/[param-name="MAX_ROW_FETCH_SIZE"]/param-value</xpath>
            <operation>replace</operation>
          </variable-assignment>
          <variable-assignment>
            <name>JDBC_MAX_FETCH_SIZE</name>
            <xpath>/web-app/servlet/init-param/[param-name="JDBC_MAX_FETCH_SIZE"]/param-value</xpath>
            <operation>replace</operation>
           </variable-assignment>                     
        </module-descriptor>
        <module-descriptor external="true">
          <root-element>wldf-resource</root-element>
          <uri>META-INF/weblogic-diagnostics.xml</uri>
        </module-descriptor>
      </module-override>
      <config-root>/home/oracle/ebssdk2</config-root>
    </deployment-plan>
    I can see new value reflected for "Session TimeOut" for service configuration.
    However when I use service to query certain data while considering "MAX_ROW_FETCH_SIZE" parameter, It is still querying 50 rows (Value in web.xml) at a time instead of 3 (As defined in Plan.xml)
    I am using servlet init method to get init parameters in my java file.
    Can someone help me to overcome from this issue or have any suggestion?

    You could use Apache Ant and create 2 separate WAR files , one for development and one for production.
    Normally I don't create a WAR file for the development environment. WAR file is made only for production.
    This is how my Ant task runs currently.
    1) For the development environment the ant task runs only to compile Java classes and nothing else, web.xml is that for development environment.
    2) When the app is ready for production , I run Ant to copy all files from my dev folder to a temporary build folder - during this copy I filter out the .java files (since there's no longer a need for them in production) only class files are moved.
    3) Then I treat the above temporary folder as the source folder, and run the Jasper pre-compiler which significantly alters the web.xml file .
    But the good part is that my original development web.xml stays unaltered since it is in it's own folder.
    4) Then finally I run a WAR task on the processed contents of the temporary build folder which contains the modified web.xml
    This way each environment has it's own web.xml .

  • Maven Plugin classpaths

    Any Maven gurus out there? (I can't send to the maven user mailing list at the moment for apparently DNS related reasons)
    In the interests of automating a build, I'm currently trying to hack
    the hibernate3-maven-plugin mojo so that it will accept a necessary
    configuration file from a JAR brought in as a dependency.
    The JAR contains a resource (hibernate.cfg.xml) in its root package,
    but no matter how I try, I can't seem to get the JAR to be on the
    plugin's classpath.
    The following (brutish) code should output the path to the file
    resource within the JAR when running. My code is definitely being
    invoked within the Maven task (changes to the system out are visible
    in Maven's generated output when running).
    final URL url = ClassLoader.getSystemResource("hibernate.cfg.xml");
    System.out.println("URL: "+url);Running within the Maven task the output is always
    URL: nullRunning as a testcase class with the dependency JAR on the classpath
    the output is something like:
    URL:
    jar:file:/C:/dev/apps/myapp-core/target/
    myapp-core-1.0-SNAPSHOT.jar!/hibernate.cfg.xmlSo it seems clear cut that this is a classpath problem. Presumably I'm
    trying to get the JAR onto the plugin's classpath in the wrong manner
    - how should I be doing this? Or is there some reason it can't be
    done? Or am I doing something else equally stupid wrong instead?
    Relevant trimmed snippet of the pom follows:
           <plugins>
               <plugin>
                   <groupId>org.codehaus.mojo</groupId>
                   <artifactId>hibernate3-maven-plugin</artifactId>
                   <version>2.0-alpha-3-SNAPSHOT</version>
                   <dependencies>
                       <dependency>
                           <groupId>my.group.id</groupId>
                           <artifactId>myapp-core</artifactId>
                           <version>1.0-SNAPSHOT</version>
                       </dependency>
                   </dependencies>
                   <configuration>
                       <components> ... </components>
                       <executions> ... <execution>
                       <componentProperties>
                           <configurationfile>
                               hibernate.cfg.xml
                           </configurationfile>
                       ... etc.

    I met a friend and M2 guru for beers last night, and presented the question to him. Unfortunately, our local brewpub serves 22 oz mugs, and I had four of them (not driving), so the details of his explanation are long gone. I do recall him saying that plugins do have their own classloader (which makes sense).
    But that's not the reason I'm replying :-)
    Assuming that the plugins combine the dependency classpath with their own classpath (which your experiments seem to indicate), then getting the context classloader is the right approach. Supposedly, it's how you should always get a classloader, particularly in a J2EE container, but I've never found a good explanation of why.

Maybe you are looking for