You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Chan, Charles" <Ch...@CIBC.ca> on 2003/01/15 18:53:19 UTC

RE: [maven-bug] New comment: (MAVEN-204) xdoc don't honor user UI preferences

Yes, I would like to submit a patch. My idea is the following:

if (user's properties is not empty)
{
  use user's properties
}
else
{
  use plugin.dir/ui.properties
}

But I don't know how to get user's properties from jelly. I know I can do
"${maven.ui.banner.background}" but what I need is variable interpolation:

${${variable_name}} where ${variable_name} = "maven.ui.banner.background"

Also, if the empty() function won't work with dotted variable names, we'll
be out of luck.

Charles


-----Original Message-----
From: bob@werken.com [mailto:bob@werken.com]
Sent: Wednesday, January 15, 2003 9:00 AM
To: turbine-maven-dev@jakarta.apache.org
Subject: [maven-bug] New comment: (MAVEN-204) xdoc don't honor user UI
preferences


The following comment has been added to this issue:

     Author: dion gillard
    Created: Wed, 15 Jan 2003 7:59 AM
       Body:
A patch showing your preferred solution would help.
---------------------------------------------------------------------
View the issue:

  http://jira.werken.com/secure/ViewIssue.jspa?key=MAVEN-204


Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-204
    Summary: xdoc don't honor user UI preferences
       Type: Bug

     Status: Assigned
   Priority: Major

 Time Spent: Unknown
   Estimate: 0 minutes

    Project: maven
  Component: plugin-xdoc
   Versions:
             1.0-beta-8

   Assignee: Jason van Zyl
   Reporter: Charles Chan

    Created: Tue, 14 Jan 2003 3:29 PM
    Updated: Tue, 14 Jan 2003 3:29 PM
Environment: NT

Description:
Looks like xdoc no longer honor my preferences...  In the following code
(extracted from xdoc), properties are taken from ${plugin.dir}/ui.properties

  <util:properties uri="file:${plugin.dir}/ui.properties"
var="uiProperties"/>
  <!-- Copy maven supplied stylesheets.  -->
    <copy todir="${maven.docs.dest}/style" overwrite="yes" filtering="yes">
      <filterset>
        <j:forEach var="uiProperty" items="${uiProperties.keys()}">
          <util:replace var="token" oldChar="." newChar="_"
value="${uiProperty}"/>
          <j:set var="token" value="${token.substring(6).toUpperCase()}"/>
          <filter token="${token}"
value="${uiProperties.getProperty(uiProperty)}"/>
        </j:forEach>
      </filterset>
      <fileset dir="${plugin.dir}/css">
        <include name="**/*.css"/>
      </fileset>
    </copy>

There is no way to override that.

Charles




---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://jira.werken.com/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>

RE: [maven-bug] New comment: (MAVEN-204) xdoc don't honor user UI preferences

Posted by di...@multitask.com.au.
"Chan, Charles" <Ch...@CIBC.ca> wrote on 16/01/2003 04:53:19 AM:

> Yes, I would like to submit a patch. My idea is the following:
> 
> if (user's properties is not empty)
> {
>   use user's properties
> }
> else
> {
>   use plugin.dir/ui.properties
> }
> 
> But I don't know how to get user's properties from jelly. I know I can 
do
> "${maven.ui.banner.background}" but what I need is variable 
interpolation:
> 
> ${${variable_name}} where ${variable_name} = 
"maven.ui.banner.background"
<j:set var="variable_name" value="${maven.ui.banner.background}" />
<j:set var="value" value="${context.getVariable(variable_name)}"/>

Is how you'd do it.

> Also, if the empty() function won't work with dotted variable names, 
we'll
> be out of luck.
Use ${context.getVariable(variable_name) != null} instead.

> Charles
does that help? 
--
dIon Gillard, Multitask Consulting
Blog:      http://www.freeroller.net/page/dion/Weblog
Work:      http://www.multitask.com.au