<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: How to load ivy class to class loader on maven plugin</title><link>https://answers.axonivy.com/questions/3163/how-to-load-ivy-class-to-class-loader-on-maven-plugin</link><description>&lt;p&gt;Hi ivyteam&lt;/p&gt;
&lt;p&gt;I'm building a maven plugin to scanning java class in ivy project to generate some business documentation (by reading the annotation in classes). It's seem to work well with java class. &lt;/p&gt;
&lt;p&gt;There is only one problem with some classes which belong to ivy, for example a java class that extends from &lt;code&gt;ch.ivyteam.ivy.scripting.objects.CompositeObject&lt;/code&gt; or a class that references from another class from other ivy project, in maven plugin it could not load those classes like that then throw NoClassDefFoundException, I guess that because &lt;code&gt;CompositeObject&lt;/code&gt; does not available on current class loader yet. &lt;/p&gt;
&lt;p&gt;My question is: How could i resolve those ivy dependencies to load those class? how &lt;code&gt;project-build-plugin&lt;/code&gt; can compile them or is there any solutions?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description><atom:link href="https://answers.axonivy.com/questions/3163/how-to-load-ivy-class-to-class-loader-on-maven-plugin" rel="self"></atom:link><language>en</language><lastBuildDate>Thu, 29 Mar 2018 11:28:04 -0400</lastBuildDate><item><title>Answer by Reguel Wermelinger</title><link>https://answers.axonivy.com/questions/3163/how-to-load-ivy-class-to-class-loader-on-maven-plugin/3164</link><description>&lt;p&gt;The &lt;code&gt;project-build-plugin&lt;/code&gt; comes with an optional goal that will write the JARs of the axon.ivy engine classpath to a maven property: &lt;a href="https://axonivy.github.io/project-build-plugin/release/7.1/share-engine-core-classpath-mojo.html"&gt;https://axonivy.github.io/project-build-plugin/release/7.1/share-engine-core-classpath-mojo.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Just bind its execution to a phase that runs before your annotation scanning. And then configure the property &lt;code&gt;${ivy.engine.core.classpath}&lt;/code&gt; as additionalClasspath on your annotation scanning plugin.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reguel Wermelinger</dc:creator><pubDate>Thu, 29 Mar 2018 11:28:04 -0400</pubDate><guid>https://answers.axonivy.com/questions/3163/how-to-load-ivy-class-to-class-loader-on-maven-plugin/3164</guid></item></channel></rss>