Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Change addons source files

How can I change & edit an addon's macro. for example some addon has a macro to show something or create a page or a template and I want to edit and customize a section or a part of that template or macro?

Thanks

1 answer

1 accepted

1 vote
Answer accepted

It depends on how the app is built and where it's doing the work you want to change.

A typical app that provides a Confluence macro is a .jar file you add to your server.  .jar files in general are really zipped up blocks of files that are suitable for java to use as an executable set of instructions and supporting resources. 

For Atlassian apps, the files tend to be a mix of usable classes and resources which feed into displaying and rendering stuff - some javascript, css, jsp, etc, and quite often, velocity templates which are usually about displaying a macro when rendered (my first confluence app was 3 small classes and an over-engineered velocity template, as I found it easier to code for velocity than java at the time). These resources are plain text, but are effectively code (unlike the classes which are the results of compiled code)

So.  If what you want to change is being done by templates or resources, you could unzip the app, hack the text files and re-zip the file, then re-deploy it over the top of the old one in your server.

But if the changes you want are done in the compiled code, you are not going to be able to do that (without a pile of reverse engineering)

None of that can be recommended at any point, what you really should do is get the source code for the app and recompile it properly after making your changes in the source.  If you hack someone else's app, you could be breaching the terms of usage, you're certainly going to leave yourself unsupported with that app, and if it's one of the core Confluence apps, your entire Confluence system goes out of support (in all cases, keep the original .jar file handy - you can become supported again by deleting your version and putting the original back)

Thanks for your answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Miss the Confluence demos at Team 21? Watch them here!

Phew, Atlassian Team 2021 blew by. With dozens of demos and a handful of keynotes, you may have missed some of the awesome Confluence Cloud sessions. Don't' worry, you can watch them all here or on Y...

129 views 2 5
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you