Re: [IPT] IPT Maven build error
just quick guys: we only use maven from the commandline, but run main classes and JUnit tests from within eclipse. I used eclipse 3.3 and 3.4 so far on OSX
to setup an eclipse IPT project I do:
a) svn checkout ... # into folder workspace/ipt b) mvn eclipse:eclipse # generates eclipse artifacts but uses the M2_REPO variable to locate your local maven repository c) set the M2_REPO variable via project properties-> java build path -
add variable to point to your local maven repository (on OSX this
is ~/.m2/repository) d) mvn -P prod # runs IPT locally with jetty on port 8080, skips tests, uses gbifs production registry and a local data dir in the webapps folder
if you use no profile at all and just run $mvn jetty IPT should use jetty on port 8080. But because currently not all tests succeed the build fails.
I have to admit that I switched to Java6 during this year, so there might be issues with java5. Although we run IPT using the WAR on gbif servers with java5 currently and there is no real reason why java5 should not be supported. If so, this is not intended and could surely be solved rather simply (e.g. SQLException I will look into).
sorry for being brief, but hope this still helps a bit. Markus
On Aug 27, 2009, at 18:27, Paul J. Morris wrote:
Aaron,
I haven't seen any documentation on it. I did your step 1, then, by hand in eclipse, set the source directories as sources, and added the jar files in gbif-providertool/target/gbif-ipt-1.0-SNAPSHOT/ WEB-INF/lib to the build path. I've had no luck with eclipse-maven integration (with eclipse 3.4.0 on debian etch), but I can build a working war file for the provider from the command line with
cd ~/workspace/ipt/gbif-providertool export JAVA_HOME=/[...]/jdk1.6.[...]] mvn -fn or with mvn -Dmaven.test.skip=true
In the current (1463) revision, I'm seeing 11 test failures and 2 errors, at least one of which looks like a reference to a GBIF network resource. Running org.gbif.provider.service.impl.RegistryManagerImplTest WARN main-HttpBaseManager.succeeded(214) | Http request to http://gbrds.gbif.org/registrydev/organisation/null?op=login failed: HTTP/1.1 404 Not Found Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.343 sec <<< FAILURE! This looks like it is testing a value found in gbif-provider/pom.xml <ipt.registry.url>http://gbrds.gbif.org/registrydev</ipt.registry.url>
Since I do a lot of development not attached to the network, a build dependency on a network resource is a problem (likewise another test that expects geoserver to be running on localhost:8080), and so I haven't gone hunting after the possible causes of the other test failures, and am just switching off the tests to build (which works allright as I'm working on some experimental filtered push annotation integration, and the resulting war file just needs to run).
Merry Snailing, -Paul
On Wed, 26 Aug 2009 15:45:47 -0700 Aaron Steele eightysteele@gmail.com wrote:
Also, do we have documentation for setting up Eclipse for IPT development? Here's how I've set things up in Eclipse so far:
- SVN checkout of trunk/gbif-providertool
-- Paul J. Morris Biodiversity Informatics Manager Harvard University Herbaria/Museum of Comparative Zoölogy mole@morris.net AA3SD PGP public key available
b) mvn eclipse:eclipse # generates eclipse artifacts but uses the M2_REPO
This step fails with r1465 due to the following build errors: http://txtb.in/4eZ
Are you not seeing these errors? Again, the workaround is setting the filtering property to true on line 268 of pom.xml.
no, I never had this and dont see it right now. Not on gbifs red hat machines, not on my macpro and also not on my macbook. If I run mvn clean; mvn I get this: http://txtb.in/4f5
Do you know what the list of VM warnings are precisely on your machine? [WARNING] Workspace defines a VM that does not contain a valid jre/lib/ rt.jar: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
This info which is responsible for your problem is also not existing on my machine and Ive never seen that before: [INFO] Resource directory's path matches an existing source directory. Resources will be merged with the source directory src/main/resources
Also turning on filtering as a workaround will give you other problems later on, as the resources, namely applicationContext-resources.xml and struts.xml, will have some variables incorrectly replaced.
What version of maven are you using? Maybe thats the key to the problem... Im using 2.0.9 as the OX default (2.0 sth) had some problems I cant remember which - but not the ones your are experiencing.
Markus
On Aug 27, 2009, at 20:03, Aaron Steele wrote:
b) mvn eclipse:eclipse # generates eclipse artifacts but uses the M2_REPO
This step fails with r1465 due to the following build errors: http://txtb.in/4eZ
Are you not seeing these errors? Again, the workaround is setting the filtering property to true on line 268 of pom.xml.
Using command line 'mvn -Peclipse -U' appears to succeed in building and deploying IPT to localhost. Here's the output:
How are people actually debugging IPT? Is anyone using Eclipse WTP and deploying IPT to an embedded server? My goal is to set breakpoints and actually step through server side code.
What version of maven are you using? Maybe thats the key to the problem...
eighty$ mvn -v Maven version: 2.0.9 Java version: 1.5.0_19 OS name: "mac os x" version: "10.5.8" arch: "i386" Family: "unix"
Also turning on filtering as a workaround will give you other problems later on, as the resources, namely applicationContext-resources.xml and struts.xml, will have some variables incorrectly replaced.
The filtering error I was seeing (http://txtb.in/4kB) during 'mvn eclipse:eclipse' was caused by a change in the Maven Eclipse Plugin itself: http://jira.codehaus.org/browse/MECLIPSE-551 http://svn.apache.org/viewvc?view=rev&revision=779829
In short, version 2.6 works and 2.7 does not. The workaround is simply: mvn org.apache.maven.plugins:maven-eclipse-plugin:2.6:eclipse
participants (2)
-
"Markus Döring (GBIF)"
-
Aaron Steele