setting up under eclipse
Submitted by Guest on Mon, 22/06/2015 - 23:29
hi
trying to setup the source under eclipse, just installed add the updates specified here :
http://www.openvpms.org/documentation/building-openvpms-eclipse
but getting the following errors, what am i doing wrong?
thanks
Description Resource Path Location Type
AuthorityData cannot be resolved to a type SecurityLoader.java /openvpms-framework/src/java/org/openvpms/tools/security/loader line 122 Java Problem
Mapping cannot be resolved to a type LoaderAdapter.java /openvpms-etl-load/src/java/org/openvpms/etl/kettle line 98 Java Problem
Re: setting up under eclipse
AuthorityData is a class generated by the castor-maven-plugin.
Note that documentation is fairly old, and the source tree has since been restructured to make it easier to work with.
You can get all the sources under the one tree using:
Re: setting up under eclipse
Ok thanks what plugins does it require seeing the doco is out of date
Re: setting up under eclipse
I don't run Eclipse, preferring IntelliJ instead. I've just installed Eclipse Luna, and its not a straight forward exercise to set up.
To avoid the hassle of finding a working m2eclipse/subversion connector, I checked out the sources using svn, and imported them into Eclipse using File -> Import -> Existing Maven Projects
On import, it comes up with a lot of "Plugin execution not covered by lifecycle configuration:" warnings. The workarounds for these are documented here:
https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html
Re: setting up under eclipse
ok thanks, so ive since changed over to IntelliJ, much easier already. But still getting errors, i have downloaded the source and run mvn generate-sources from the command line in the openvpms-frameworks and openvpms-reports directories.
I get an error regards to the mappings:
Error:(28, 29) java: cannot find symbol
symbol: class Mapping
location: package org.openvpms.etl.load
Re: setting up under eclipse
Same deal. You need to generate sources.
If you are using the latest source tree, just run mvn generate-sources from the root of the project and it will do it for the whole project.
Re: setting up under eclipse
tried that, gets to OpenVPMS Web App and fails.
Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:unpack......
failed to find artifact.
asking me to update the or download manually the files. But i ran
Re: setting up under eclipse
Run
> mvn -DskipTests install
from root.
It should build everything, but may fail at the package phase if you don't have MySQL set up with an openvpms and openvpms-1_8 database.
Re: setting up under eclipse
thanks ill try that, does it work with the latest Java JDK? or should i direct it to 1.7?
Re: setting up under eclipse
Java 8 is fine.
Note that I've updated the Getting Started with OpenVPMS page to reflect the requirements for building OpenVPMS 1.8
Re: setting up under eclipse
awesome got it running thanks for the patience :)
are there any upgrade scripts yet to migrate existing data to 1.8?
where do i set my own database name to use rather than openvpms-1_8
Re: setting up under eclipse
Migration scripts - I don't know where Tim A holds then in the source package, but in the release package they are in <OPENVPMS-HOME>/update/db - see http://www.openvpms.org/documentation/csh/1.8/topics/installing-openvpms...
Database name - in <OPENVPMS-HOME>/conf/hibernate.properties and <TOMCAT-HOME>/webapps/openvpms/WEB-INF/classes
Tim A uses openvpms-1_8 in the source package so that he can run multiple releases in the one mysql database. The package generation process adjusts things so that the release package uses plain 'openvpms'.
See also http://www.openvpms.org/documentation/csh/1.8/reference/setup/multiple-s...
Regards, Tim G
Re: setting up under eclipse
oh yep there is an update sql, awesome, saves me doing a comparison. Thanks for the direction on the database setup :)
Re: setting up under eclipse
The database properties are set in the root pom.xml:
These can be overridden on the command line, or via setttings.xml