setting up under eclipse

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

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:

svn co svn://svn.openvpms.org/openvpms/projects/openvpms/trunk openvpms

 

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

 

svn co svn://svn.openvpms.org/openvpms/projects/openvpms/trunk openvpms

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:

        <profile>
            <id>default</id>
            <activation>
                <property>
                    <name>!skipDefaultProfile</name>
                    <!-- activeByDefault doesn't work if -Prelease is specified -->
                </property>
            </activation>
            <properties>
                <jdbc.groupId>mysql</jdbc.groupId>
                <jdbc.artifactId>mysql-connector-java</jdbc.artifactId>
                <jdbc.version>5.1.5</jdbc.version>
                <build.jdbc.driverClassName>com.mysql.jdbc.Driver</build.jdbc.driverClassName>
                <build.hibernate.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</build.hibernate.dialect>
                <build.jdbc.db>openvpms-1_8</build.jdbc.db>
                <build.jdbc.server>jdbc:mysql://localhost:3306/</build.jdbc.server>
                <build.jdbc.url>${build.jdbc.server}${build.jdbc.db}</build.jdbc.url>
                <build.jdbc.username>openvpms</build.jdbc.username>
                <build.jdbc.password>openvpms</build.jdbc.password>
                <release.hibernate.dialect>${build.hibernate.dialect}</release.hibernate.dialect>
                <release.jdbc.driverClassName>${build.jdbc.driverClassName}</release.jdbc.driverClassName>
                <release.jdbc.url>${build.jdbc.url}</release.jdbc.url>
                <release.jdbc.username>${build.jdbc.username}</release.jdbc.username>
                <release.jdbc.password>${build.jdbc.password}</release.jdbc.password>
            </properties>
        </profile>
        <profile>
            <id>release</id>
            <properties>
                <release.jdbc.url>jdbc:mysql://localhost:3306/openvpms</release.jdbc.url>
            </properties>
        </profile>
    </profiles>

These can be overridden on the command line, or via setttings.xml

 

Syndicate content