Search code examples
javaeclipsemavenm2eclipse

How to convert Maven project to normal java project?


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?


Solution

  • 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. 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:

    Materialize Library wizard

    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.