Frage

Recently I have been developing an aplication which uses Google Prediction API. It contains 3 modules:

  1. WebApp for frontend part
  2. Data parser to process some data and load it to DB
  3. Common components like POJO objects, utils, etc.

All modules are configured with Maven with parent project on top. Parent project holds all common dependencies. Both webapp and data parser utilize JDO to access DB. Now I have two the same jdoconfig.xml files in webapp and parser module.

I tried to put it in src/main/resources of common module but it gave me NucleusUserException: No "persistence.xml" file was found in the CLASSPATH.

Is it possible to move it to common module and use it everywhere in whole project?

War es hilfreich?

Lösung

Yes, it is possible, and easy. In all likelihood, you want to move those common files to your "common components" project, or possibly to a new project. So long as

  1. jdoconfig.xml and any other common xml files are in src/main/resources (so that they're in the root of your classpath), and
  2. the packaging of your chosen project is "jar",

you should be able to use those files without a problem.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top