java - Eclipse Maven Workspace Resolution not seeing Generated Classes -


i have 2 maven projects in eclipse, jar , war. war has dependency on jar, resolved through workspace resolution.

the problem jar has generated classes, added jar through build-helper-maven-plugin. these classes aren't being resolved in war project. example: auto-completes class keeps saying can't found. more importantly, when running glassfish through eclipse, class not found these classes.

if disable workspace resolution works fine, hope use workspace resolution. ideas?

edit: folder structure. maven workspace resolved persistence project in lower image in maven dependencies folder, seeing top , bottom of folder.

enter image description here

workspace resolution

idk if correct, talking eclipse problems - not "see" generated classes right?

to fix it, have add generated sources directory eclipse's build path , should fix problem.

  1. right click on project has generated classes->buildpath->conf buildpath
  2. in source tab - click add folder
  3. select directory build helper generates java files.

generated classes apear additional source folder in eclipse's project hierarchy , voila, eclipse can autocomplete , resolve generated classes on same conditionstha on other class written in same project hand.


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

java.lang.NoClassDefFoundError When Creating New Android Project -

Decoding a Python 2 `tempfile` with python-future -