Questions Tagged With mavenhttps://answers.axonivy.com/tags/maven/?type=rss&user=anhlequestions tagged <span class="tag">maven</span>enTue, 25 Feb 2020 05:00:38 -0500Some problems when build with maven-compiler-plugin version 3.8.0https://answers.axonivy.com/questions/4414/some-problems-when-build-with-maven-compiler-plugin-version-3-8-0<p>Hello Ivy team In my project I'm using Designer 8.0.2, Engine 8.0.2, JDK 11, project-build-plugin version 8.0.0, maven 3.6.3 and maven-compiler-plugin version 3.8.0.</p> <p>When I build project with maven I have some problems as maven cannot find class belong to reference libraries <img alt="alt text" src="https://answers.axonivy.com/upfiles/1_XmB4vbD.JPG"></p> <p><img alt="alt text" src="https://answers.axonivy.com/upfiles/2_0Ibod4O.JPG"></p> <p>Or some libraries of Axon.ivy Libraries as <img alt="alt text" src="https://answers.axonivy.com/upfiles/3_jUwKtPm.JPG"> <img alt="alt text" src="https://answers.axonivy.com/upfiles/4_u9hVbbi.JPG"></p> <p>Plugins in my pom.xml</p> <pre><code>&lt;pluginManagement&gt; &lt;plugins&gt; &lt;plugin&gt; &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt; &lt;version&gt;3.1.0&lt;/version&gt; &lt;configuration&gt; &lt;filesets&gt; &lt;fileset&gt; &lt;directory&gt;src_test&lt;/directory&gt; &lt;includes&gt; &lt;include&gt;**/beans/*_.java&lt;/include&gt; &lt;/includes&gt; &lt;/fileset&gt; &lt;/filesets&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt; &lt;version&gt;3.1.0&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;process-resources&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;resources&lt;/goal&gt; &lt;goal&gt;testResources&lt;/goal&gt; &lt;/goals&gt; &lt;phase&gt;process-test-resources&lt;/phase&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt; &lt;version&gt;3.1.0&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;iar-as-property&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;properties&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;release&gt;11&lt;/release&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;com.axonivy.ivy.ci&lt;/groupId&gt; &lt;artifactId&gt;project-build-plugin&lt;/artifactId&gt; &lt;version&gt;${build.plugin.version}&lt;/version&gt; &lt;extensions&gt;true&lt;/extensions&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;initialize&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;share-engine-core-classpath&lt;/goal&gt; &lt;/goals&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;default-ivy-test-properties&lt;/id&gt; &lt;configuration&gt; &lt;skipTest&gt;true&lt;/skipTest&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt; &lt;version&gt;3.8.0&lt;/version&gt; &lt;configuration&gt; &lt;release&gt;11&lt;/release&gt; &lt;/configuration&gt; &lt;dependencies&gt; &lt;dependency&gt; &lt;groupId&gt;org.ow2.asm&lt;/groupId&gt; &lt;artifactId&gt;asm&lt;/artifactId&gt; &lt;version&gt;6.2&lt;/version&gt; &lt;/dependency&gt; &lt;/dependencies&gt; &lt;executions&gt; &lt;execution&gt; &lt;id&gt;process-meta-model&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;compile&lt;/goal&gt; &lt;/goals&gt; &lt;phase&gt;generate-sources&lt;/phase&gt; &lt;configuration&gt; &lt;classpathElements&gt;${maven.processor.classpath}&lt;/classpathElements&gt; &lt;annotationProcessorPaths&gt; &lt;path&gt; &lt;groupId&gt;org.hibernate&lt;/groupId&gt; &lt;artifactId&gt;hibernate-jpamodelgen&lt;/artifactId&gt; &lt;version&gt;5.4.12.Final&lt;/version&gt; &lt;/path&gt; &lt;/annotationProcessorPaths&gt; &lt;proc&gt;only&lt;/proc&gt; &lt;includes&gt; &lt;include&gt;**/beans/*&lt;/include&gt; &lt;/includes&gt; &lt;generatedSourcesDirectory&gt;${project.build.directory}/.apt_generated&lt;/generatedSourcesDirectory&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;execution&gt; &lt;id&gt;process-test-meta-model&lt;/id&gt; &lt;goals&gt; &lt;goal&gt;testCompile&lt;/goal&gt; &lt;/goals&gt; &lt;phase&gt;generate-test-sources&lt;/phase&gt; &lt;configuration&gt; &lt;classpathElements&gt;${project.build.outputDirectory},${maven.processor.classpath},${org.jmockit:jmockit:jar},${junit:junit:jar},${org.hamcrest:hamcrest-core:jar},${log4j:log4j:jar}&lt;/classpathElements&gt; &lt;annotationProcessorPaths&gt; &lt;path&gt; &lt;groupId&gt;org.hibernate&lt;/groupId&gt; &lt;artifactId&gt;hibernate-jpamodelgen&lt;/artifactId&gt; &lt;version&gt;5.4.12.Final&lt;/version&gt; &lt;/path&gt; &lt;/annotationProcessorPaths&gt; &lt;proc&gt;only&lt;/proc&gt; &lt;includes&gt; &lt;include&gt;**/beans/*&lt;/include&gt; &lt;/includes&gt; &lt;generatedTestSourcesDirectory&gt;${project.build.testSourceDirectory}&lt;/generatedTestSourcesDirectory&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; &lt;plugin&gt; &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt; &lt;artifactId&gt;maven-release-plugin&lt;/artifactId&gt; &lt;version&gt;3.0.0-M1&lt;/version&gt; &lt;configuration&gt; &lt;checkModificationExcludes&gt; &lt;checkModificationExclude&gt;${project}/pom.xml&lt;/checkModificationExclude&gt; &lt;/checkModificationExcludes&gt; &lt;commitByProject&gt;true&lt;/commitByProject&gt; &lt;autoversionsubmodules&gt;true&lt;/autoversionsubmodules&gt; &lt;/configuration&gt; &lt;/plugin&gt; &lt;/plugins&gt; &lt;/pluginManagement&gt; </code></pre> <p>Please help me to resolve it. Thanks</p>anhleTue, 25 Feb 2020 05:00:38 -0500https://answers.axonivy.com/questions/4414/some-problems-when-build-with-maven-compiler-plugin-version-3-8-0mavenaxon.ivylibraryThe hibernate jpamodelgen cannot generate entities extended from a dependency projecthttps://answers.axonivy.com/questions/4407/the-hibernate-jpamodelgen-cannot-generate-entities-extended-from-a-dependency-project<p>I have 2 project A and B. Project A dependency project B. Project B have a "ToggleableEntity" class and Project A have a "OrganizationalUnit" class</p> <p>"OrganizationalUnit" class extend "ToggleableEntity" class. When I build with maven and using hibernate jpamodelgen to generate "OrganizationalUnit_" class then ToggleableEntity missed in "OrganizationalUnit_" class</p> <p>The pom.xml file <img alt="alt text" src="https://answers.axonivy.com/upfiles/demo_3.JPG"></p> <p>The result: <img alt="alt text" src="https://answers.axonivy.com/upfiles/demo_1.png"></p> <p>The expected <img alt="alt text" src="https://answers.axonivy.com/upfiles/demo_4.JPG"></p>anhleFri, 21 Feb 2020 04:08:26 -0500https://answers.axonivy.com/questions/4407/the-hibernate-jpamodelgen-cannot-generate-entities-extended-from-a-dependency-projectmavenhibernateSome libraries in Axon.ivy Libraries can not find when build with mavenhttps://answers.axonivy.com/questions/4400/some-libraries-in-axon-ivy-libraries-can-not-find-when-build-with-maven<p>Hello Ivy Team</p> <p>I'm using project-build-plugin with version 8.0.0 in my project But when I build project by maven. The maven can not find some packages in Axon.ivy Libraries EX: ch.ivyteam.ivy.environment,</p> <p><img alt="alt text" src="https://answers.axonivy.com/upfiles/error3.JPG"></p> <p><img alt="alt text" src="https://answers.axonivy.com/upfiles/erro3.JPG"></p> <p>It also happen when I use DatatypeConverter class in package javax.xml.bind</p> <p>Please help me to resolve it.</p> <p>Thanks</p>anhleTue, 18 Feb 2020 05:17:08 -0500https://answers.axonivy.com/questions/4400/some-libraries-in-axon-ivy-libraries-can-not-find-when-build-with-mavenmavenlibraryThe maven build has problem with axis2https://answers.axonivy.com/questions/4393/the-maven-build-has-problem-with-axis2<p>Hello Ivy Team</p> <p>When I migrate from Ivy 7 to ivy 8. I have problem when build project with maven. I added Axon.ivy WS Call (Axis2) and using it to call axis2 and soap in my project.</p> <p><img alt="alt text" src="https://answers.axonivy.com/upfiles/error1.JPG"></p> <p>But when I build with maven the error displayed <img alt="alt text" src="https://answers.axonivy.com/upfiles/error2.JPG"></p> <p>Please help me to resolve it. Thanks</p>anhleTue, 18 Feb 2020 02:04:34 -0500https://answers.axonivy.com/questions/4393/the-maven-build-has-problem-with-axis2mavenwebserviceaxisThe parent tag has a error in pom.xml filehttps://answers.axonivy.com/questions/4385/the-parent-tag-has-a-error-in-pom-xml-file<p>Hi IvyTeam</p> <p>I'm migrating from Ivy 7.0.11 to Ivy 8.0.2. When I import my project, the parent tag has a error in pom.xml file</p> <p>"Plugin execution not covered by lifecycle configuration: com.axonivy.ivy.ci:project-build-plugin:8.0.1:share-engine-core-classpath (execution: default, phase: initialize)"</p> <p>and Plugin execution not covered by lifecycle configuration: org.apache.maven.plugins:maven-dependency-plugin:3.1.1:properties (execution: iar-as-property, phase: initialize)</p> <pre><code>&lt;parent&gt; &lt;groupId&gt;axon.ivy&lt;/groupId&gt; &lt;artifactId&gt;myproject&lt;/artifactId&gt; &lt;version&gt;1.4.1&lt;/version&gt; &lt;relativePath&gt;../pom.xml&lt;/relativePath&gt; &lt;/parent&gt; </code></pre> <p>Please help me to resolve it. Thanks</p>anhleWed, 12 Feb 2020 23:08:23 -0500https://answers.axonivy.com/questions/4385/the-parent-tag-has-a-error-in-pom-xml-filemaven