{"id":208,"date":"2022-04-03T05:13:30","date_gmt":"2022-04-03T05:13:30","guid":{"rendered":"https:\/\/vkrastev1blog.com\/?p=208"},"modified":"2022-04-03T05:13:30","modified_gmt":"2022-04-03T05:13:30","slug":"maven-excluding-jars-from-war-file","status":"publish","type":"post","link":"https:\/\/vkrastev1blog.com\/2022\/04\/03\/maven-excluding-jars-from-war-file\/","title":{"rendered":"Maven \u10d2\u10d0\u10db\u10dd\u10d9\u10da\u10d4\u10d1\u10d8\u10d7 \u10e5\u10d8\u10da\u10d4\u10d1\u10e1 WAR \u10e4\u10d0\u10d8\u10da\u10d8\u10d3\u10d0\u10dc"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u10db\u10d4 \u10db\u10e5\u10dd\u10dc\u10d3\u10d0 \u10de\u10e0\u10dd\u10d1\u10da\u10d4\u10db\u10d0, \u10e0\u10dd\u10db \u10d2\u10d0\u10db\u10dd\u10d5\u10e0\u10d8\u10ea\u10ee\u10dd \u10e0\u10d0\u10db\u10d3\u10d4\u10dc\u10d8\u10db\u10d4 \u10e5\u10d8\u10da\u10d0 War File-\u10d3\u10d0\u10dc maven-\u10d7\u10d0\u10dc. \u10d0\u10db\u10d8\u10e1 \u10d2\u10d0\u10d9\u10d4\u10d7\u10d4\u10d1\u10d0 \u10e8\u10d4\u10d2\u10d8\u10eb\u10da\u10d8\u10d0\u10d7 maven-war-plugin-\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e7\u10d4\u10dc\u10d4\u10d1\u10d8\u10d7<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;project&gt;\r\n  ...\r\n  &lt;build&gt;\r\n    &lt;plugins&gt;\r\n      &lt;plugin&gt;\r\n        &lt;artifactId&gt;maven-war-plugin&lt;\/artifactId&gt;\r\n        &lt;version&gt;3.3.2&lt;\/version&gt;\r\n        &lt;configuration&gt;\r\n          &lt;packagingExcludes&gt;WEB-INF\/lib\/xxxx*.jar&lt;\/packagingExcludes&gt;\r\n        &lt;\/configuration&gt;\r\n      &lt;\/plugin&gt;\r\n    &lt;\/plugins&gt;\r\n  &lt;\/build&gt;\r\n  ...\r\n&lt;\/project&gt;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u10db\u10d4 \u10db\u10e5\u10dd\u10dc\u10d3\u10d0 \u10de\u10e0\u10dd\u10d1\u10da\u10d4\u10db\u10d0, \u10e0\u10dd\u10db \u10d2\u10d0\u10db\u10dd\u10d5\u10e0\u10d8\u10ea\u10ee\u10dd \u10e0\u10d0\u10db\u10d3\u10d4\u10dc\u10d8\u10db\u10d4 \u10e5\u10d8\u10da\u10d0 War File-\u10d3\u10d0\u10dc maven-\u10d7\u10d0\u10dc. \u10d0\u10db\u10d8\u10e1 \u10d2\u10d0\u10d9\u10d4\u10d7\u10d4\u10d1\u10d0 \u10e8\u10d4\u10d2\u10d8\u10eb\u10da\u10d8\u10d0\u10d7 maven-war-plugin-\u10d8\u10e1 \u10d2\u10d0\u10db\u10dd\u10e7\u10d4\u10dc\u10d4\u10d1\u10d8\u10d7<\/p>\n","protected":false},"author":65283547,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1017],"tags":[732111309,732111318],"class_list":["post-208","post","type-post","status-publish","format-standard","hentry","category-1017","tag-732111309","tag-maven-e"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4CoHV-3m","jetpack-related-posts":[{"id":247,"url":"https:\/\/vkrastev1blog.com\/2024\/04\/11\/how-to-create-pdf-from-html-or-image-using-java-pdfbox-framework\/","url_meta":{"origin":208,"position":0},"title":"\u10e0\u10dd\u10d2\u10dd\u10e0 \u10e8\u10d4\u10d5\u10e5\u10db\u10dc\u10d0\u10d7 PDF HTML \u10d0\u10dc \u10e1\u10e3\u10e0\u10d0\u10d7\u10d8\u10d3\u10d0\u10dc Java pdfbox \u10e9\u10d0\u10e0\u10e9\u10dd\u10e1 \u10d2\u10d0\u10db\u10dd\u10e7\u10d4\u10dc\u10d4\u10d1\u10d8\u10d7","author":"vkrastev2014","date":"11.04.2024","format":false,"excerpt":"Following example code here: In pom.xml insert or get the jar files and add them to the java project if you don't use maven <repositories> <repository> <id>jitpack.io<\/id> <url>https:\/\/jitpack.io<\/url> <\/repository> <\/repositories> <!-- https:\/\/mvnrepository.com\/artifact\/org.apache.pdfbox\/pdfbox --> <dependency> <groupId>org.apache.pdfbox<\/groupId> <artifactId>pdfbox<\/artifactId> <version>3.0.2<\/version> <\/dependency> <!-- https:\/\/mvnrepository.com\/artifact\/com.github.hkirk\/java-html2image --> <dependency> <groupId>com.github.hkirk<\/groupId> <artifactId>java-html2image<\/artifactId> <version>0.9<\/version> <\/dependency> and Java code here\u2026","rel":"","context":"In &quot;\u10ef\u10d0\u10d5\u10d0&quot;","block_context":{"text":"\u10ef\u10d0\u10d5\u10d0","link":"https:\/\/vkrastev1blog.com\/category\/%e1%83%af%e1%83%90%e1%83%95%e1%83%90\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":217,"url":"https:\/\/vkrastev1blog.com\/2022\/05\/20\/eclipse-how-to-use-the-jpa-static-metamodel-classes-while-writing-criteria-queries-in-hibernate\/","url_meta":{"origin":208,"position":1},"title":"\u10d3\u10d0\u10d0\u10d9\u10d5\u10d8\u10e0\u10d3\u10d8\u10d7, \u10e0\u10dd\u10d2\u10dd\u10e0 \u10d2\u10d0\u10db\u10dd\u10d8\u10e7\u10d4\u10dc\u10dd\u10d7 JPA \u10e1\u10e2\u10d0\u10e2\u10d8\u10d9\u10e3\u10e0\u10d8 \u10db\u10d4\u10e2\u10d0\u10db\u10dd\u10d3\u10d4\u10da\u10d8\u10e1 \u10d9\u10da\u10d0\u10e1\u10d4\u10d1\u10d8 Hibernate-\u10e8\u10d8 \u10d9\u10e0\u10d8\u10e2\u10d4\u10e0\u10d8\u10e3\u10db\u10d4\u10d1\u10d8\u10e1 \u10db\u10dd\u10d7\u10ee\u10dd\u10d5\u10dc\u10d4\u10d1\u10d8\u10e1 \u10d3\u10d0\u10ec\u10d4\u10e0\u10d8\u10e1\u10d0\u10e1","author":"vkrastev2014","date":"20.05.2022","format":false,"excerpt":"When you use Maven you have to add in your POM following dependency: <dependency> <groupId>org.hibernate<\/groupId> <artifactId>hibernate-jpamodelgen<\/artifactId> <version>5.3.7.Final<\/version> <\/dependency> Now you have to add folder target\\generated-sources\\annotations to your classpath as by default, the classes will be generated in this folder only. You go in Project Build Path -> Configure Build Path\u2026","rel":"","context":"In &quot;\u10ef\u10d0\u10d5\u10d0&quot;","block_context":{"text":"\u10ef\u10d0\u10d5\u10d0","link":"https:\/\/vkrastev1blog.com\/category\/%e1%83%af%e1%83%90%e1%83%95%e1%83%90\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":194,"url":"https:\/\/vkrastev1blog.com\/2022\/03\/30\/java-configure-log4j2-in-your-project\/","url_meta":{"origin":208,"position":2},"title":"\u10ef\u10d0\u10d5\u10d8\u10e1 \u10d9\u10dd\u10dc\u10e4\u10d8\u10d2\u10e3\u10e0\u10d0\u10ea\u10d8\u10d0 Log4j2 \u10d7\u10e5\u10d5\u10d4\u10dc\u10e1 \u10de\u10e0\u10dd\u10d4\u10e5\u10e2\u10e8\u10d8","author":"vkrastev2014","date":"30.03.2022","format":false,"excerpt":"Log4j2 and SLF4j Binding DependenciesTo make Log4j2 work with SLF4J, we need to include the following 3 dependencies. log4j-slf4j-impl.jar \u2013 Log4j 2 SLF4J binding. It allows applications coded to the SLF4J API to use Log4j2 as the implementation.log4j-api.jar \u2013 provides the adapter components required for implementers to create a logging\u2026","rel":"","context":"In &quot;\u10ef\u10d0\u10d5\u10d0&quot;","block_context":{"text":"\u10ef\u10d0\u10d5\u10d0","link":"https:\/\/vkrastev1blog.com\/category\/%e1%83%af%e1%83%90%e1%83%95%e1%83%90\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":189,"url":"https:\/\/vkrastev1blog.com\/2022\/03\/24\/exclude-pom-dependency-from-all-dependencies-in-java-project-eclipse\/","url_meta":{"origin":208,"position":3},"title":"\u10d2\u10d0\u10db\u10dd\u10e0\u10d8\u10ea\u10ee\u10d4\u10d7 \u10de\u10dd\u10db \u10d3\u10d0\u10db\u10dd\u10d9\u10d8\u10d3\u10d4\u10d1\u10e3\u10da\u10d4\u10d1\u10d0 \u10e7\u10d5\u10d4\u10da\u10d0 \u10d3\u10d0\u10db\u10dd\u10d9\u10d8\u10d3\u10d4\u10d1\u10e3\u10da\u10d4\u10d1\u10d8\u10d3\u10d0\u10dc Java Project Eclipse-\u10e8\u10d8","author":"vkrastev2014","date":"24.03.2022","format":false,"excerpt":"I have had a problem to exclude a dependency from all dependencies in POM file. If you dont use Eclipse you have to put exlusioin clauses on all dependencies in POM file for this dependency. I use Eclipse and you can do following. Open the Project in Eclipse in Package\u2026","rel":"","context":"In &quot;\u10ef\u10d0\u10d5\u10d0&quot;","block_context":{"text":"\u10ef\u10d0\u10d5\u10d0","link":"https:\/\/vkrastev1blog.com\/category\/%e1%83%af%e1%83%90%e1%83%95%e1%83%90\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":83,"url":"https:\/\/vkrastev1blog.com\/2014\/05\/16\/how-to-set-up-the-classpath-in-jar-manifest\/","url_meta":{"origin":208,"position":4},"title":"\u10e0\u10dd\u10d2\u10dd\u10e0 \u10d3\u10d0\u10d5\u10d0\u10e7\u10d4\u10dc\u10dd\u10d7 classpath jar manifest-\u10e8\u10d8","author":"vkrastev2014","date":"16.05.2014","format":false,"excerpt":"You must break after exactly 70 characters. Otherwise the next line is not going to be treated as a continuation from the previous. There should be a leading space in all the wrapped lines, with a leading space for every line different from that with \"Class-path:\". And don't forget a\u2026","rel":"","context":"In &quot;\u10ef\u10d0\u10d5\u10d0&quot;","block_context":{"text":"\u10ef\u10d0\u10d5\u10d0","link":"https:\/\/vkrastev1blog.com\/category\/%e1%83%af%e1%83%90%e1%83%95%e1%83%90\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":47,"url":"https:\/\/vkrastev1blog.com\/2014\/05\/11\/how-to-sign-jars-signing-jars-for-use-in-applets\/","url_meta":{"origin":208,"position":5},"title":"\u10e0\u10dd\u10d2\u10dd\u10e0 \u10db\u10dd\u10d5\u10d0\u10ec\u10d4\u10e0\u10dd\u10d7 \u10ee\u10d4\u10da\u10d8 \u10e5\u10d8\u10da\u10d4\u10d1\u10e1. \u10e5\u10d8\u10da\u10d4\u10d1\u10e8\u10d8 \u10ee\u10d4\u10da\u10db\u10dd\u10ec\u10d4\u10e0\u10d0 \u10d0\u10de\u10da\u10d4\u10e2\u10d4\u10d1\u10e8\u10d8 \u10d2\u10d0\u10db\u10dd\u10e1\u10d0\u10e7\u10d4\u10dc\u10d4\u10d1\u10da\u10d0\u10d3.","author":"vkrastev2014","date":"11.05.2014","format":false,"excerpt":"As the Browsers now want the Jars to be signed it happens oft that man have to sign a Jar himself. Here is a Manual how to sign a Jar. First you have to install Java SDK. http:\/\/www.oracle.com\/technetwork\/java\/javase\/downloads\/index.html?ssSourceSiteId=otnjp Install the JDK from the list for the envitonment you use. This\u2026","rel":"","context":"In &quot;\u10ef\u10d0\u10d5\u10d0&quot;","block_context":{"text":"\u10ef\u10d0\u10d5\u10d0","link":"https:\/\/vkrastev1blog.com\/category\/%e1%83%af%e1%83%90%e1%83%95%e1%83%90\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/posts\/208","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/users\/65283547"}],"replies":[{"embeddable":true,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/comments?post=208"}],"version-history":[{"count":4,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/posts\/208\/revisions"}],"predecessor-version":[{"id":212,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/posts\/208\/revisions\/212"}],"wp:attachment":[{"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/media?parent=208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/categories?post=208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vkrastev1blog.com\/wp-json\/wp\/v2\/tags?post=208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}