You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Bill Dudney <bd...@apache.org> on 2006/08/25 00:41:03 UTC
confluence maven plugin
Hi All,
I've just committed the maven2 plugin that invokes the confluence
export.
I think we should change the way we do this stuff to invoke the
'exportSpace' instead. Unfortunately I am not a confluence admin so I
could not test it myself. If someone that has admin could add me as
an admin I'd be glad to update the build-tools and test the exportSpace.
After I get this working I'll be adding a profile to the build for
doing a release that will remove the javadoc from the default build.
What does everyone think of generating a source jar with the build? I
like having the source in the m2 repo so that my eclipse debugging
goes into the code instead of the 'class editor' but it does take
longer to build so I could remove that from the default build as
well. Thoughts?
Thanks!
-bd-
Re: confluence maven plugin
Posted by Bill Dudney <bd...@mac.com>.
Hi Andrus,
The current code (with out my changes) was timing out and other bad
behavior probably because of some DOS attack stuff that the infra
folks are running on cwiki. That is the only reason I was trying to
do something else. If I put in a 250ms delay between getting each
page it almost always runs to completion.
I will revert my changes (except for the 250ms wait) and add the
documentation generation to the assembly.
TTFN,
-bd-
On Aug 29, 2006, at 8:06 AM, Andrus Adamchik wrote:
>
> On Aug 29, 2006, at 5:37 PM, Bill Dudney wrote:
>
>> I'm trying to change the DocGenerator so that it uses the
>> confluence web service's exportSpace instead of having to traverse
>> every page and do the reworking of URL's ourselves. the stuff you
>> find at ~jefft is exported in this fashion. My thinking was that
>> it would be better to invoke one method on Confluence than keep up
>> all the code we have to do the same basic thing.
>
> Ok, now I see why this works differently. This may be a problem for
> other reasons:
>
> 1. We are using custom template to render page.
> 2. We are using a custom hidden tag to generate multi-level table
> of contents displayed on the right hand side.
>
> We'll lose both if we simply grab HTML export.
>
> Andrus
Re: confluence maven plugin
Posted by Andrus Adamchik <an...@objectstyle.org>.
On Aug 29, 2006, at 5:37 PM, Bill Dudney wrote:
> I'm trying to change the DocGenerator so that it uses the
> confluence web service's exportSpace instead of having to traverse
> every page and do the reworking of URL's ourselves. the stuff you
> find at ~jefft is exported in this fashion. My thinking was that it
> would be better to invoke one method on Confluence than keep up all
> the code we have to do the same basic thing.
Ok, now I see why this works differently. This may be a problem for
other reasons:
1. We are using custom template to render page.
2. We are using a custom hidden tag to generate multi-level table of
contents displayed on the right hand side.
We'll lose both if we simply grab HTML export.
Andrus
Re: confluence maven plugin
Posted by Bill Dudney <bd...@apache.org>.
On Aug 29, 2006, at 5:13 AM, Andrus Adamchik wrote:
>
> On Aug 29, 2006, at 2:49 PM, Bill Dudney wrote:
>
>> Some of the URL's point back to cwiki.a.o,
>
> What space do they point to? Can you give an example? Maybe they
> are pointing to a different space (which is ok)?
Sorry to be so flighty. I'm doing 15 things at once.
It looks like all the internal (to the space) URL's are relative. You
can get a picture of what i'm talking about here;
http://people.apache.org/~jefft/confluence
Jeff Turner is posting each export from every space from cwiki.
>
>> some don't.
>
> So they are relative?
>
>
>>>> 2) The URL that is returned from the export does not have the
>>>> authentication stuff in it and I can't figure out how to embeded
>>>> it http://uname:password@hostname/blah does not work for me and
>>>> that was all I could find from the googling I did.
>>>
>>> I don't understand why do you need that? During the export web
>>> service (DocGenerator) uses the credentials you supply - no need
>>> to do anything special with the URL's.
>>>
>>
>> The export works fine and I can take the URL and download the zip
>> file from my browser that has the right cookie but I can't
>> download the zip file from the DocGenerator without a 503 error.
>> I'm going to be back at it later this week to try again. If you
>> have any ideas I'd love to hear them.
>
> I don't have any ideas without looking at the error. DocGenerator
> doesn't download a zip though. It uses XML RPC API to list the
> pages and get page contents one by one.
>
> Not sure how test it with Maven. If you can give me some
> instructions, I can take a look.
>
I'm trying to change the DocGenerator so that it uses the confluence
web service's exportSpace instead of having to traverse every page
and do the reworking of URL's ourselves. the stuff you find at ~jefft
is exported in this fashion. My thinking was that it would be better
to invoke one method on Confluence than keep up all the code we have
to do the same basic thing.
The exportSpace method returns a URL that you can use to download a
zip file of the exported space (like the content found at ~jefft
above). And that is where the login stuff goes wrong. When i try to
open a connection on that URL and get the content I get a 503 error.
However if I log into the confluence space from my browser and paste
in the URL it downloads just fine. So I'm assuming that the browser
has a cookie or is passing the credentials some other way that makes
the server OK with delivering the .zip file.
Hopefully that is a bit clearer :-)
TTFN,
-bd-
> Andrus
>
Re: confluence maven plugin
Posted by Andrus Adamchik <an...@objectstyle.org>.
On Aug 29, 2006, at 2:49 PM, Bill Dudney wrote:
> Some of the URL's point back to cwiki.a.o,
What space do they point to? Can you give an example? Maybe they are
pointing to a different space (which is ok)?
> some don't.
So they are relative?
>>> 2) The URL that is returned from the export does not have the
>>> authentication stuff in it and I can't figure out how to embeded
>>> it http://uname:password@hostname/blah does not work for me and
>>> that was all I could find from the googling I did.
>>
>> I don't understand why do you need that? During the export web
>> service (DocGenerator) uses the credentials you supply - no need
>> to do anything special with the URL's.
>>
>
> The export works fine and I can take the URL and download the zip
> file from my browser that has the right cookie but I can't download
> the zip file from the DocGenerator without a 503 error. I'm going
> to be back at it later this week to try again. If you have any
> ideas I'd love to hear them.
I don't have any ideas without looking at the error. DocGenerator
doesn't download a zip though. It uses XML RPC API to list the pages
and get page contents one by one.
Not sure how test it with Maven. If you can give me some
instructions, I can take a look.
Andrus
Re: confluence maven plugin
Posted by Bill Dudney <bd...@apache.org>.
On Aug 29, 2006, at 2:17 AM, Andrus Adamchik wrote:
>
> On Aug 25, 2006, at 6:35 PM, Bill Dudney wrote:
>
>> 1) The zip does not have the URL's redefined to point to the stuff
>> that was just exported, not sure if that's a config parameter or
>> not will try to track down with atlanssian support forums.
>
> So does that mean that all links are exported as absolute URLs? I
> know there were some problems linking to the API docs that we
> ignored, but linking between the pages is always relative.
>
Some of the URL's point back to cwiki.a.o, some don't. Not sure why.
>
>> 2) The URL that is returned from the export does not have the
>> authentication stuff in it and I can't figure out how to embeded
>> it http://uname:password@hostname/blah does not work for me and
>> that was all I could find from the googling I did.
>
> I don't understand why do you need that? During the export web
> service (DocGenerator) uses the credentials you supply - no need to
> do anything special with the URL's.
>
The export works fine and I can take the URL and download the zip
file from my browser that has the right cookie but I can't download
the zip file from the DocGenerator without a 503 error. I'm going to
be back at it later this week to try again. If you have any ideas I'd
love to hear them.
TTFN,
-bd-
> Andrus
>
Re: confluence maven plugin
Posted by Andrus Adamchik <an...@objectstyle.org>.
On Aug 25, 2006, at 6:35 PM, Bill Dudney wrote:
> 1) The zip does not have the URL's redefined to point to the stuff
> that was just exported, not sure if that's a config parameter or
> not will try to track down with atlanssian support forums.
So does that mean that all links are exported as absolute URLs? I
know there were some problems linking to the API docs that we
ignored, but linking between the pages is always relative.
> 2) The URL that is returned from the export does not have the
> authentication stuff in it and I can't figure out how to embeded it
> http://uname:password@hostname/blah does not work for me and that
> was all I could find from the googling I did.
I don't understand why do you need that? During the export web
service (DocGenerator) uses the credentials you supply - no need to
do anything special with the URL's.
Andrus
Re: confluence maven plugin
Posted by Bill Dudney <bd...@apache.org>.
Driving me nuts!
So I'm now able to generate the documentation into a zip file but
there are two problems
1) The zip does not have the URL's redefined to point to the stuff
that was just exported, not sure if that's a config parameter or not
will try to track down with atlanssian support forums.
2) The URL that is returned from the export does not have the
authentication stuff in it and I can't figure out how to embeded it
http://uname:password@hostname/blah does not work for me and that was
all I could find from the googling I did.
I'm done with this for now but will try again next week.
If anyone has any ideas I'd love to hear them.
TTFN,
-bd-
On Aug 25, 2006, at 6:05 AM, Andrus Adamchik wrote:
>
> On Aug 25, 2006, at 4:00 PM, Bill Dudney wrote:
>
>>> Is it possible to unpack at least the javadoc (and possibly *-
>>> sources.jar as well) inside the assembly archive? It will be very
>>> inconvenient for users to unjar the javadocs. Especially forcing
>>> them to command line, since .jar extension is not associated with
>>> WinZip on Windows by default, and on Mac OS tries to run the jar
>>> if you click on it.
>>>
>>
>> I know its possible cause I've seen others do it. I think its
>> simply a maven-dependency-plugin execution but I'll have to poke
>> around a bit. Will get that done as soon as I get the
>> documentation exporter fixed up to use the confluence built in
>> method of exporting.
>
> Great! Getting there...
>
> Andrus
>
>
>
Re: confluence maven plugin
Posted by Andrus Adamchik <an...@objectstyle.org>.
On Aug 25, 2006, at 4:00 PM, Bill Dudney wrote:
>> Is it possible to unpack at least the javadoc (and possibly *-
>> sources.jar as well) inside the assembly archive? It will be very
>> inconvenient for users to unjar the javadocs. Especially forcing
>> them to command line, since .jar extension is not associated with
>> WinZip on Windows by default, and on Mac OS tries to run the jar
>> if you click on it.
>>
>
> I know its possible cause I've seen others do it. I think its
> simply a maven-dependency-plugin execution but I'll have to poke
> around a bit. Will get that done as soon as I get the documentation
> exporter fixed up to use the confluence built in method of exporting.
Great! Getting there...
Andrus
Re: confluence maven plugin
Posted by Bill Dudney <bd...@apache.org>.
On Aug 25, 2006, at 5:50 AM, Andrus Adamchik wrote:
> Cool, assembly worked.
>
Getting close :-)
> On Aug 25, 2006, at 3:38 PM, Bill Dudney wrote:
>
>> release we can also push these files so that users get the source,
>> javadoc and the jar (or rather can) when they download.
>>
>> FYI: The javadoc goes into another jar $artifact-$version-
>> javadoc.jar.
>
> Is it possible to unpack at least the javadoc (and possibly *-
> sources.jar as well) inside the assembly archive? It will be very
> inconvenient for users to unjar the javadocs. Especially forcing
> them to command line, since .jar extension is not associated with
> WinZip on Windows by default, and on Mac OS tries to run the jar if
> you click on it.
>
I know its possible cause I've seen others do it. I think its simply
a maven-dependency-plugin execution but I'll have to poke around a
bit. Will get that done as soon as I get the documentation exporter
fixed up to use the confluence built in method of exporting.
TTFN,
-bd-
> Andrus
>
Re: confluence maven plugin
Posted by Andrus Adamchik <an...@objectstyle.org>.
Cool, assembly worked.
On Aug 25, 2006, at 3:38 PM, Bill Dudney wrote:
> release we can also push these files so that users get the source,
> javadoc and the jar (or rather can) when they download.
>
> FYI: The javadoc goes into another jar $artifact-$version-javadoc.jar.
Is it possible to unpack at least the javadoc (and possibly *-
sources.jar as well) inside the assembly archive? It will be very
inconvenient for users to unjar the javadocs. Especially forcing them
to command line, since .jar extension is not associated with WinZip
on Windows by default, and on Mac OS tries to run the jar if you
click on it.
Andrus
Re: confluence maven plugin
Posted by Bill Dudney <bd...@virtuas.com>.
On Aug 25, 2006, at 1:34 AM, Andrus Adamchik wrote:
>
>> but it does take longer to build so I could remove that from the
>> default build as well. Thoughts?
>
> +1
>
> (I assume that's a separate jar, not bundled in the main jar
> containing the classes?)
>
What maven does is create the source jar as $artifactId-$version-
sources.jar and that gets put into the repo along side the jar file.
When we do a release we can also push these files so that users get
the source, javadoc and the jar (or rather can) when they download.
FYI: The javadoc goes into another jar $artifact-$version-javadoc.jar.
TTFN,
-bd-
Re: confluence maven plugin
Posted by Bill Dudney <bd...@apache.org>.
On Aug 25, 2006, at 1:34 AM, Andrus Adamchik wrote:
>
>
>> but it does take longer to build so I could remove that from the
>> default build as well. Thoughts?
>>
>
> +1
>
> (I assume that's a separate jar, not bundled in the main jar
> containing the classes?)
>
>
What maven does is create the source jar as $artifactId-$version-
sources.jar and that gets put into the repo along side the jar file.
When we do a release we can also push these files so that users get
the source, javadoc and the jar (or rather can) when they download.
FYI: The javadoc goes into another jar $artifact-$version-javadoc.jar.
TTFN,
-bd-
Re: confluence maven plugin
Posted by Andrus Adamchik <an...@objectstyle.org>.
Cool!
On Aug 25, 2006, at 2:41 AM, Bill Dudney wrote:
> Hi All,
>
> I've just committed the maven2 plugin that invokes the confluence
> export.
>
> I think we should change the way we do this stuff to invoke the
> 'exportSpace' instead. Unfortunately I am not a confluence admin so
> I could not test it myself. If someone that has admin could add me
> as an admin I'd be glad to update the build-tools and test the
> exportSpace.
Just added your Apache account to cayenne-admins group (you seem to
have two accounts on Confluence).
> After I get this working I'll be adding a profile to the build for
> doing a release that will remove the javadoc from the default build.
Excellent.
> What does everyone think of generating a source jar with the build?
> I like having the source in the m2 repo so that my eclipse
> debugging goes into the code instead of the 'class editor'
Me too!
> but it does take longer to build so I could remove that from the
> default build as well. Thoughts?
+1
(I assume that's a separate jar, not bundled in the main jar
containing the classes?)
Andrus
Re: confluence maven plugin
Posted by Andrus Adamchik <an...@objectstyle.org>.
On Aug 25, 2006, at 3:21 PM, Bill Dudney wrote:
> The assembly currently requires you to be in the assembly
> directory. I have it configured to create the assemblies on an
> install so from the assemblies directory you can type 'mvn install'
> and get a .tar.gz and .zip for all the platforms.
Thanks, I'll try it out.
>
> I'll drop the PDFBuilder code and itext as a dependency,
I already did - this is checked in.
Andrus
Re: confluence maven plugin
Posted by Bill Dudney <bd...@mac.com>.
Hey Andrus,
Sorry for not documenting this, I need to get to the wiki!
I'll drop the PDFBuilder code and itext as a dependency, the other
dependency was activation.jar but that now comes from the java.net
legacy maven repo so hopefully you got that OK.
The assembly currently requires you to be in the assembly directory.
I have it configured to create the assemblies on an install so from
the assemblies directory you can type 'mvn install' and get a .tar.gz
and .zip for all the platforms.
I'm just testing adding the assemblies to the modules in the root
pom. If it works I'll check that in so every install build from the
root will create an assembly. Then I'll add that to the profile so
that its also run at the same time the javadoc and source gen are run.
After running install from the assemblies you will have the .tar.gz
and .zip files in your local repo as well;
$ ls ~/.m2/repository/org/apache/cayenne/assembly/
cayenne-assembly-generic cayenne-assembly-parent
cayenne-assembly-osx cayenne-assembly-win
TTFN,
-bd-
On Aug 25, 2006, at 2:14 AM, Andrus Adamchik wrote:
> Just did a build with clean repo. I got a few dependency failures
> in the build-tools project. itext & confluence-soap. So I removed
> the PDFBuilder that required itext - we are not using it anyways,
> and uploaded confluence-soap to ObjectStyle maven repo.
>
>
> Also how do you build an assembly. I am getting an error when doing
> it from the root:
>
> # mvn assembly:assembly
>
> [... after doing the full build for a few minutes ... ]
>
> [INFO] [assembly:assembly]
> [INFO]
> ----------------------------------------------------------------------
> --
> [ERROR] BUILD FAILURE
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] No assembly descriptors found.
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] For more information, run Maven with the -e switch
> [INFO]
> ----------------------------------------------------------------------
> --
> [INFO] Total time: 2 minutes 50 seconds
> [INFO] Finished at: Fri Aug 25 12:11:09 MSD 2006
> [INFO] Final Memory: 17M/31M
> [INFO]
> ----------------------------------------------------------------------
> --
>
>
> Andrus
>
>
> On Aug 25, 2006, at 2:41 AM, Bill Dudney wrote:
>
>> Hi All,
>>
>> I've just committed the maven2 plugin that invokes the confluence
>> export.
>>
>> I think we should change the way we do this stuff to invoke the
>> 'exportSpace' instead. Unfortunately I am not a confluence admin
>> so I could not test it myself. If someone that has admin could add
>> me as an admin I'd be glad to update the build-tools and test the
>> exportSpace.
>>
>> After I get this working I'll be adding a profile to the build for
>> doing a release that will remove the javadoc from the default build.
>>
>> What does everyone think of generating a source jar with the
>> build? I like having the source in the m2 repo so that my eclipse
>> debugging goes into the code instead of the 'class editor' but it
>> does take longer to build so I could remove that from the default
>> build as well. Thoughts?
>>
>> Thanks!
>>
>> -bd-
>>
>
Re: confluence maven plugin
Posted by Andrus Adamchik <an...@objectstyle.org>.
Just did a build with clean repo. I got a few dependency failures in
the build-tools project. itext & confluence-soap. So I removed the
PDFBuilder that required itext - we are not using it anyways, and
uploaded confluence-soap to ObjectStyle maven repo.
Also how do you build an assembly. I am getting an error when doing
it from the root:
# mvn assembly:assembly
[... after doing the full build for a few minutes ... ]
[INFO] [assembly:assembly]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] No assembly descriptors found.
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 minutes 50 seconds
[INFO] Finished at: Fri Aug 25 12:11:09 MSD 2006
[INFO] Final Memory: 17M/31M
[INFO]
------------------------------------------------------------------------
Andrus
On Aug 25, 2006, at 2:41 AM, Bill Dudney wrote:
> Hi All,
>
> I've just committed the maven2 plugin that invokes the confluence
> export.
>
> I think we should change the way we do this stuff to invoke the
> 'exportSpace' instead. Unfortunately I am not a confluence admin so
> I could not test it myself. If someone that has admin could add me
> as an admin I'd be glad to update the build-tools and test the
> exportSpace.
>
> After I get this working I'll be adding a profile to the build for
> doing a release that will remove the javadoc from the default build.
>
> What does everyone think of generating a source jar with the build?
> I like having the source in the m2 repo so that my eclipse
> debugging goes into the code instead of the 'class editor' but it
> does take longer to build so I could remove that from the default
> build as well. Thoughts?
>
> Thanks!
>
> -bd-
>