Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Generate javadoc and publish on confluence

sudhakar June 5, 2013

We use Atlassian on demand stack which include bamboo and Confluence. I am looking for help and suggetions on how I can generate the JavaDoc for our java projects and publish on Conflence.

One of the way I know is generate the javadoc as part of mvn build and attach that as artifacts with every build but that's not the convinent way of using it since user would need to access different url every time and second is they need to dowload this html files locally on their box to see the API help which is definately not the convininent way so could you please suggest some better way of publishing javadocs.

5 answers

1 accepted

1 vote
Answer accepted
Gary Donovan June 6, 2013

For our generated documentation, we have a plan that is executed nightly. All it does is use a script to generate the docs in one job, and then use a seperate script to copy them to an internal web server in another job, overwriting the previous version. Then developers always look in the same spot on the web server for up-to-date documentation.

It's a bit low-tech, but it works perfectly well, and I personally don't see any value in putting generated documentation into Confluence.

In your case, you could add a new stage to your build plan the generates the javadoc using mvn (if that hasn't been done already), and then either copy them to a web server or run a simple web server on your buld box.

4 votes
Stefan M May 9, 2015

Use the Docs Plugin (https://marketplace.atlassian.com/plugins/net.meixxi.confluence.docs.docs-plugin). This plugin also provides an REST interface for automated publishing using Bamboo or any other CI System. You can find the technical documentation here: https://bitbucket.org/meixxi/docs-plugin/wiki/REST_Interface

David Simerly December 10, 2020

 Stefan M,

I know this is an old thread, but we're using your Docs plug-in to display our API developer documentation, and we've been told that we must migrate from Confluence Server to Data Center. We're wondering whether your plug-in will still work well in Data Center?

We filed a Bitbucket ticket asking about this on your site last October and still have not received a reply. Your plugin plays an important role in our documentation strategy, please reply ASAP. Thanks.

3 votes
Justin Justin December 5, 2014

@sudhakar:

See this plugin ... Doxygen (Javadoc) in Atlassian Confluence 

There's also a JIRA version

0 votes
Bartłomiej Pióro June 8, 2013

Oh there is a lot of ways to achieve it and they depends on what you want to achieve.

Lets start from simple one.

1. Enable HTML macro in confluence (if your instance is public, please watch for it). Alternatively you can use plugin pack from Adaptavist (search google). They have iframe macro available.

2. Store your java doc somewhere on intranet. Add iframe to your page.

Drawbacks is that it will not be searchable or browsable from confluence menu. users will have to go to page and traverse from there.

More advanced way and it would require you do to do some scripting work:
1.Lets say we will use Java Doc space

2. Generate your java doc into html files.

3. Remove Old Java Doc space, Create new one.

4. Use Confluence CLI to import your javadoc html files into confluence.

I am not sure if point 3 is needed, no idea if CLI can add new versions of the files if needed. Still you would need to detect removed pages. I woudl still remove old file, i don't need history - can get it from versioning system

Last the most advance version is

1. Write your own plugin :)

Simple version is the best if you want something quick and dirty, but basically this is gary's version packed into iframe and shown into yoru confluence (just for conevience so devs does not have to look through intranet). Second version is for nice solution with search and everything, but require you to do some scripting.

Deleted user July 24, 2013

Re points 1 and 2. iFrames with relative embedded links don't work well within Confluence. They _display_ ok, but after the pages are in Confluence, the relative links start looking for the wiki's host url and Confluence tries to resolve them using its own path, eg, mycompany.com/wiki/display/some+other+page

otoh, Generating the html and then importing it into Confluence as individual pages seems like it might work, but it would need to be automated with a script.

0 votes
sudhakar June 7, 2013

Thanks Gary..it's quite helpfull. Since I did not got any other answer so I am assuming that it's not possible to publish this on Confluence.

Gary Donovan June 10, 2013

No worries - glad I could help

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events