문제

If I use the Ant build script then it would include my created JAPE files if I put them in the right folder. But if I want to use GATE from maven, how do I include my own JAPE files?

도움이 되었습니까?

해결책

Even if you pull in the core GATE libraries from Maven central you will still need a copy of the plugins your application requires - the plugins are not available from a Maven repository. The process of developing a GATE application is the same whatever build system you're using, you need to copy the relevant plugins from the distribution into your project somewhere, then modify/add/remove components as appropriate.

Best practice when developing an application that uses GATE Embedded is generally:

  1. Don't rely on an "installation" of GATE - create a directory within your project to act as gate.home, with a private copy of the site and user configuration files and call the appropriate Gate.setGateHome, Gate.setUserConfigFile etc. before you call Gate.init (see the Tomcat example in the user guide).
  2. Similarly, don't rely on the system-wide GATE plugins - copy all the plugins your application depends on into your project and load them from there instead of from the GATE installation.
  3. If possible, develop and test your GATE application(s) using GATE Developer, by unloading the "installed" plugins and loading your project's private copies instead. Build your application in the usual way, then "save application state". In your embedded application all you need to do then is use the PersistenceManager to re-load the saved state, you don't need to explicitly call CreoleRegister.registerDirectories as the PersistenceManager will handle that for you.

You can bootstrap steps 2 and 3 by building an application in GATE Developer and using the "export for GATECloud.net" option to package the application along with copies of all the plugins it requires into a zip file, which you can then unpack into your project work space.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top