How do I access the java DateTool in a User Macro?

Does anyone know how to load java libraries/tools into Confluence User Macros?

I need to use the DateTool()


3 answers

1 accepted

So I have had to write a plugin to solve my solution. User Macros are great, but do lack the flexibility to include java modules.

From my research I was not able to find any macro/plugin or guide that match the criterea you want :(.

I believe you might need to develop your own plugin to do that.

What is your use case for needing DateTool specifically?

Hi Daniel,

I want a macro that compares the last edit timestamp of a linked page, with the users recent history of the same page. If the page has been updated since the user last viewed it, then the macro will highlight the link to show it has new content not viewed by the current user.


It seems like you are trying to notify users that specific page has been modified since a user edited it last.

Would having a user subscribe to a page and then getting email notifications as well as notifications in the notifications box fulfil this need, or does the use case necessitate that text be highlighted on the page itself.

I am just trying to walk you through some of the default behavior of Confluence before you build something on your own. Maintianing your own plugin can be a giant pain.


Yes that is close to what I want, but the pitfall here is mandating that users subscribe/watch the page and remain subscribed (as they can always stop watching the page if they get sick of emails etc). Since we have staff all over the world, and tracking new staff and ensuring they subscribe can be a bigger challenge.

I was wanting a more descrete method of notifications that did not use emails and does not rely on them "doing" something (ie. subscribing/watching pages).

I have written User Macros, but never any plugins, this is new territory for me, so if I can avoid doing that, all the better.


Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

866 views 23 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you