How do I get Eclipse to resolve classes generated with Maven 2?

前端 未结 9 904
日久生厌
日久生厌 2020-12-12 22:11

I\'m using Google Protocol Buffers to generate some Java classes for my project. Using Maven 2 and its \"antrun\" plugin, these classes are freshly generated before compile,

9条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 22:43

    1. Right-click project and select Properties
    2. Choose Java Build Pathfrom the left and select the Source tab
    3. Click Add Folder
    4. Select the bin directory and click OK
    5. (project/target/generated-sources/xxxx) Click OK and Refresh the project

提交回复
热议问题