You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Thorsten Scherler <th...@apache.org> on 2007/05/14 23:33:02 UTC

Re: [jira] Commented: (SOLR-238) [Patch] The tutorial on our website is against trunk which causes confusion by user

On Mon, 2007-05-14 at 11:20 -0700, Hoss Man (JIRA) wrote:
> [ https://issues.apache.org/jira/browse/SOLR-238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495706 ] 
> 
> Hoss Man commented on SOLR-238:
> -------------------------------
> 
> Thorsten ... thanks for the prod on this issue.  One thing that makes this tricky is that the tutorial (and the entire website) are bundled with every release ... that's why we keep the site up to date with the trunk, so that people can review the docs as time goes on, but when a release is cut people using that release should refer to the docs that come with it.
> 
> I'm not very knowledgeable in forest, do you (or anyone else watching this issue) know if there is an easy way to do variable substitution into the generated docs when they are build using property files (or something like it)
> 
> Then the docs could always contain the current Solr spec version number when the tutorial is regenerated (for official releases, the spec version number looks like 1.1, 1.2, etc... for nightly builds it looks like 1.1.2007.05.11.10.10.53 -- the last official version number followed by the current datetime)

Well the quickest way certainly is changing the skinconf.xml by hand.
However that will not be possible in the use-cases you describe (for
nightly builds).

For this case you would need something more sophisticated. 

To understand it right you would like to build the site with forrest and
in the build appears the version number and the name of the dis (ant
property ${fullnamever}) of the tutorial.

In the solr build.xml we define:
<!-- make a distribution -->
  <target name="package"
          description="Packages the Solr Distribution files and
Documentation."
          depends="dist, example, javadoc">

    <copy todir="${build.docs}">
      <fileset dir="site" />
    </copy>
...
  </target>

One idea was for me to use a filter with the copy task that e.g.
@fullnamever@ will be substitute with ${fullnamever}. The problem is
that would not be substituted then on the live website.

One could replace http://wiki.apache.org/solr/Website_Update_HOWTO step
2 of "Website update steps" with a target that is doing the filtering
for you. Then in "forrest run" you would find @fullnamever@ but after
building the site and using the copy target with filtering true you have
the variable substituted. The problem is that the nightly builds would
need to build as well the documentation with forrest. Letting forrest do
the substitution and import forrest targets into the solr build.xml is a
similar approach but then you have an even bigger dependency on forrest.

I need to think about it but maybe meanwhile somebody on forrest-dev
(which I cc) has an idea.

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


using xml entities for string replacement

Posted by David Crossley <cr...@apache.org>.
Thorsten Scherler wrote:
> David Crossley wrote:
> > Chris Hostetter wrote:
> ...
> > > that's why i was hoping forrest had a variable substitution mechanism
> > > built into it that could just read from some file that we have ant
> > > generate.
> ...
> > > is there something like that in forrest?
> > 
> > There is a facility for "XML Entities" ...
> > 
> > http://forrest.apache.org/faq.html#xml-entities
> > which refers to a demo and explanation in the 'forrest seed'
> > http://forrest.zones.apache.org/ft/build/forrest-seed/samples/xml-entities.html
> > 
> > Get your Ant to create the file "symbols-project-v10.ent"
> > on each nightly run.
> 
> Thanks David.
> 
> That is actually a really nice way and IMO the cleanest solution. I
> changed the patch to do exactly what David is recommending.
> 
> https://issues.apache.org/jira/browse/SOLR-238

That is good to hear.

-David

Re: [jira] Commented: (SOLR-238) [Patch] The tutorial on our website is against trunk which causes confusion by user

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Tue, 2007-05-15 at 11:04 +1000, David Crossley wrote:
> Chris Hostetter wrote:
...
> > that's why i was hoping forrest had a variable substitution mechanism
> > built into it that could just read from some file that we have ant
> > generate.
...
> > is there something like that in forrest?
> 
> There is a facility for "XML Entities" ...
> 
> http://forrest.apache.org/faq.html#xml-entities
> which refers to a demo and explanation in the 'forrest seed'
> http://forrest.zones.apache.org/ft/build/forrest-seed/samples/xml-entities.html
> 
> Get your Ant to create the file "symbols-project-v10.ent"
> on each nightly run.
> 
> -David

Thanks David.

That is actually a really nice way and IMO the cleanest solution. I
changed the patch to do exactly what David is recommending.

https://issues.apache.org/jira/browse/SOLR-238

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: [jira] Commented: (SOLR-238) [Patch] The tutorial on our website is against trunk which causes confusion by user

Posted by Thorsten Scherler <th...@juntadeandalucia.es>.
On Tue, 2007-05-15 at 11:04 +1000, David Crossley wrote:
> Chris Hostetter wrote:
...
> > that's why i was hoping forrest had a variable substitution mechanism
> > built into it that could just read from some file that we have ant
> > generate.
...
> > is there something like that in forrest?
> 
> There is a facility for "XML Entities" ...
> 
> http://forrest.apache.org/faq.html#xml-entities
> which refers to a demo and explanation in the 'forrest seed'
> http://forrest.zones.apache.org/ft/build/forrest-seed/samples/xml-entities.html
> 
> Get your Ant to create the file "symbols-project-v10.ent"
> on each nightly run.
> 
> -David

Thanks David.

That is actually a really nice way and IMO the cleanest solution. I
changed the patch to do exactly what David is recommending.

https://issues.apache.org/jira/browse/SOLR-238

salu2
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Re: [jira] Commented: (SOLR-238) [Patch] The tutorial on our website is against trunk which causes confusion by user

Posted by David Crossley <cr...@apache.org>.
Chris Hostetter wrote:
> 
> : To understand it right you would like to build the site with forrest and
> : in the build appears the version number and the name of the dis (ant
> : property ${fullnamever}) of the tutorial.
> 
> actually, i was just wondering about generic property replacement when
> converting from the raw source docs to the HTML/PDF docs using a proeprty
> file ... i was assuming this file could be generated by the build.xml --
> so even if ant isn't what kicks off forrest (we currently don't have it
> setup that way) forrest would load the key/value mappings from a property file
> generated by the last ant build.
> 
> : One idea was for me to use a filter with the copy task that e.g.
> : @fullnamever@ will be substitute with ${fullnamever}. The problem is
> : that would not be substituted then on the live website.
> 
> the live site is currently upated manually by developers, anytime a change
> is commited to the site dir ... so we can make sure the site is updated
> anytime it needs to be if there is a simple process.  but in general i'm
> not excited by the prospect of solving this problem using an ant copy
> filter because that doesn't help when deves are previewing how the site
> will look using forrest, as you say ...
> 
> : One could replace http://wiki.apache.org/solr/Website_Update_HOWTO step
> : 2 of "Website update steps" with a target that is doing the filtering
> : for you. Then in "forrest run" you would find @fullnamever@ but after
> : building the site and using the copy target with filtering true you have
> : the variable substituted. The problem is that the nightly builds would
> 
> that's why i was hoping forrest had a variable substitution mechanism
> built into it that could just read from some file that we have ant
> generate.
> 
> : need to build as well the documentation with forrest. Letting forrest do
> : the substitution and import forrest targets into the solr build.xml is a
> : similar approach but then you have an even bigger dependency on forrest.
> 
> as i say, i don't think the build.xml needs to depend on Solr (the nightly
> builds don't currently regen the site) ... we just need the build.xml to
> produce a property file or something like it (easy to do) and we need
> forrest to read that file and fill in variables with the values it finds.
> 
> is there something like that in forrest?

There is a facility for "XML Entities" ...

http://forrest.apache.org/faq.html#xml-entities
which refers to a demo and explanation in the 'forrest seed'
http://forrest.zones.apache.org/ft/build/forrest-seed/samples/xml-entities.html

Get your Ant to create the file "symbols-project-v10.ent"
on each nightly run.

-David

Re: [jira] Commented: (SOLR-238) [Patch] The tutorial on our website is against trunk which causes confusion by user

Posted by Chris Hostetter <ho...@fucit.org>.
: To understand it right you would like to build the site with forrest and
: in the build appears the version number and the name of the dis (ant
: property ${fullnamever}) of the tutorial.

actually, i was just wondering about generic property replacement when
converting from the raw source docs to the HTML/PDF docs using a proeprty
file ... i was assuming this file could be generated by the build.xml --
so even if ant isn't what kicks off forrest (we currently don't have it
setup that way) forrest would load the key/value mappings from a property file
generated by the last ant build.

: One idea was for me to use a filter with the copy task that e.g.
: @fullnamever@ will be substitute with ${fullnamever}. The problem is
: that would not be substituted then on the live website.

the live site is currently upated manually by developers, anytime a change
is commited to the site dir ... so we can make sure the site is updated
anytime it needs to be if there is a simple process.  but in general i'm
not excited by the prospect of solving this problem using an ant copy
filter because that doesn't help when deves are previewing how the site
will look using forrest, as you say ...

: One could replace http://wiki.apache.org/solr/Website_Update_HOWTO step
: 2 of "Website update steps" with a target that is doing the filtering
: for you. Then in "forrest run" you would find @fullnamever@ but after
: building the site and using the copy target with filtering true you have
: the variable substituted. The problem is that the nightly builds would

that's why i was hoping forrest had a variable substitution mechanism
built into it that could just read from some file that we have ant
generate.

: need to build as well the documentation with forrest. Letting forrest do
: the substitution and import forrest targets into the solr build.xml is a
: similar approach but then you have an even bigger dependency on forrest.

as i say, i don't think the build.xml needs to depend on Solr (the nightly
builds don't currently regen the site) ... we just need the build.xml to
produce a property file or something like it (easy to do) and we need
forrest to read that file and fill in variables with the values it finds.

is there something like that in forrest?



-Hoss


Re: [jira] Commented: (SOLR-238) [Patch] The tutorial on our website is against trunk which causes confusion by user

Posted by Chris Hostetter <ho...@fucit.org>.
: To understand it right you would like to build the site with forrest and
: in the build appears the version number and the name of the dis (ant
: property ${fullnamever}) of the tutorial.

actually, i was just wondering about generic property replacement when
converting from the raw source docs to the HTML/PDF docs using a proeprty
file ... i was assuming this file could be generated by the build.xml --
so even if ant isn't what kicks off forrest (we currently don't have it
setup that way) forrest would load the key/value mappings from a property file
generated by the last ant build.

: One idea was for me to use a filter with the copy task that e.g.
: @fullnamever@ will be substitute with ${fullnamever}. The problem is
: that would not be substituted then on the live website.

the live site is currently upated manually by developers, anytime a change
is commited to the site dir ... so we can make sure the site is updated
anytime it needs to be if there is a simple process.  but in general i'm
not excited by the prospect of solving this problem using an ant copy
filter because that doesn't help when deves are previewing how the site
will look using forrest, as you say ...

: One could replace http://wiki.apache.org/solr/Website_Update_HOWTO step
: 2 of "Website update steps" with a target that is doing the filtering
: for you. Then in "forrest run" you would find @fullnamever@ but after
: building the site and using the copy target with filtering true you have
: the variable substituted. The problem is that the nightly builds would

that's why i was hoping forrest had a variable substitution mechanism
built into it that could just read from some file that we have ant
generate.

: need to build as well the documentation with forrest. Letting forrest do
: the substitution and import forrest targets into the solr build.xml is a
: similar approach but then you have an even bigger dependency on forrest.

as i say, i don't think the build.xml needs to depend on Solr (the nightly
builds don't currently regen the site) ... we just need the build.xml to
produce a property file or something like it (easy to do) and we need
forrest to read that file and fill in variables with the values it finds.

is there something like that in forrest?



-Hoss