{"id":225,"date":"2019-02-27T22:52:04","date_gmt":"2019-02-27T21:52:04","guid":{"rendered":"http:\/\/blog.xoupix.fr\/?p=225"},"modified":"2019-03-06T09:04:20","modified_gmt":"2019-03-06T08:04:20","slug":"generate-an-ibm-content-navigator-plugin-using-maven","status":"publish","type":"post","link":"https:\/\/blog.xoupix.fr\/index.php\/2019\/02\/27\/generate-an-ibm-content-navigator-plugin-using-maven\/","title":{"rendered":"Generate an IBM Content Navigator plugin using Maven"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Why this post ?<\/h2>\n\n\n\n<p align=\"justify\">Recently, I was questionned about testing log4j2 and slf4j on an IBM Content Navigator plugin. Because this software load the jar as a &#8220;java -jar&#8221; execution, there is some formalism to respect.<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p>Maven 3.6.0<br>IBM Content Navigator 3.0.3<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Pom definition<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;project xmlns=\"http:\/\/maven.apache.org\/POM\/4.0.0\"\n  xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\"\n  xsi:schemaLocation=\"http:\/\/maven.apache.org\/POM\/4.0.0 \n  http:\/\/maven.apache.org\/xsd\/maven-4.0.0.xsd\">\n\n  &lt;modelVersion>4.0.0&lt;\/modelVersion>\n  &lt;groupId>my.group.id&lt;\/groupId>\n  &lt;artifactId>icn-plugin&lt;\/artifactId>\n  &lt;version>0.0.1-SNAPSHOT&lt;\/version>\n\n  &lt;build>\n    &lt;plugins>\n      &lt;plugin>\n        &lt;artifactId>maven-assembly-plugin&lt;\/artifactId>\n        &lt;version>3.1.1&lt;\/version>\n        &lt;executions>\n          &lt;execution>\n            &lt;id>make-assembly&lt;\/id>\n            &lt;phase>package&lt;\/phase>\n            &lt;goals>\n              &lt;goal>single&lt;\/goal>\n            &lt;\/goals>\n            &lt;configuration>\n              &lt;outputDirectory>${basedir}\/target\/&lt;\/outputDirectory>\n              &lt;finalName>IcnPlugin.jar&lt;\/finalName>\n              &lt;archive>\n                &lt;manifestEntries>\n                  &lt;Plugin-Class>my.group.id.IcnPlugin&lt;\/Plugin-Class>\n                &lt;\/manifestEntries>\n              &lt;\/archive>\n              &lt;descriptorRefs>\n                &lt;descriptorRef>jar-with-dependencies&lt;\/descriptorRef>\n              &lt;\/descriptorRefs>\n            &lt;\/configuration>\n          &lt;\/execution>\n        &lt;\/executions>\n      &lt;\/plugin>\n    &lt;\/plugins>\n  &lt;\/build>\n\n  &lt;dependencies>\n    &lt;!-- https:\/\/mvnrepository.com\/artifact\/junit\/junit -->\n    &lt;dependency>\n      &lt;groupId>junit&lt;\/groupId>\n      &lt;artifactId>junit&lt;\/artifactId>\n      &lt;version>4.12&lt;\/version>\n      &lt;scope>test&lt;\/scope>\n    &lt;\/dependency>\n    &lt;dependency>\n      &lt;groupId>org.apache.logging.log4j&lt;\/groupId>\n      &lt;artifactId>log4j-core&lt;\/artifactId>\n      &lt;version>2.11.1&lt;\/version>\n      &lt;scope>compile&lt;\/scope>\n    &lt;\/dependency>\n    &lt;dependency>\n      &lt;groupId>com.ibm.filenet&lt;\/groupId>\n      &lt;artifactId>icn-3.0.0&lt;\/artifactId>\n      &lt;version>icn300.000.41&lt;\/version>\n      &lt;scope>provided&lt;\/scope>\n    &lt;\/dependency>\n    &lt;dependency>\n      &lt;groupId>com.ibm.ws.javaee&lt;\/groupId>\n      &lt;artifactId>servlet&lt;\/artifactId>\n      &lt;version>3.0&lt;\/version>\n      &lt;scope>provided&lt;\/scope>\n    &lt;\/dependency>\n  &lt;\/dependencies>\n&lt;\/project><\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Why this post ? Recently, I was questionned about testing log4j2 and slf4j on an IBM Content Navigator plugin. Because this software load the jar as a &#8220;java -jar&#8221; execution, there is some formalism to respect.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,15],"tags":[],"class_list":["post-225","post","type-post","status-publish","format-standard","hentry","category-ibm-content-navigator","category-maven"],"_links":{"self":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts\/225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/comments?post=225"}],"version-history":[{"count":7,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts\/225\/revisions"}],"predecessor-version":[{"id":256,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts\/225\/revisions\/256"}],"wp:attachment":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/media?parent=225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/categories?post=225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/tags?post=225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}