Nelson,
(Are you the same Nelson on ossim-developer? I don't want to completely confuse things. :)
Sorry for the delay in responding, I was out of town and have been in all-day meetings all this week. )
Here's where I am:
For the current svn version of OMAR, I did replace the build.xml file (and fixed one path issue in it, pasted below) and set the environment variables. All of the ant commands worked except for "compile-c++
, which I got around by doing a VC++ project with the coms src code and the oms_wrap.cxx file.
When I tried to set up the OMAR postgis databases (drop-postgis-database or create-postgis-database), grails said that OMAR was asking for Grails 2.0.3 and 2.0.4. I tried both, along with Grails 2.1.1, but it always hung up on trying to download dependencies. I tried downloading the dependencies manually, but either I did not put them in the right place or something else was wrong.
I dropped back to the zipped version of OMAR from 2009 and went back to the earlier versions of grails, ant, etc. There seems to be a version mismatch somewhere (output below), but I did not have a chance to work on it more before I left town.
We're going to set up a linux server next week, so all of this may be moot, although I'm probably going to keep banging on it just out of stubbornness. Thanks for any advice you may have.
Chris
c:\opt\radiantblue\omar-2009>grails prod create-postgis-database
Welcome to Grails 1.1.1 - http://grails.org/
Licensed under Apache Standard License 2.0
Grails home is set to: c:/opt/radiantblue/grails-1.1.1
Base Directory: C:\opt\radiantblue\omar-2009
Running script C:\Users\mcglonej\.grails\1.1.1\projects\omar-2009\plugins\postgis-0.5\scripts\CreatePostgisDatabase.groo
vy
Environment set to production
Warning, target causing name overwriting of name default
Error executing script CreatePostgisDatabase: groovy.lang.MissingMethodException: No signature of method: CreatePostgisD
atabase.setupEnvironment() is applicable for argument types: () values: []
gant.TargetExecutionException: groovy.lang.MissingMethodException: No signature of method: CreatePostgisDatabase.setupEn
vironment() is applicable for argument types: () values: []
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:331)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:344)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:334)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.processTargets(Gant.groovy:495)
at gant.Gant.processTargets(Gant.groovy:480)
Caused by: groovy.lang.MissingMethodException: No signature of method: CreatePostgisDatabase.setupEnvironment() is appli
cable for argument types: () values: []
at CreatePostgisDatabase$_run_closure1.doCall(CreatePostgisDatabase:8)
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
... 10 more
MODIFIED BUILD.XML FILE:
<project name="joms" default="build">
<property environment="env" />
<property file="${basedir}/local.properties" />
<!-- Module Name -->
<property name="module.name" value="joms" />
<property name="oms.home" value="${env.OSSIM_DEV_HOME}/oms" />
<property name="ossim.home" value="${env.OSSIM_DEV_HOME}/ossim" />
<property name="jdk.home" value="${env.JAVA_HOME}"/>
<property name="osg.home" value="${env.OSG_HOME}" />
<property name="ossim.install_prefix" value="${env.OSSIM_INSTALL_PREFIX}" />
<echo message="module.name = ${module.name}" />
<echo message="jdk.home = ${jdk.home}" />
<!--
<echo message="mac.sdk_version = ${mac.sdk_version}" />
-->
<echo message="oms.home = ${oms.home}" />
<echo message="ossim.home = ${ossim.home}" />
<echo message="ossim.install_prefix = ${ossim.install_prefix}" />
<echo message="ossim.dependencies = ${ossim.dependencies}" />
<echo message="os.name = ${os.name}"/>
<echo message="osg.home = ${osg.home}"/>
<target name="check-reqired-properties">
<if>
<not>
<or>
<isset property="jdk.home" />
<isset property="ossim.home" />
<isset property="oms.home" />
</or>
</not>
<then>
<antcall target="missing-required-properties" />
</then>
</if>
</target>
<target name="missing-required-properties" unless="properties.set">
<echo message="Check to see if all variables are set!" />
<echo message="JAVA_HOME=${jdk.home}" />
<echo message="OSSIM_HOME=${ossim.home}" />
<echo message="OMS_HOME=${oms.home}" />
<echo message="GROOVY_HOME=${groovy.home}" />
<echo message="GROOVY_VERSION=${groovy.version}" />
<fail />
</target>
<target name="add-groovy-task">
<if>
<available file="${groovy.home}/embeddable/groovy-all-${groovy.version}.jar"/>
<then>
<property name="groovy.task" value="true" />
<taskdef name="groovyc"
classname="org.codehaus.groovy.ant.Groovyc">
<classpath>
<pathelement location="${groovy.home}/embeddable/groovy-all-${groovy.version}.jar" />
</classpath>
</taskdef>
</then>
<else>
<echo message="groovy-all embeddable jar not found please define groovy.home and groovy.version for building groovy files"/>
</else>
</if>
</target>
<!-- property name="module.name" value="joms" /-->
<!-- <property file="${basedir}/local.properties" /> -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="util/ant-contrib.jar" />
</classpath>
</taskdef>
<taskdef resource="cpptasks.tasks">
<classpath>
<pathelement location="util/cpptasks.jar" />
</classpath>
</taskdef>
<typedef resource="cpptasks.types">
<classpath>
<pathelement location="util/cpptasks.jar" />
</classpath>
</typedef>
<property name="ossim.package" value="${module.name}" />
<property name="gensrc.dir" value="gensrc/${module.name}" />
<!---
###################################################
# Init Environment
##################################################
-->
<target name="initialize-environment" depends="check-reqired-properties">
<if>
<equals arg1="${os.name}" arg2="Mac OS X" />
<then>
<property name="library.name" value="lib${module.name}.jnilib" />
</then>
<elseif>
<equals arg1="${os.name}" arg2="Windows XP" />
<then>
<property name="library.name" value="${module.name}.dll" />
</then>
</elseif>
<elseif>
<equals arg1="${os.name}" arg2="Linux" />
<then>
<property name="library.name" value="lib${module.name}.so" />
</then>
</elseif>
<elseif>
<equals arg1="${os.name}" arg2="Windows 7" />
<then>
<property name="library.name" value="${module.name}.dll" />
</then>
</elseif>
</if>
</target>
<!---
###################################################
# Compile Java
##################################################
-->
<target name="compile-java">
<mkdir dir="bin" />
<javac srcdir="gensrc" destdir="bin">
<classpath>
<fileset dir="${oms.home}/lib" includes="*.jar" />
<fileset dir="lib" includes="*.jar" />
</classpath>
</javac>
<javac srcdir="src/java" destdir="bin" excludes="**/RasterEngineTest.java">
<classpath>
<fileset dir="${oms.home}/lib" includes="*.jar" />
<fileset dir="lib" includes="*.jar" />
</classpath>
</javac>
<copy todir="bin">
<fileset dir="src" includes="META-INF/**" />
</copy>
</target>
<!---
###################################################
# Compile Groovy
##################################################
-->
<target name="compile-groovy" depends="add-groovy-task">
<if>
<isset property="groovy.task"/>
<then>
<mkdir dir="bin" />
<groovyc srcdir="gensrc" destdir="bin">
<classpath>
<fileset dir="${oms.home}/lib" includes="*.jar" />
<fileset dir="lib" includes="*.jar" />
</classpath>
</groovyc>
<groovyc srcdir="src/groovy" destdir="bin">
<classpath>
<fileset dir="${oms.home}/lib" includes="*.jar" />
<fileset dir="lib" includes="*.jar" />
</classpath>
</groovyc>
<copy todir="bin">
<fileset dir="src" includes="META-INF/**" />
</copy>
</then>
</if>
</target>
<!---
###################################################
# Compile C++
##################################################
-->
<target name="compile-c++" depends="initialize-environment">
<if>
<equals arg1="${os.name}" arg2="Mac OS X" />
<then>
<cc outtype="shared" objdir="swig" outfile="${module.name}">
<compilerarg value="-F${ossim.build}"/>
<compilerarg value="-F${ossim.install_prefix}/Frameworks" />
<compilerarg value="-F${ossim.dependencies}/Frameworks" />
<compilerarg value="-D__STDC_CONSTANT_MACROS"/>
<!--
<compilerarg value="-isysroot" />
<compilerarg value="/Developer/SDKs/MacOSX${mac.sdk_version}.sdk"/>
<compilerarg value="-mmacosx-version-min=${mac.sdk_version}" />
-->
<includepath>
<path location="swig" />
<path location="${jdk.home}/include" />
<path location="/Developer/SDKs/MacOSX${mac.sdk_version}.sdk/System/Library/Frameworks/JavaVM.framework/Headers" />
<path location="${ossim.install_prefix}" />
<path location="${ossim.dependencies}/Frameworks" />
<path location="${ossim.dependencies}/include" />
</includepath>
<fileset dir="swig" id="id">
<!--
<include name="*.cpp" />
-->
<include name="*.cxx" />
</fileset>
<linkerarg value="-dynamiclib" />
<linkerarg value="-framework" />
<linkerarg value="JavaVM" />
<linkerarg value="-F${ossim.build}" />
<linkerarg value="-F${ossim.install_prefix}/Frameworks" />
<linkerarg value="-F${ossim.dependencies}/Frameworks" />
<linkerarg value="-framework" />
<linkerarg value="ossim" />
<linkerarg value="-framework" />
<linkerarg value="oms" />
<linkerarg value="-framework" />
<linkerarg value="OpenThreads" />
<syslibset libs="c,stdc++" />
</cc>
<move file="lib${module.name}.dylib" tofile="${library.name}" />
</then>
<elseif>
<equals arg1="${os.name}" arg2="Linux" />
<then>
<cc outtype="shared" objdir="swig" outfile="${module.name}">
<compilerarg value="-D__STDC_CONSTANT_MACROS"/>
<includepath>
<path location="swig" />
<path location="${jdk.home}/include" />
<path location="${jdk.home}/include/linux" />
<path location="${oms.home}/coms/include" />
<path location="${ossim.install_prefix}/include" />
<path location="${ossim.dependencies}/include" />
<path location="${osg.home}/include" />
</includepath>
<fileset dir="swig" id="id">
<!--
<include name="*.cpp" />
-->
<include name="*.cxx" />
</fileset>
<linkerarg value="-Wall" />
<libset dir="${oms.home}/coms/lib" libs="oms" />
<libset dir="${ossim.install_prefix}" libs="ossim" />
</cc>
</then>
</elseif>
<elseif>
<equals arg1="${os.name}" arg2="Windows XP" />
<then>
<cc outtype="shared" objdir="swig" name="msvc" outfile="${module.name}">
<compilerarg value="-D__STDC_CONSTANT_MACROS"/>
<compilerarg value="/EHsc"/>
<includepath>
<path location="swig" />
<path location="${jdk.home}/include" />
<path location="${jdk.home}/include/win32" />
<path location="${oms.home}/coms/include" />
<path location="${ossim.install_prefix}/include" />
<path location="${ossim.dependencies}/include" />
<path location="${osg.home}/include" />
</includepath>
<fileset dir="swig" id="id">
<!--
<include name="*.cpp" />
-->
<include name="*.cxx" />
</fileset>
<linkerarg value="-Wall" />
<linkerarg value="-Wl,--kill-at" />
<libset dir="${ossim.install_prefix}" libs="ossim,oms" />
</cc>
</then>
</elseif>
<!--
Windows 7 Build
-->
<elseif>
<equals arg1="${os.name}" arg2="Windows 7" />
<then>
<cc outtype="shared" objdir="swig" name="msvc" outfile="${module.name}">
<compilerarg value="-D__STDC_CONSTANT_MACROS"/>
<compilerarg value="/EHsc"/>
<includepath>
<path location="swig" />
<path location="${jdk.home}/include" />
<path location="${jdk.home}/include/win32" />
<path location="${oms.home}/coms/include" />
<path location="${oms.home}/coms/include/oms" />
<path location="${ossim.install_prefix}/include" />
<path location="${ossim.install_prefix}" />
<path location="${ossim.dependencies}/include" />
<path location="${osg.home}/include" />
<path location="${ossim.home}/include" />
<path location="${ossim.home}/include" />
</includepath>
<fileset dir="swig" id="id">
<!--
<include name="*.cpp" />
-->
<include name="*.cxx" />
</fileset>
<libset dir="${ossim.install_prefix}" libs="ossim,oms" />
</cc>
</then>
</elseif>
<elseif>
<equals arg1="${os.name}" arg2="SunOS" />
<then>
<cc outtype="shared" objdir="swig" outfile="${module.name}">
<compilerarg value="-D__STDC_CONSTANT_MACROS"/>
<includepath>
<path location="swig" />
<path location="${jdk.home}/include" />
<path location="${jdk.home}/include/solaris" />
<path location="${ossim.install_prefix}/include" />
<path location="${ossim.dependencies}/include" />
</includepath>
<fileset dir="swig" id="id">
<!--
<include name="*.cpp" />
-->
<include name="*.cxx" />
</fileset>
<linkerarg value="-Wall" />
<libset dir="${oms.install_prefix}/lib" libs="oms" />
<libset dir="${ossim.install_prefix}/lib" libs="ossim" />
</cc>
</then>
</elseif>
</if>
</target>
<!---
###################################################
# BUILD
##################################################
-->
<target name="build" depends="initialize-environment,generate-wrappers,compile-java,compile-groovy,compile-c++" />
<!--
<target name="build" depends="initialize-environment,generate-wrappers,compile-java"/>
-->
<!---
###################################################
# BUILD Java
##################################################
-->
<target name="build-java" depends="initialize-environment,generate-wrappers,compile-java,compile-groovy" />
<!---
###################################################
# DIST
##################################################
-->
<target name="dist" >
<mkdir dir="dist" />
<copy todir="bin/META-INF">
<fileset dir="src/java/META-INF"/>
</copy>
<jar destfile="${oms.home}/lib/${module.name}.jar" basedir="bin" />
</target>
<!--
<target name="deploy" depends="dist">
<copy file="${oms.home}/lib/lib${module.name}.so" todir="${catalina.home}/shared/lib" />
<copy file="${oms.home}/lib/liboms.so" todir="${catalina.home}/shared/lib" />
<copy file="${oms.home}/lib/${module.name}.jar" todir="${catalina.home}/common/lib" />
</target>
-->
<!---
###################################################
# Clean
##################################################
-->
<target name="clean" depends="initialize-environment">
<delete dir="bin" />
<delete dir="${gensrc.dir}" />
<delete>
<fileset dir="swig" includes="*_wrap.*" />
</delete>
<delete dir="dist" />
<delete file="${library.name}" />
</target>
<!---
###################################################
# Generate Wrappers
##################################################
-->
<target name="generate-wrappers" depends="initialize-environment">
<foreach target="generate-wrapper" param="swig.file">
<path>
<fileset dir="swig" includes="*.i" />
</path>
</foreach>
</target>
<!---
###################################################
# Generate Wrapper
##################################################
-->
<target name="generate-wrapper">
<basename file="${swig.file}" property="package.name" suffix=".i" />
<propertyregex input="${package.name}" regexp="\." property="package.dir" replace="/" global="true" defaultvalue="${package.name}" />
<mkdir dir="${gensrc.dir}/${package.dir}" />
<echo message="${oms.home}" />
<exec executable="swig">
<arg value="-Wall" />
<arg value="-java" />
<arg value="-c++" />
<arg value="-outdir" />
<arg value="${gensrc.dir}/${package.dir}" />
<arg value="-package" />
<arg value="${ossim.package}.${package.name}" />
<arg value="-I${oms.home}/coms/include" />
<arg value="-I${ossim.home}/include" />
<arg value="${swig.file}" />
</exec>
<!--echo message="${swig.file}"/>
<echo message="${package.name}"/>
<echo message="${package.dir}"/-->
</target>
<!---
###################################################
# Install
##################################################
-->
<target name="install" depends="initialize-environment">
<copy file="${library.name}" todir="${ossim.install_prefix}"/>
<copy file="../lib/${module.name}.jar" todir="${env.OMAR_HOME}/../../plugins/omar-oms/lib"/>
</target>
<!---
###################################################
# MVN Install
##################################################
-->
<target name="mvn-install" depends="initialize-environment,dist">
<exec executable="mvn">
<arg value="install:install-file"/>
<arg value="-Dfile=../lib/${module.name}.jar"/>
<arg value="-DgroupId=org.ossim"/>
<arg value="-DartifactId=${module.name}"/>
<arg value="-Dversion=1.0-SNAPSHOT"/>
<arg value="-Dpackaging=jar"/>
<arg value="-DgeneratePom=true"/>
</exec>
</target>
</project>
-----Original Message-----
From: ico...@go... on behalf of ico...@li...
Sent: Wed 10/17/2012 4:33 PM
To: ico...@li...; ico...@go...
Subject: [icode-mda] Re: [icode-mda-developer] ant compile issues
Chris,
Just to cover all bases, you did replace the existing build.xml file with the one located here:
http://code.google.com/p/icode-mda/downloads/detail?name=build.xml&can=2&q=#makechanges
And you set all environment variables specified in step 1, right?
And you did not have any problems running "ant initialize-environment" and "ant generate-wrappers" correct?
Can you send me the complete error message you are getting when running the command "ant compile-java"
Thanks
Nelson
-----Original Message-----
From: ico...@li... [mailto:ico...@li...]
Sent: Monday, October 01, 2012 12:24 PM
To: ico...@go...
Subject: [icode-mda-developer] ant compile issues
I've been working on installing OMAR on Windows 7. I've found several bugs in the instructions (and will update them when everything works) but am currently stuck on the steps using ant to build and install JOMS. ant compile-java, compile-groovy, and compile-c++ all fail (at different line numbers in the xml file) saying that
c:\ossim\ossim-1.8.12-1\oms\joms\build.xml:166: c:\ossim\ossim-1.18.12-1\oms\lib does not exist
of course, c:\ossim\ossim-1.18.12-1\oms\lib does exist and I can't seem to convince it otherwise. Any thoughts?
thanks
chris
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
icode-mda-developer mailing list
ico...@li...
https://lists.sourceforge.net/lists/listinfo/icode-mda-developer
|