How to convert html to Atlassian markup in java app Edited

Hi Guys!

I have to implement parser (Java witchout atlassian SDK) which allow me to change my xml to csv to import issues. BUT i have to change description and comment in html to Atlassian wiki format. i found this:

how-do-i-convert-html-code-to-confluence-style-wiki-markup

So i add new dependency to my app:

<dependency>
<groupId>com.atlassian.renderer</groupId>
<artifactId>atlassian-renderer</artifactId>
<version>8.0.5</version>
<systemPath>C:\Users\exo\eclipse-workspace\JiraXMLToCSV\atlassian-renderer-8.0.5.jar</systemPath>
<scope>system</scope>
</dependency>

But now i got this error:


Exception in thread "main" java.lang.NoClassDefFoundError: com/opensymphony/util/TextUtils
at com.atlassian.renderer.wysiwyg.converter.DefaultWysiwygConverter ...

Should i add some additional dependencies? 

 

1 answer

I'm not 100% sure how you're using the renderer, but I was able to convert HTML to MarkUp with the following relevant pom sections.

The snippets are below and working on github.

<dependency>
<groupId>com.atlassian.renderer</groupId>
<artifactId>atlassian-renderer</artifactId>
<version>8.0.5</version>
<exclusions>
<!-- This exclusion is necessary if you are in a
situation which
it conflicts, EG: using spring-boot -->
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
 <repository>
<!-- https://developer.atlassian.com/docs/advanced-topics/working-with-maven/atlassian-maven-repositories -->
<id>atlassian-public</id>
<url>https://packages.atlassian.com/maven/repository/public</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</snapshots>
<releases>
<enabled>true</enabled>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>

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
Published Monday in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

685 views 6 13
Read article

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