myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Wessendorf <mat...@apache.org>
Subject [Trinidad 2.0] little build problem (was Re: svn commit: r897038 - in /myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin: ./ src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ src/test/resources/META-INF/maven-faces-plug
Date Fri, 08 Jan 2010 07:48:12 GMT
Hello Andrew,

looks like the XML mess is now preventing Trinidad-CORE to build :-)

After I did "svn up" on the plugins 2.0.x-branch, I am getting the
below build exception.

Going back to the previous revision:
=> svn checkout -r 896615
https://svn.apache.org/repos/asf/myfaces/trinidad-maven/branches/2.0.x-branch/
.

It works again. Do you mind taking a look? The workaround (going to
rev 896615) is good enough for me,
though on long run we need this to be fixed :-) I think that the
pom.xml related changes are guilty for
the problem.

Thanks!
Matthias

Exception from "mvn clean install -e" call:


[INFO] [faces:generate-faces-config {execution: default}]
ERROR:  'Namespace for prefix 'trh' has not been declared.'
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error during generation

Embedded error: java.lang.RuntimeException: Namespace for prefix 'trh'
has not been declared.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error during generation
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
	at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
	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:597)
	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.MojoExecutionException: Error
during generation
	at org.apache.myfaces.trinidadbuild.plugin.faces.GenerateFacesConfigMojo.execute(GenerateFacesConfigMojo.java:227)
	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
	... 17 more
Caused by: javax.xml.transform.TransformerException:
java.lang.RuntimeException: Namespace for prefix 'trh' has not been
declared.
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:717)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:313)
	at org.apache.myfaces.trinidadbuild.plugin.faces.GenerateFacesConfigMojo.execute(GenerateFacesConfigMojo.java:187)
	... 19 more
Caused by: java.lang.RuntimeException: Namespace for prefix 'trh' has
not been declared.
	at com.sun.org.apache.xml.internal.serializer.SerializerBase.getNamespaceURI(SerializerBase.java:895)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:197)
	at com.sun.org.apache.xml.internal.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:277)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:243)
	at com.sun.org.apache.xml.internal.serializer.ToXMLSAXHandler.endElement(ToXMLSAXHandler.java:555)
	at GregorSamsa.topLevel()
	at GregorSamsa.transform()
	at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:602)
	at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:710)
	... 21 more










On Thu, Jan 7, 2010 at 11:36 PM,  <arobinson74@apache.org> wrote:
> Author: arobinson74
> Date: Thu Jan  7 22:36:12 2010
> New Revision: 897038
>
> URL: http://svn.apache.org/viewvc?rev=897038&view=rev
> Log:
> Add support for including XML files from inside the component-metadata portion of the
faces-config and added support for multiple event-name tags so that they can be imported and
later merged
>
> Modified:
>    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/pom.xml
>    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java
>    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java
>    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/test/resources/META-INF/maven-faces-plugin/components/trinidad/faces/Command.xml
>
> Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/pom.xml
> URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/pom.xml?rev=897038&r1=897037&r2=897038&view=diff
> ==============================================================================
> --- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/pom.xml (original)
> +++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/pom.xml Thu Jan  7
22:36:12 2010
> @@ -55,30 +55,23 @@
>     <dependency>
>       <groupId>commons-digester</groupId>
>       <artifactId>commons-digester</artifactId>
> -      <version>1.7</version>
> -    </dependency>
> -    <dependency>
> -      <groupId>saxon</groupId>
> -      <artifactId>saxon</artifactId>
> -      <version>6.5.3</version>
> -      <scope>runtime</scope>
> -    </dependency>
> -    <dependency>
> -      <groupId>xerces</groupId>
> -      <artifactId>xercesImpl</artifactId>
> -      <version>2.6.2</version>
> -      <scope>runtime</scope>
> -    </dependency>
> -    <dependency>
> -      <groupId>stax</groupId>
> -      <artifactId>stax-api</artifactId>
> -      <version>1.0.1</version>
> -    </dependency>
> -    <dependency>
> -      <groupId>stax</groupId>
> -      <artifactId>stax</artifactId>
> -      <version>1.2.0_rc2-dev</version>
> +      <version>1.8.1</version>
>     </dependency>
>   </dependencies>
>
> +  <build>
> +    <plugins>
> +      <plugin>
> +        <groupId>org.apache.myfaces.trinidadbuild</groupId>
> +        <artifactId>maven-jdev-plugin</artifactId>
> +        <configuration>
> +          <projectHasTests>true</projectHasTests>
> +          <testSourceRoots>
> +            <file>${project.basedir}/src/test</file>
> +          </testSourceRoots>
> +        </configuration>
> +      </plugin>
> +    </plugins>
> +  </build>
> +
>  </project>
>
> Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java
> URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java?rev=897038&r1=897037&r2=897038&view=diff
> ==============================================================================
> --- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java
(original)
> +++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/ComponentBean.java
Thu Jan  7 22:36:12 2010
> @@ -322,13 +322,21 @@
>
>   public void parseEventNames(String value)
>   {
> -    if (value == null)
> +    if (value != null)
>     {
> -      _eventNames = null;
> -    }
> -    else
> -    {
> -      _eventNames = value.trim().split("\\s+");
> +      String[] names = value.trim().split("\\s+");
> +      // combine event names if given more than once (to make importing from another
XML file more easy)
> +      if (_eventNames == null)
> +      {
> +        _eventNames = names;
> +      }
> +      else
> +      {
> +        String[] currEventNames = _eventNames;
> +        _eventNames = new String[_eventNames.length + names.length];
> +        System.arraycopy(currEventNames, 0, _eventNames, 0, currEventNames.length);
> +        System.arraycopy(names, 0, _eventNames, currEventNames.length, names.length);
> +      }
>     }
>   }
>
>
> Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java
> URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java?rev=897038&r1=897037&r2=897038&view=diff
> ==============================================================================
> --- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java
(original)
> +++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/parse/FacesConfigParser.java
Thu Jan  7 22:36:12 2010
> @@ -84,7 +84,7 @@
>     SAXParserFactory spf = SAXParserFactory.newInstance();
>     spf.setNamespaceAware(true);
>     // requires JAXP 1.3, in JavaSE 5.0
> -    // spf.setXIncludeAware(true);
> +    //spf.setXIncludeAware(true);
>     Digester digester = new Digester(spf.newSAXParser());
>     digester.setNamespaceAware(true);
>
> @@ -229,6 +229,10 @@
>                               ComponentIncludeFactory.class);
>     digester.addFactoryCreate("faces-config/component/property/include",
>                               ComponentPropertyIncludeFactory.class);
> +    digester.addFactoryCreate("faces-config/component/component-extension/include",
> +                              ComponentIncludeFactory.class);
> +    digester.addFactoryCreate("faces-config/component/component-extension/component-metadata/include",
> +                              ComponentIncludeFactory.class);
>   }
>
>   // Add component property-related digster rules
>
> Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/test/resources/META-INF/maven-faces-plugin/components/trinidad/faces/Command.xml
> URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/test/resources/META-INF/maven-faces-plugin/components/trinidad/faces/Command.xml?rev=897038&r1=897037&r2=897038&view=diff
> ==============================================================================
> --- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/test/resources/META-INF/maven-faces-plugin/components/trinidad/faces/Command.xml
(original)
> +++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/test/resources/META-INF/maven-faces-plugin/components/trinidad/faces/Command.xml
Thu Jan  7 22:36:12 2010
> @@ -16,35 +16,35 @@
>     KIND, either express or implied.  See the License for the
>     specific language governing permissions and limitations
>     under the License.
> -
> +
>  -->
>  <faces-config xmlns="http://java.sun.com/xml/ns/javaee"
>               xmlns:af="http://myfaces.apache.org/trinidad"
>               xmlns:xi="http://www.w3.org/2001/XInclude"
>               xmlns:md="http://myfaces.apache.org/bali/xml/metadata"
> -              xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin" >
> +              xmlns:mfp="http://myfaces.apache.org/maven-faces-plugin">
> +
> +  <component>
>
> -  <component>
> -
>     <component-type>org.apache.myfaces.trinidad.Command</component-type>
>     <component-class>org.apache.myfaces.trinidad.component.UIXCommand</component-class>
>
>     <description>
>       A base abstraction for components that implement ActionSource.
>     </description>
> -
> +
>     <xi:include href="TestInclude.xml" xpointer="/faces-config/component/*"></xi:include>
>
>     <property>
>       <property-name>action</property-name>
>       <property-class>javax.faces.el.MethodBinding</property-class>
>       <description><![CDATA[
> -
> +
>           The reference to the Java method that will be invoked when
>           an ActionEvent is broadcast by this component. The method
>           signature takes a single ActionEvent parameter and returns
>           void.
> -
> +
>           Test to make sure that markup in a pre block is escaped.
>           <pre>
>             <af:commandButton />
> @@ -53,7 +53,7 @@
>             <af:commandButton />
>           </pre>
>
> -      ]]>
> +      ]]>
>       </description>
>       <property-extension>
>         <mfp:state-holder>true</mfp:state-holder>
> @@ -70,12 +70,12 @@
>       <property-name>actionListener</property-name>
>       <property-class>javax.faces.el.MethodBinding</property-class>
>       <description><![CDATA[
> -
> +
>           The reference to the Java method that will be invoked when
>           an ActionEvent is broadcast by this component.  The method
>           signature takes a single ActionEvent parameter and returns
>           void.
> -      ]]>
> +      ]]>
>       </description>
>       <property-extension>
>         <mfp:state-holder>true</mfp:state-holder>
> @@ -110,11 +110,11 @@
>     <property>
>       <property-name>immediate</property-name>
>       <property-class>boolean</property-class>
> -      <description>a reference to an action method sent by the command component,
> -           or the static outcome of an action.  When immediate is true, the
> -           default ActionListener provided by the JavaServer Faces implementation
> -           should be executed during Apply Request Values phase of the request
> -           processing lifecycle, rather than waiting until the Invoke Application
> +      <description>a reference to an action method sent by the command component,
> +           or the static outcome of an action.  When immediate is true, the
> +           default ActionListener provided by the JavaServer Faces implementation
> +           should be executed during Apply Request Values phase of the request
> +           processing lifecycle, rather than waiting until the Invoke Application
>            phase.
>       </description>
>       <property-extension>
> @@ -123,11 +123,11 @@
>     </property>
>
>     <property>
> -      <description><![CDATA[the visibility of the component.  If it is
"false", the component will
> -      be hidden on the client.  Unlike "rendered", this does not affect the lifecycle
on the server
> -      - the component may have its bindings executed, etc. - and the visibility of
the component can
> -      be toggled on and off on the client, or toggled with PPR.  When "rendered"
is false, the
> -      component will not in any way be rendered, and cannot be made visible on the
client.
> +      <description><![CDATA[the visibility of the component.  If it is
"false", the component will
> +      be hidden on the client.  Unlike "rendered", this does not affect the lifecycle
on the server
> +      - the component may have its bindings executed, etc. - and the visibility of
the component can
> +      be toggled on and off on the client, or toggled with PPR.  When "rendered"
is false, the
> +      component will not in any way be rendered, and cannot be made visible on the
client.
>       In most cases, use the "rendered" property instead of the "visible" property.]]>
>       </description>
>       <property-name>visible</property-name>
> @@ -137,7 +137,7 @@
>         <mfp:required>false</mfp:required>
>         <mfp:unsupported-render-kits>org.apache.myfaces.trinidad.core</mfp:unsupported-render-kits>
>         <mfp:property-metadata>
> -          <mfp:deprecated>The "visible" attribute has been deprecated.
> +          <mfp:deprecated>The "visible" attribute has been deprecated.
>             Use the af:showPopupBehavior tag or the show/hide methods on the popup
client component.
>           </mfp:deprecated>
>           <mfp:no-op/>
>
>
>



-- 
Matthias Wessendorf

blog: http://matthiaswessendorf.wordpress.com/
sessions: http://www.slideshare.net/mwessendorf
twitter: http://twitter.com/mwessendorf

Mime
View raw message