You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Reinhard Poetz <re...@apache.org> on 2007/09/20 11:17:02 UTC
Javadocs
I also use this release to publish our docs. I wonder now whether I should add
the Javadocs to our docs or not. For the spring-configurator and and
configuration-api I've added them because they are subprojects but I'm not sure
if it is the best idea to add the javadocs of our core modules and the blocks to
SVN either. The problem is that they take up a lot of space and make a checkout
of our site really slow.
OTOH if we don't generate them using Maven and then add them to our SVN I don't
know how we can do it in a confortable way.
Any ideas or opinions?
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
Re: Javadocs
Posted by Reinhard Poetz <re...@apache.org>.
Vadim Gritsenko wrote:
> Reinhard Poetz wrote:
>> But now I run into another problem: When I use the find/xargs command,
>> the working directory is the directory where I entered this command
>> and not the directory where the create-apidocs.sh script is located.
>> Is there a way to set the working directory the way I have expected it?
>
> Yep. Put this script say in your home dir, name it 'x.sh' and make it
> executable:
>
> #!/bin/sh
> cd `dirname $1`
> # Both "sh $1" and ". $1" should work
> . $1
>
> From your home dir (where x.sh is):
>
> find /x1/www/cocoon.apache.org/2.2 -name "create-apidocs.sh" | grep
> apidocs/ | xargs -n 1 ./x.sh
>
thanks, works like a charm!
> Alternatively you can put cd `dirname $1` in each of create-apidocs.sh
> but I figured you'd want to avoid this :)
:-)
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
Re: Javadocs
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Reinhard Poetz wrote:
> But now I run into another problem: When I use the find/xargs command,
> the working directory is the directory where I entered this command and
> not the directory where the create-apidocs.sh script is located. Is
> there a way to set the working directory the way I have expected it?
Yep. Put this script say in your home dir, name it 'x.sh' and make it executable:
#!/bin/sh
cd `dirname $1`
# Both "sh $1" and ". $1" should work
. $1
From your home dir (where x.sh is):
find /x1/www/cocoon.apache.org/2.2 -name "create-apidocs.sh" | grep apidocs/
| xargs -n 1 ./x.sh
Alternatively you can put cd `dirname $1` in each of create-apidocs.sh but I
figured you'd want to avoid this :)
Vadim
Re: Javadocs
Posted by Reinhard Poetz <re...@apache.org>.
Vadim Gritsenko wrote:
> Reinhard Poetz wrote:
>> thanks. The command seems to work but I have a problem to execute the
>> script because David is the owner and neither chown nor chmod are
>> permitted using my account:
>>
>> /x1/www/cocoon.apache.org/2.2/core-modules/pipeline-api/1.0/apidocs
>> > ls -lsa
>> total 14
>> 2 drwxrwxr-x 3 crossley cocoon 512 Sep 26 17:08 .
>> 2 drwxrwxr-x 6 crossley cocoon 512 Sep 26 17:08 ..
>> 2 drwxrwxr-x 6 crossley cocoon 512 Sep 27 14:33 .svn
>> 2 -rw-rw-r-- 1 crossley cocoon 581 Sep 26 17:08 create-apidocs.sh
>
> You don't need chmod/chown; permissions are looking fine as it is. But
> when I try to run it, I get an error:
>
> vgritsenko@minotaur
> /x1/www/cocoon.apache.org/2.2/core-modules/pipeline-api/1.0/apidocs $
> bash create-apidocs.sh
> ----------------------------------------------------------------
> Creating JavaDocs for cocoon-pipeline-api:1.0.0-RC2
> create-apidocs.sh: line 9: syntax error near unexpected token `else'
> create-apidocs.sh: line 9: `else'
>
>
> When I fixed both if/then/else:
>
> if [ ! -f $f ]
> then
> wget --header "User-Agent: Mozilla/5.0 Firefox/2.0.0.7"
> http://repo1.maven.org/maven2/$jd
> dl=1
> fi
This seems to be subtle difference between shell script interpreters:
find . -name "create-apidocs.sh" | grep apidocs | xargs sh
works fine without having to change the if/then/else syntax.
But now I run into another problem: When I use the find/xargs command, the
working directory is the directory where I entered this command and not the
directory where the create-apidocs.sh script is located. Is there a way to set
the working directory the way I have expected it?
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
Re: Javadocs
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Reinhard Poetz wrote:
> thanks. The command seems to work but I have a problem to execute the
> script because David is the owner and neither chown nor chmod are
> permitted using my account:
>
> /x1/www/cocoon.apache.org/2.2/core-modules/pipeline-api/1.0/apidocs
> > ls -lsa
> total 14
> 2 drwxrwxr-x 3 crossley cocoon 512 Sep 26 17:08 .
> 2 drwxrwxr-x 6 crossley cocoon 512 Sep 26 17:08 ..
> 2 drwxrwxr-x 6 crossley cocoon 512 Sep 27 14:33 .svn
> 2 -rw-rw-r-- 1 crossley cocoon 581 Sep 26 17:08 create-apidocs.sh
You don't need chmod/chown; permissions are looking fine as it is. But when I
try to run it, I get an error:
vgritsenko@minotaur
/x1/www/cocoon.apache.org/2.2/core-modules/pipeline-api/1.0/apidocs $ bash
create-apidocs.sh
----------------------------------------------------------------
Creating JavaDocs for cocoon-pipeline-api:1.0.0-RC2
create-apidocs.sh: line 9: syntax error near unexpected token `else'
create-apidocs.sh: line 9: `else'
When I fixed both if/then/else:
if [ ! -f $f ]
then
wget --header "User-Agent: Mozilla/5.0 Firefox/2.0.0.7"
http://repo1.maven.org/maven2/$jd
dl=1
fi
It was working fine:
vgritsenko@minotaur
/x1/www/cocoon.apache.org/2.2/core-modules/pipeline-api/1.0/apidocs $ bash
create-apidocs.sh
----------------------------------------------------------------
Creating JavaDocs for cocoon-pipeline-api:1.0.0-RC2
--15:33:08--
http://repo1.maven.org/maven2/org/apache/cocoon/cocoon-pipeline-api/1.0.0-RC2/cocoon-pipeline-api-1.0.0-RC2-javadoc.jar
=> `cocoon-pipeline-api-1.0.0-RC2-javadoc.jar'
Resolving repo1.maven.org... 63.246.20.112
Connecting to repo1.maven.org|63.246.20.112|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
15:33:08 ERROR 404: Not Found.
--15:33:08--
http://people.apache.org/builds/cocoon/org/apache/cocoon/cocoon-pipeline-api/1.0.0-RC2/cocoon-pipeline-api-1.0.0-RC2-javadoc.jar
=> `cocoon-pipeline-api-1.0.0-RC2-javadoc.jar'
Resolving people.apache.org... 140.211.11.9
Connecting to people.apache.org|140.211.11.9|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 362,072 (354K) [application/java-archive]
100%[=======================================================================================================================================>]
362,072 --.--K/s
15:33:08 (41.75 MB/s) - `cocoon-pipeline-api-1.0.0-RC2-javadoc.jar' saved
[362072/362072]
vgritsenko@minotaur
/x1/www/cocoon.apache.org/2.2/core-modules/pipeline-api/1.0/apidocs $ ls
META-INF/ help-doc.html
overview-tree.html
allclasses-frame.html index-all.html
package-list
allclasses-noframe.html index.html
packages
cocoon-pipeline-api-1.0.0-RC2-javadoc.jar options
packages.html
constant-values.html org/
resources/
create-apidocs.sh overview-frame.html
serialized-form.html
deprecated-list.html overview-summary.html
stylesheet.css
Vadim
Re: Javadocs
Posted by Reinhard Poetz <re...@apache.org>.
Vadim Gritsenko wrote:
> Reinhard Poetz wrote:
>> Vadim Gritsenko wrote:
>>> Reinhard Poetz wrote:
>>>> Could somebody help me with an additional script which recursivly
>>>> scans for the download scripts, sets the "x" attribute on the file
>>>> and executes it then?
>>>
>>> Sure; what's the script name / name pattern?
>>
>> It will be located in apidocs/create-apidocs.sh
>
> This will do it:
>
> find . -name "create-apidocs.sh" | grep apidocs | xargs bash
thanks. The command seems to work but I have a problem to execute the script
because David is the owner and neither chown nor chmod are permitted using my
account:
/x1/www/cocoon.apache.org/2.2/core-modules/pipeline-api/1.0/apidocs
> ls -lsa
total 14
2 drwxrwxr-x 3 crossley cocoon 512 Sep 26 17:08 .
2 drwxrwxr-x 6 crossley cocoon 512 Sep 26 17:08 ..
2 drwxrwxr-x 6 crossley cocoon 512 Sep 27 14:33 .svn
2 -rw-rw-r-- 1 crossley cocoon 581 Sep 26 17:08 create-apidocs.sh
6 -rw-rw-r-- 1 crossley cocoon 5385 Sep 26 17:08 index.html
(When I copy the script into my home directory, it works fine.)
Can anybody help?
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
Re: Javadocs
Posted by Giacomo Pati <gi...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vadim Gritsenko wrote:
> Giacomo Pati wrote:
>> Vadim Gritsenko wrote:
>>> Reinhard Poetz wrote:
>>>> It will be located in apidocs/create-apidocs.sh
>>> This will do it:
>>>
>>> find . -name "create-apidocs.sh" | grep apidocs | xargs bash
>>
>> Well, the grep wouldn't do anything helpfull, right ;-)
>
> Just to enforce a contract :)
Oh, that's a good answer ;-)
- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.6 (GNU/Linux)
iD8DBQFG962NLNdJvZjjVZARAr5wAJ4qIj3cCXDE3EE4GzRj/p2aqOoIGwCfW8LS
LejiXOsVp1r7S4EVfr+z2oY=
=iSys
-----END PGP SIGNATURE-----
Re: Javadocs
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Giacomo Pati wrote:
> Vadim Gritsenko wrote:
>> Reinhard Poetz wrote:
>>> It will be located in apidocs/create-apidocs.sh
>> This will do it:
>>
>> find . -name "create-apidocs.sh" | grep apidocs | xargs bash
>
> Well, the grep wouldn't do anything helpfull, right ;-)
Just to enforce a contract :)
Vadim
Re: Javadocs
Posted by Giacomo Pati <gi...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vadim Gritsenko wrote:
> Reinhard Poetz wrote:
>> Vadim Gritsenko wrote:
>>> Reinhard Poetz wrote:
>>>> Could somebody help me with an additional script which recursivly
>>>> scans for the download scripts, sets the "x" attribute on the file
>>>> and executes it then?
>>>
>>> Sure; what's the script name / name pattern?
>>
>> It will be located in apidocs/create-apidocs.sh
>
> This will do it:
>
> find . -name "create-apidocs.sh" | grep apidocs | xargs bash
Well, the grep wouldn't do anything helpfull, right ;-)
- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.6 (GNU/Linux)
iD8DBQFG927aLNdJvZjjVZARAg00AKDCHpD11kXEFyaka1qdjcDR/5O9XgCfUprn
6+nVq0q8xB0vvj68OeQey0U=
=APMB
-----END PGP SIGNATURE-----
Re: Javadocs
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Reinhard Poetz wrote:
> Vadim Gritsenko wrote:
>> Reinhard Poetz wrote:
>>> Could somebody help me with an additional script which recursivly
>>> scans for the download scripts, sets the "x" attribute on the file
>>> and executes it then?
>>
>> Sure; what's the script name / name pattern?
>
> It will be located in apidocs/create-apidocs.sh
This will do it:
find . -name "create-apidocs.sh" | grep apidocs | xargs bash
Vadim
Re: Javadocs
Posted by Reinhard Poetz <re...@apache.org>.
Vadim Gritsenko wrote:
> Reinhard Poetz wrote:
>> Could somebody help me with an additional script which recursivly
>> scans for the download scripts, sets the "x" attribute on the file and
>> executes it then?
>
> Sure; what's the script name / name pattern?
It will be located in apidocs/create-apidocs.sh
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
Re: Javadocs
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Reinhard Poetz wrote:
> Could somebody help me with an additional script which recursivly scans
> for the download scripts, sets the "x" attribute on the file and
> executes it then?
Sure; what's the script name / name pattern?
Vadim
Re: Javadocs
Posted by Reinhard Poetz <re...@apache.org>.
Vadim Gritsenko wrote:
> Reinhard Poetz wrote:
>> I also use this release to publish our docs. I wonder now whether I
>> should add the Javadocs to our docs or not. For the
>> spring-configurator and and configuration-api I've added them because
>> they are subprojects but I'm not sure if it is the best idea to add
>> the javadocs of our core modules and the blocks to SVN either. The
>> problem is that they take up a lot of space and make a checkout of our
>> site really slow.
>
> Add javadocs to the website - yes, into svn - no.
>
>
>> OTOH if we don't generate them using Maven and then add them to our
>> SVN I don't know how we can do it in a comfortable way.
>
> Traditionally, one would unzip javadocs from a copy of a release on a
> website into 'apidocs' directory, and that'd be all. In such a setup,
> even if javadocs are not in svn, they can be easily restored by getting
> release off archive.apache.org and unzipping it.
>
> http://svn.apache.org/repos/asf/cocoon/site/site/2.1/apidocs/README.txt
The problem is that there are 40+ release artifacts now and doing it this way is
very inconvenient.Maybe I should to write a Maven report which creates only the
menu entry and an apidocs directory. I could put a script into this directory
which downloads the zipped javadocs archive from the central Maven repository
and unzip it then.
Could somebody help me with an additional script which recursivly scans for the
download scripts, sets the "x" attribute on the file and executes it then?
--
Reinhard Pötz Independent Consultant, Trainer & (IT)-Coach
{Software Engineering, Open Source, Web Applications, Apache Cocoon}
web(log): http://www.poetz.cc
--------------------------------------------------------------------
Re: Javadocs
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Reinhard Poetz wrote:
> I also use this release to publish our docs. I wonder now whether I
> should add the Javadocs to our docs or not. For the spring-configurator
> and and configuration-api I've added them because they are subprojects
> but I'm not sure if it is the best idea to add the javadocs of our core
> modules and the blocks to SVN either. The problem is that they take up a
> lot of space and make a checkout of our site really slow.
Add javadocs to the website - yes, into svn - no.
> OTOH if we don't generate them using Maven and then add them to our SVN
> I don't know how we can do it in a comfortable way.
Traditionally, one would unzip javadocs from a copy of a release on a website
into 'apidocs' directory, and that'd be all. In such a setup, even if javadocs
are not in svn, they can be easily restored by getting release off
archive.apache.org and unzipping it.
http://svn.apache.org/repos/asf/cocoon/site/site/2.1/apidocs/README.txt
Vadim