0

I have two java projects in eclipse. One is maven enabled, the another one is just a normal java project. I want my maven project to reference the java project on build path.

My question is, Any simple way to reference the java project without changing it to a maven project ?

Firstly, i know that i can export the project as a jar and then maven install it. Then i can reference it in the dependency section of pom.xml. This is not dynamic enough to suit my needs.

Is there a maven plugin that can help me. Thanks in advance.

Tommy
  • 1,960
  • 1
  • 19
  • 32
  • possible duplicate of [How to add a local non-maven project as a dependency for a maven project?](http://stackoverflow.com/questions/12163153/how-to-add-a-local-non-maven-project-as-a-dependency-for-a-maven-project) – Seelenvirtuose Mar 10 '15 at 07:02
  • possible duplicate of [Maven compile with multiple src directories](http://stackoverflow.com/questions/270445/maven-compile-with-multiple-src-directories) – ArturoTena Mar 10 '15 at 07:10
  • @Seelenvirtuose It could be a duplicate. What i am asking is any alternative to fix the problem instead of mavenizing it (out of my control) or mvn install (time consuming). I hope you understand it is not waste to ask for this question. – Tommy Mar 10 '15 at 07:11
  • @Tommy The link I posted provides a configuration you can use on your Mavenized project to "import" the sources of the other regular project. I understand that is your goal. If not, tell me more details. – ArturoTena Mar 10 '15 at 07:13
  • @Arturo Tena It is a solutions but not perfect. That project has a user library that has a lot of jar files inside. It would be great if i can directly reference the project. I would accept it if there isn't any new idea. Thanks for the help =) – Tommy Mar 10 '15 at 07:23
  • @Tommy I see. The other project consist solely on JARs? – ArturoTena Mar 10 '15 at 07:25
  • @Arturo Tena Yup, only user library and src/ folder – Tommy Mar 10 '15 at 07:34

1 Answers1

1

You can use the answer here (https://stackoverflow.com/a/22300875) to "import" the JARs, and the link (Maven compile with multiple src directories) for the source. That way the project will remain pure Maven. Let me know if Eclipse has some issue with this solution.

Community
  • 1
  • 1
ArturoTena
  • 713
  • 5
  • 15