I am trying to convert Docx file to pdf file java using apache poi, itext, Xdocreport but its working on maven project using pom file. we don't need a maven project, so I disabled maven nature in eclipse in maven but still its always showing different dependencies. how to make it work after deconverting maven to java project?
How to convert Maven project to normal java project?
5k views Asked by Vicky Johnson At
2
There are 2 answers
0

Maven pulled all required jars into the local repository.
After you removed the pom.xml and modified the .project
file that it does not contain any more Maven reference (basically the <nature> and the <buildCommand>), you create a new folder lib
in the root of your project and copy all the jars from the local Maven repository to that new folder.
Then add the jars to the CLASSPATH ('Properties'|'Java Build Path', and there 'Libraries'). If configured, the local Maven repository holds also the JavaDoc and the Source jars; these need not to be added to the CLASSPATH, for obvious reasons, but you should add a reference to them to the respective binary jars.
Happy to see someone needs that feature I implemented all those years ago in JBoss Tools :-) I'll basically copy/paste the content of what I wrote in https://docs.jboss.org/tools/whatsnew/core/core-news-3.3.0.M4.html back then:
Basically, after installing the JBoss Tools JDT Extensions feature, you can right-click on a Classpath Library from one of your Java projects (In the Project Explorer view for example, go under Java Resources > Libraries) and select the "Materialize Library..." menu.
This will open a new dialog window in which you can choose the destination folder into which will be copied the selected jars:
Once materialized, jars are copied and referenced directly in the classpath, the Classpath Library is removed. in the case of Maven-powered projects, the Maven nature is removed, thus disabling the Maven builder. If you want to enable the Maven nature back on, just right-click on your project and select
Configure > Convert to Maven Project
.