| Name | Subconf |
|---|---|
| Version | 0.9.6 - beta. Please see upgrade information in the version history table below. |
| Product Versions | Confluence 2.9.0 , Java 5.0+ . Note that previous versions of Confluence are not supported. |
| Author(s) | UXC Applications Development |
| Homepage | http://confluence.atlassian.com/display/CONFEXT/Subconf |
| Price | Free, no support provided. |
| License | Apache/BSD |
| JavaDocs | |
| IssueTracking | http://developer.atlassian.com/jira/browse/SUBCONF |
| Download JAR | Download JAR Please see upgrade information in the version history table below. |
| Download Source | https://svn.atlassian.com/svn/public/contrib/confluence/subconf-plugin/trunk |
Description/Features
Plugin that allows subversion to act as the attachment store for Confluence, with 2 way synchronization.
| Warning Subconf is beta software, and has only been tested in one environment. Also, please note that it is only supported for the Confluence version listed above (currently 2.9.0). The current version will not work on previous versions. Jars built against previous versions can be found in the attachment history. |
Subconf allows a Confluence space to be associated with a Subversion repository. Within the space, pages correspond to directories within subversion, and attachments correspond to subversion files. All directories and files are fully versioned within svn. The contents of a page are stored as a special file, confluencePage.txt . Similarly news and emails are stored under configurable top level directories, with the content of the news/email stored with the name confluencePage.txt .
Versions of Subconf from 0.5.1 onwards also will also pick up changes made to the confluencePage.txt file (pages only, not mail or news) in the repository, and synchronize the changes into Confluence (handy if you want to run a batch job across all pages in the space).
The motivation for developing this is to centralise the storage of project artefacts into subversion, rather than have a separate store for the wiki. This makes configuration management of a development project much simpler.
There is the added bonus that you can access a Subversion repository via web dav. Subconf adds a tab to a page to show the web dav view in an iframe (IE only), which allows drag and drop of attachments - very cool.
Subconf consists of a number of components performing a range of different functions:
| Component | Description |
|---|---|
| SubversionAttachmentManager, SubversionAttachmentDao | Implement the attachment interface to allow storage and retrieval of attachments in subversion. |
| ConfluenceEventListener | Listens for page events in confluence, such as new, moved and deleted pages, and updates the corresponding folder structure in svn. |
| SubversionPoller | Polls svn for changes to the repository, and updates the confluence page structure to match. |
Usage
I recommend installing Subconf in a testing environment prior to using it on your production instance of confluence. Subconf can be destructive, so make sure it is set up right first.
The plugin can be installed by uploading the attached jar through the admin interface.
It it recommended to restart your confluence instance after upgrading Subconf.
Once installed, subconf will add a "Subversion Admin" option in the Space Admin page. The Subversion Admin page contains a number of fields that need to be filled in before the space will work correctly with Subconf. The meaning of these fields is repeated below for convenience.
| Property | Description |
|---|---|
| Svn Url |
The url of the subversion repository. Currently only http:// or https:// protocols are supported (not svn://) |
| System Username |
The username for confluence to use when logging in to Subversion. |
| System Password |
The password for confluence to use when logging in to Subversion. |
| Use Logged In User |
Set to true if you want to use the logged in user as the committer when performing write operations to Confluence. This will only work if your Confluence users have matching usernames and passwords in Subversion. There is a potential security risk with the use of this option, as in order to pass the logged in user's password on to svn, subconf must cache the user's password on disk. Only use this the confluence server is 100% secure. A better arrangement would be some sort of trust between confluence and subversion, but this has not yet been investigated. |
| Username Prepend | String to prepend to the Confluence users username when using in Subversion. This feature is to allow a domain name to be prepended to the username if you are using SSPI authentication on your svn repository. Note that this is applied for the logged in user, not the systemUsername. |
| Max Sync Revisions |
Subconf tries to keep in sync with svn by reading the logs. However if you are pointing subconf at an existing repository, you may have tens of thousands of revisions, which will be a very inefficient . This option will cause subconf to walk the svn tree to synchronize if confluence is more than the maxSyncRevisions behind. |
| News Path |
Specifies the top level folder created to store news within Subversion. Where this property is not supplied, the default folder name is "news". At the current time, this must be a single folder name not a path (eg blogs is fine blogs/confluence is not). |
| Mail Path |
Specifies the top level folder created to store emails within Subversion. Where this property is not supplied, the default folder name is "mail". At the current time, this must be a single folder name not a path (eg email is fine email/confluence is not). |
| Show Webdav Locks |
If this is checked, the status of attachments locked through Webdav will be shown on the attachments tab. Users will also not be allowed to upload files on the attachments tab if a file is locked through Webdav. NOTE: May cause attachments tab to load slower as it needs to read the lock information from svn every request. |
| Use Spaces in Filenames | If this is checked, attachments downloaded will have spaces instead of plus signs in their filename. |
Actions
Besides the settings, these actions are available from the Subconf admin page:
| Action | Description |
|---|---|
| Sync Space to Contents of Svn | This will walk the tree of the subversion repository for this space, and ensure that there are matching pages and attachments in the confluence space. It will not delete extra pages in Confluence, but it will remove attachments in Confluence that are not present in Subversion. This may take a very long time, especially if you are upgrading from subconf 0.8 or earlier. |
Subconf has quite a log of logging built in. To turn on logging, which is very useful to diagnose problems, add the following line to confluence/WEB-INF/classes/log4j.properties :
log4j.logger.com.dytech.subconf=DEBUG
Version History
| Version | Changes | ||
|---|---|---|---|
| 0.5.1 | Upgraded to support Confluence 2.5.4 | ||
| 0.6.0 | Refactored structure to make most components Spring beans Added caching to improve performance Limited getting logs for folders with large number of attachments to improve scalability Fixed renaming and moving bugs. |
||
| 0.6.1 | Fix for a lazy-init problem to do with caching | ||
| 0.7.0 | Upgraded to Confluence 2.6.0 Added lots of unit tests Fixed some minor bugs. |
||
| 0.8.5 | New features and bug fixes added by Robert Griffis of EA:
|
||
| 0.8.6 | Upgrade to confluence 2.6.1 |
||
| 0.8.8 | Fixed an issue which caused a flat out loop in SubversionPoller | ||
| 0.8.9 | Fixed bug that prevented uploaded new version of existing attachment. Also branched 0.8 stream. | ||
| 0.8.10 | Fixed bug that caused attachments/files to go missing after an svn rename of a folder | ||
| 0.8.13 | Upgrade to confluence 2.7.2 |
||
| 0.9.6 |
|
Known Issues
There are a couple of known issues:
- The deletion of pages with children causes the child pages to be deleted within Subversion rather than orphaned as occurs in Confluence.
See the current open Jira issues:
Screenshots

Comments (46)
Feb 26, 2007
David Peterson [CustomWare] says:
This looks pretty cool, although I'm wondering if there is a reason other than t...This looks pretty cool, although I'm wondering if there is a reason other than time that settings are stored in a properties file which must be uploaded manually, instead of using an XWork Action + Bandana to store the settings for each space? Modifying files in the distro is a pain...
Nice work though
Feb 26, 2007
Jon Nermut says:
Yeah settings in the UI would definitely be better, but it was a low priority. M...Yeah settings in the UI would definitely be better, but it was a low priority. Might get around to it at some point, I've added an issue.
Feb 26, 2007
David Peterson [CustomWare] says:
Yeah, I figured (and sympathise).Yeah, I figured (and sympathise).
Apr 23, 2007
Jonathan Nolen says:
If you did manage to write an action to handle the settings, then this plugin co...If you did manage to write an action to handle the settings, then this plugin could be put into the Plugin Repository.
Apr 26, 2007
Jon Nermut says:
Its on the way in v0.4, also the fix to the problems with conf 2.4.5 . We are ju...Its on the way in v0.4, also the fix to the problems with conf 2.4.5 . We are just about to test and then release it. What's actually involved in getting a plugin included in the repository?
Mar 15, 2007
Joe Shomphe says:
This is an absolutely fantastic plugin. One request is I would love to see...This is an absolutely fantastic plugin. One request is I would love to see some sort authentication solution that does not require placing the SVN credentials in a text file. Perhaps using the current logged in user's username/password or supporting LDAP/Crowd integration ?
Thanks so much for this effort!
Mar 15, 2007
Jon Nermut says:
Hi Joe, Thanks for the comment. I agree that the authentication is clunky at bes...Hi Joe,
Thanks for the comment.
I agree that the authentication is clunky at best.
Really what we need is some sort of trust between confluence and subversion, so that confluence (subconf) can just send the username of the logged in user, and because it came from confluence, svn would accept the user without re checking the password.
LDAP by itself doesn't solve this - we are already using a form of ldap (active dir), but because both conf and svn need to check the username and password we are forced into the storage of passwords, so that we can login to svn.
Crowd may provide a solution, with the new svn authenticator. I bet this could be modified so that if both confluence and svn are using crowd, then the crowd authenticator could trust confluence.
However my company doesn't have a licence for crowd, and we aren't likely to buy one soon. (Atlassian??)
Cheers,
Jon
Mar 18, 2007
Joe Shomphe says:
Why not have the user store their credentials in their confluence profile (Not s...Why not have the user store their credentials in their confluence profile (Not sure if there is a way to do this), but on my user page, I can imagine a form that allowed me to save my svn username/pass
Mar 26, 2007
David Nessl says:
Cool plugin -- I'm the CM coordinator at my large corp, and most of our ...Cool plugin -- I'm the CM coordinator at my large corp, and most of our docs are in CVS (soon to be SVN). This would let us integrate our Wiki & docs into one.
My problem is that, although created pages are now stored in SVN, added attachments still get stored locally in the confluence.home under the attachments directory. Any ideas? (Confluence 2.3.3, HSQLDB, configured for normal attachment storage.)
Mar 27, 2007
Jon Nermut says:
Hi David, Sounds like the AttachmentDao is not initializing properly. Can you tr...Hi David,
Sounds like the AttachmentDao is not initializing properly. Can you try turn the log level to debug (see above) and see what is logged by subconf on startup, and when you try and attach a file.
Also, if you commit a file into the directory created in svn when you have created a file, does it show up in the attachments in confluence (it should).
Cheers,
Jon
Apr 16, 2007
Jeff Klassen says:
Jon, I am also experiencing exactly the same behavior as David. My test server ...Jon,
I am also experiencing exactly the same behavior as David. My test server is running Confluence 2.4.5 connecting to MySQL4. The normal attachment storage is set to the filesystem.
As with David, pages are stored and updated in the repository, but attachments are not. If I add a file to the repos though an svn client, it does not appear as a page attachment in Confluence.
If I delete a file from the resos using svn, the log shows some acknowledgement of the activity, like
DEBUG Thread-12 dytech.subconf.confluence.SubversionPoller handleChanges rev:7 type=D key=/Home/SubConf/testfile.txt path=/Home/SubConf/plugins-subconf.jar copyPath=null
There is little in the logs which seems to be indicating an obvious error.
I do recognize that this is a work in progress. Thank you for what you are doing! It would be quite neat for our purposes if something here could be resolved. Could I send you a more complete set of log data?
Thanks again for sharing this.
Jeff
Apr 16, 2007
Bice Dibley says:
Jeff, Thanks for the feedback. It would be very helpful if you sent me a copy o...Jeff,
Thanks for the feedback. It would be very helpful if you sent me a copy of the logs, and I'll see what we can do to find the cause of the problems. It is worth noting that we haven't yet tested subconf with Confluence 2.4.5, so that's probably going to be the first port of call.
Thanks,
Bice
Apr 17, 2007
Jeff Klassen says:
Bice, I have sent a copy of a page which describes the steps taken to test the ...Bice,
I have sent a copy of a page which describes the steps taken to test the attachment storage on our server. The logs generated along the way are included.
Thank you for your kind reply.
Apr 26, 2007
Jon Nermut says:
We've found the issue with confluence 2.4.n, and we should have a new version up...We've found the issue with confluence 2.4.n, and we should have a new version up next week some time. (Also with inbuilt configuration).
Cheers,
Jon
Apr 26, 2007
Jeff Klassen says:
Jon, Thanks so much for the time you guys have spent looking into this. I was q...Jon,
Thanks so much for the time you guys have spent looking into this. I was quite intrigued with the plug-in when I noticed it here, as it would really help to integrate Confluence (which we use a lot) together with an rather large project archive we keep in Subversion. Somehow integrating a use of the metadata plugin is also part of my thinking there, although SUBCONF-10 would be just fine too (better).
Again, many thanks.
One question I have which you might have a comment on from a developer's perspective... in looking at the issue with subconf on 2.4.x, what are your impressions about how robust this plugin might be in terms of migrating to new versions of Confluence. I suppose that's a comment better suited for Atlassian folks. It just gives me pause when I see some cool plug-in items, but am left struggling with committing a group of users to the use of them when there could be a break when a new Confluence update happens (which may have functionality we also would enjoy using -- like enhanced user/group page permission control).
Jeff
Apr 26, 2007
Jon Nermut says:
Jeff, The problem with 2.4.5 was a change in the way that the attachment subsyst...Jeff,
The problem with 2.4.5 was a change in the way that the attachment subsystem was wired up within Confluence. Because there is no plugin point for adding attachment storage systems, our code has to insert itself in the middle of the confluence objects, so when this changed, it broke.
So I guess that yes, this plugin is pretty sensitive to upgrades of confluence, as it is using internal features that aren't guaranteed to remain the same by Atlassian.
Basically, when it comes down to it, I would make these points:
1. The plugin was developed by a software development company (Dytech Solutions), for its own use
2. The plugin is used in production at Dytech, and tested to some extent before it is released
3. However it is only used and tested on our current version of confluence, and we don't stay at the bleeding edge. We do upgrade when it is warranted by new features or bug fixes in confluence.
4. We can only provide limited support as we all have real jobs
I guess what may be best is that give the specific version of confluence that the current version of confluence has been tested against, and is know to work with.
Cheers,
Jon
Apr 26, 2007
Jeff Klassen says:
Jon, Thanks for the thoughtful reply. It does help to understand in a general w...Jon,
Thanks for the thoughtful reply. It does help to understand in a general way about the attachment storage, and how the plug-in needed to be engineered.
Re: Points 1-4. All easily and well understood. I just appreciate the opportunity to interact briefly, and take a crack at using it. Thanks.
Jeff
Apr 26, 2007
Jon Nermut says:
Jeff, Bice has now uploaded v0.4, which should work with Conf 2.4.5 . Note confi...Jeff,
Bice has now uploaded v0.4, which should work with Conf 2.4.5 . Note config is now in Space Admin.
Let us know how you go.
Cheers,
Jon
Apr 27, 2007
Jeff Klassen says:
Jon, I've installed 0.4.1, and after some brief testing, it's working very well...Jon,
I've installed 0.4.1, and after some brief testing, it's working very well. Many thanks guys. This is really very useful. The config screen is a nice addition.
Jeff
Apr 27, 2007
David Nessl says:
I've installed 0.4.1. Our SVN admins recently turned on LDAP authenticatio...I've installed 0.4.1. Our SVN admins recently turned on LDAP authentication for accessing out repository via https, and I can access it via TortoiseSVN and as a Windows NetworkPlace. But now subconf gets the following error:
[4/27/07 14:17:28:216 EDT] 00000053 SystemOut O 2007-04-27 14:17:28,209 ERROR [Thread-113] [dytech.subconf.svn.SvnInterface] getEntries Error getting repository entries
org.tmatesoft.svn.core.SVNAuthenticationException: svn: Authentication required for '<https://dtsnox.cdc.ent.nwie.net:443> Login Required'
[4/27/07 14:17:28:220 EDT] 00000053 SystemOut O 2007-04-27 14:17:28,216 ERROR [Thread-113] [dytech.subconf.confluence.SubversionPoller] pollForChanges Error polling svn for changes for spaceKey=WikiPlayground
java.lang.NullPointerException
Any ideas? (Something extra we need to configure in Apache or mod_dav? Does subconf dislike passwords that contain special chars like "#" or "," ?) Oh, and I am using the new space-admin interface to set the userid & password.
BTW, I also noticed that there is no way to setup subconf in personal spaces. Since our end-users can add personal spaces without going thru the central admins, it'd be nice to be able to impose aq global subconf setup for personal spaces.
Apr 28, 2007
Jon Nermut says:
David, There shouldn't be any problem with special chars, and you shouldn't have...David,
There shouldn't be any problem with special chars, and you shouldn't have to do anything special to apache or mod_dav.
Are you using "Use logged in user"? try turning it off.
Do you need a domain name prepended (or not prepended)?
The best way to diagnose this it to get your svn admins to turn up the logging in apache, and see what is being passed for authentication. If you can authenticate manually as that user using exactly the same credentials then there must be something wrong with the way subconf is trying to authenticate.
Jun 08, 2007
David Nessl says:
I've tracked this down to a definite problem running on the IBM (1.5) JVM. ...I've tracked this down to a definite problem running on the IBM (1.5) JVM. (It works just fine under tomcat on the Sun 1.5 JVM.) I suspect it's likely due to the same problem I've run into with https on other apps: The SSL algorithms have different names in the IBM JDK, so when acting as an SSL client, SSL authentication can't be started, so auth fails. I'll try to get an exception to use tomcat instead of our corp-standard websphere.
-david
May 07, 2007
IOANNIS OIKONOMOU says:
I downloaded and installed the plugin successfully. I have the following questio...I downloaded and installed the plugin successfully.
I have the following questions:
1) I noticed that without mounting the repository as a Windows Web Folder (via "Add Network Place"), the plugin cannot bring the contents of the repository, although the "Svn Url" is configured properly in the Space Admin. Is this normal?
2) I cannot understand the "drag and drop" functionality of the plugin. Is it only one way that is copy a file from within Confluence to a local drive, or also vice versa, i.e. copy a file from a local drive into Confuence? Shouldn't there be a checkout in advance?
3) Is it possible to view the contents of the repository within Confuence in the "Details" form (as in Windows)?
Thanks,
Giannis
May 09, 2007
IOANNIS OIKONOMOU says:
I checked "Appendix C. WebDAV and Autoversioning" of the SVN book and I found ou...I checked "Appendix C. WebDAV and Autoversioning" of the SVN book and I found out that I was missing the "SVNAutoversioning on" parameter within the httpd.conf. Now everything is fine!
Are you planning to release a new version for the plugin soon?
Giannis
Jun 11, 2007
David Nessl says:
How do I get Subconf to migrate the pages and attachments, that are already in t...How do I get Subconf to migrate the pages and attachments, that are already in the Confluence space, into the Subversion repository? It appears that only pages I edit are moved into the Subversion repository.
Jun 11, 2007
Jon Nermut says:
David, There is no code in subconf currently to sync an existing space to a repo...David,
There is no code in subconf currently to sync an existing space to a repository.
As you picked up, pages are sync'd as they are edited.
It wouldn't be hard to add code in subconf to sync the whole space, but it wasn't a use case for us. We currently aren't adding any features - to much real work to do.
If the space is small enough, you could just go and touch every page. Otherwise you could write a macro using the scripting plugin to do it for you.
Jun 19, 2007
David Nessl says:
Here's the Python script I used to migrate all pages into the subversion reposit...Here's the Python script I used to migrate all pages into the subversion repository. It updates every page by appending an extra blank character.
Jun 19, 2007
David Nessl says:
Ooops -- after updating just over half of our 600+ pages, I got the ...Ooops -- after updating just over half of our 600+ pages, I got the following error:xmlrpclib.Fault:Nevermind - typo in the directory name of subversion URL. All is OK.
Jul 23, 2007
David Ne