We are upgrading from iText 2.1.7 to the iText 7.1.13 latest version. we are not using maven. Its a existing project so we cant change it to maven. Just directly adding the jar. For the iText 2.1.7 we have iText-2.1.7 jar, but now I can't seem to find the main iText-7.1.13 jar. where can I get iText jar.
The zip files here provide the supporting jar but does not contain - iText jar. https://github.com/itext/itext7/releases/tag/7.1.13
For iText 7 there is not one single jar, it is split up in several modules. You need all the jars in the ...-only-jars.zip on the page your provided. Ok, maybe not all the jars, if you don't use certain features, but at least io, kernel, layout and maybe other modules too, depending on which features you need. For example if you don't use barcodes then you don't need the barcodes jar.
Also, iText 7 is a complete rewrite, and the API is not backwards compatible. Which means that you may need to rewrite parts of your code.
Related
As of Java 11 it is necessary to get JAXB from a separate library, not from the JDK. There are plenty of tutorials on the Web showing how to do that, but they all use Maven. The project I need to fix is an Eclipse RCP application. There does not seem to be an easy to make that work with Maven, as Maven essentially takes over most of what Eclipse would do but doesn't have RCP development capabilities.
Sooner or later Maven gets the required libraries. I would like to find another way to get and use whatever libraries are needed, just without using Maven. It should be possible. I just haven't found it.
Thanks.
I did what I wanted by downloading the needed JARs from https://mvnrepository.com/.
I've been looking for the answer to this for a few days and have turned up empty.
I'm devving a Confluence plugin that integrates with a 3rd party app. This 3rd party app has a nice REST API and they even provide a Java SDK (yay!). Except.....the Java SDK has bundled a version of Jersey (1.18) that conflicts with Confluence's forked version of Jersey (1.8-atlassian_15). The SDK was not released as a Maven jar (or at least there's no pom.xml included). There ARE other pom.xml in the jar's META-INF for the dependencies it uses, but the SDK itself is just released as a jar download by the vendor.
So as I've done in the past, I mvn install:install-file the sucker with my own groupId and artifactId, thinking it'd be fine. Intellij recognized the library, everything compiled nicely, and then I tried my test call to the REST API. This is when it threw an error that made it evident that there's a conflict between the versions.
SOOOO. Is there anyway to get around this? Can I "sandbox" the SDK jar in a way the executes code in its own deal without being exposed to the nasties of Confluence's builtin version of libraries the SDK uses? I have a feeling that even after the Jersey dependency is resolved (if that's even possible) there will be other issues....The SDK also bundles the specific version of Jackson, Swagger, etc. with it.
I attempted to decompile the jar and include the decompiled code in my project, but that just had all of issues I'd rather not deal with ever again.
I have reached out the SDK devs to see if they could release a more maven-friendly release, but I'm not hopeful this will be done at all, and even it is, their release cycle is much different than my own requirements (read: I need a solution now). This is my last-ditch effort before rewriting the REST client from scratch.
Can I "sandbox" the SDK jar in a way the executes code in its own deal without being exposed to the nasties of Confluence's builtin version of libraries the SDK uses?
Sure you can. Often-used way to do this is to use Maven shade plugin that transforms an existing jar to a shaded jar, using another package hierarchy and getting rid of the package naming conflict. See also the documentation about relocating packages. I suggest you use that - that's what I've done in cases like this (though I haven't done confluence plugin development, but it should be the same thing as with other platforms).
I would like to ask, if there is some maven plugin (or another way) to generate jboss modules hierarchy (with modules.xml files) from maven dependencies (or in list of libraries for such a maven plugin) ?
I have found this plugin :
https://www.smartics.eu/confluence/display/SJBMMP/smartics+JBoss+Modules+Maven+Plugin;jsessionid=3CA5AE2D1DEB5DFB62C1E64692EDCAB6
But documentation / usage pages seem to be offline (or for some reason I cannot open page).
Thank you very much for your help !
I have tried SMARTICS plugin plugin and it created for each maven module special JAR file with ALL dependencies in it.
It is like using maven assembly plugin but all libraries are packed in standalone jar which can be placed into own jboss module. Than in your application : jboss-deployment-structure.xml you reference to this librari (e.g. jar file) and application has all libraries provided.
But splitting dependencies into own directories and generating modules.xml is not possible (confirmed by JBOSS EAP support).
I will create standalone maven project (something like "JBOSS-modules BOM project") which will generate such structure (this structure will be ready for usage on jboss).
I just would like to add an introduction to the mentioned plugin for Maven:
https://www.smartics.eu/confluence/display/BLOG/2013/10/18/Maven+Plugin+to+generate+a+Modules+Directory+for+JBoss+AS+7
The article includes screenshots that help new users to get an idea on how the plugin generates separate modules.
(I would like to comment to your answer, but unfortunately I'm some points from being entitles to do so :( )
I'm trying to figure out how to make my WARs lighter by putting JasperReports, Apache POI and other heavy libs directly to JBoss AS by using JBoss Modules.
Now, Jasper uses many many libraries to generate PDF or XLS files as you can see here. Our templates are pretty old and we are stuck with old jasper version 3.7.1 which of course uses older versions of libraries such as commons which are already present on JBoss AS 7.1.1 modules.
How can I make one "big" module which will contain all jars used by Jasper and keep other parts of application using newer modules?
Putting all jars into separate directories seems so much work without guaranteed success, can we put everything into one module without creating package alike directories?
We started with JBoss modules recently and wrote a small plugin for Maven that generates module folders with module.xmls based on XML descriptors. The plugin is called smartics-jboss-modules-maven-plugin and you'll find additional information about it at the project's blog.
We just started to work with it, but it already makes the process of synchronization between the POM and the module.xml (plus directory structure) for our projects very easy.
The downside of this approach is that you have to learn an additional XML descriptor and have to configure an additional Maven plugin.
If you want to give it a try, the plugin is licensed under Apache License 2.0.
The creation of JBoss modules for external libraries can be automated through maven as explained in another answer here on SO. The author has posted a GitHub project too. This can lessen the pain in managing lots of transitive dependencies.
I'm working on an open-source project (neo4j-connector) which make intensive use of maven-shade-plugin to include in packaged RAR the neo4j application without referencing multiple jars (seems like a limitation of maven-rar-plugin).
Anyway, when doing so, the neo4j-connector-impl (which uses the shade plugin) pom references neo4j as a dependency, which is not totally exact, as neo4j source code is embedded in neo4j-connector-impl jar.
I've noticed there is a createDependencyReducedPom flag that allows one to generate a pom containing only non-shaded components. How can i use that pom instead of the standard one for dependencies of that project ?