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

0 votes
Accepted answer

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
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,440 views 110 8
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