blob: e5ccf323a898f4b3ab34a4930b7fcee7f62b4658 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<!--
Customization of Apache SIS build from NetBeans IDE.
-->
<project name="Apache_SIS" default="default" basedir=".">
<description>Builds, tests, and runs the project Apache SIS.</description>
<import file="nbproject/build-impl.xml"/>
<!--
Called after initialisation of project properties. Creates the "local-src"
empty directory, which needs to exist before the compiler can be invoked.
We perform this task because Git does not track empty directories, and we
avoid polluting the directory with dummy files as they appear in NetBeans.
-->
<target name="-post-init">
<available file="${src.local-src.dir}/.." type="dir" property="src.parent.exists"/>
<fail unless="src.parent.exists" message="Can not create &quot;${src.local-src.dir}&quot; because the parent directory does not exist."/>
<available file="${work.dir}/.." type="dir" property="wkd.parent.exists"/>
<fail unless="wkd.parent.exists" message="Can not create &quot;${work.dir}&quot; because the parent directory does not exist."/>
<mkdir dir="${src.local-src.dir}"/>
<mkdir dir="${work.dir}"/>
</target>
<!--
Called after compilation. Copies the "*.utf" resources files created by Maven.
Note that the Apache SIS project must have been build by Maven at least once
before it can be built by the NetBeans IDE.
-->
<target name="-post-compile">
<copy todir="${build.classes.dir}/org/apache/sis/util/iso">
<fileset dir="${project.root}/core/sis-metadata/src/main/resources/org/apache/sis/util/iso">
<include name="class-index.properties"/>
</fileset>
</copy>
<copy todir="${build.classes.dir}">
<fileset dir="${project.root}/core/sis-utility/target/generated-resources">
<include name="**/*.utf"/>
</fileset>
<fileset dir="${project.root}/core/sis-metadata/target/generated-resources">
<include name="**/*.utf"/>
</fileset>
<fileset dir="${project.root}/core/sis-referencing/target/generated-resources">
<include name="**/*.utf"/>
</fileset>
<fileset dir="${project.root}/core/sis-referencing-by-identifiers/target/generated-resources">
<include name="**/*.utf"/>
</fileset>
<fileset dir="${project.root}/core/sis-feature/target/generated-resources">
<include name="**/*.utf"/>
</fileset>
<!-- Not yet available.
<fileset dir="${project.root}/core/sis-portrayal/target/generated-resources">
<include name="**/*.utf"/>
</fileset>
-->
<fileset dir="${project.root}/storage/sis-storage/target/generated-resources">
<include name="**/*.utf"/>
</fileset>
<fileset dir="${project.root}/storage/sis-netcdf/target/generated-resources">
<include name="**/*.utf"/>
</fileset>
<fileset dir="${project.root}/storage/sis-geotiff/target/generated-resources">
<include name="**/*.utf"/>
</fileset>
<!-- Pending discussion about how to handle resources in the Shapefile module.
<fileset dir="${project.root}/storage/sis-shapefile/target/generated-resources">
<include name="**/*.utf"/>
</fileset>
-->
<!-- Other resources (properties files, SQL scripts, native libraries). -->
<fileset dir="${project.root}/core/sis-utility/src/main/resources">
<include name="**/*.properties"/>
</fileset>
<fileset dir="${project.root}/core/sis-metadata/src/main/resources">
<include name="**/*.sql"/>
<include name="**/*.lst"/>
</fileset>
<fileset dir="${project.root}/core/sis-referencing/src/main/resources">
<include name="**/*.properties"/>
<include name="**/*.sql"/>
</fileset>
<fileset dir="${project.root}/storage/sis-xmlstore/src/main/resources">
<include name="**/*.properties"/>
</fileset>
<fileset dir="${project.root}/storage/sis-gdal/src/main/resources">
<include name="**/*.dll"/>
<include name="**/*.so"/>
</fileset>
<fileset dir="${project.root}/application/sis-console/src/main/resources">
<include name="**/*.properties"/>
</fileset>
<fileset dir="${project.root}/profiles/sis-french-profile/src/main/resources">
<include name="**/*.lst"/>
</fileset>
</copy>
<!-- ==== Standard JAVA service providers ====================================================================== -->
<!-- FileTypeDetector implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/java.nio.file.spi.FileTypeDetector" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/java.nio.file.spi.FileTypeDetector"/>
</fileset>
</concat>
<!-- Units of Measurement implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/javax.measure.spi.ServiceProvider" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/javax.measure.spi.ServiceProvider"/>
</fileset>
</concat>
<!-- ==== GeoAPI service providers ============================================================================= -->
<!-- NameFactory implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.opengis.util.NameFactory" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.opengis.util.NameFactory"/>
</fileset>
</concat>
<!-- CRSAuthorityFactory implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSAuthorityFactory"/>
</fileset>
</concat>
<!-- CRSFactory implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.opengis.referencing.crs.CRSFactory" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.opengis.referencing.crs.CRSFactory"/>
</fileset>
</concat>
<!-- CSFactory implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.opengis.referencing.cs.CSFactory" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.opengis.referencing.cs.CSFactory"/>
</fileset>
</concat>
<!-- DatumFactory implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.opengis.referencing.datum.DatumFactory" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.opengis.referencing.datum.DatumFactory"/>
</fileset>
</concat>
<!-- MathTransformFactory implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.opengis.referencing.operation.MathTransformFactory" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.opengis.referencing.operation.MathTransformFactory"/>
</fileset>
</concat>
<!-- OperationMethod implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.opengis.referencing.operation.OperationMethod" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod"/>
</fileset>
</concat>
<!-- CoordinateOperationFactory implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.opengis.referencing.operation.CoordinateOperationFactory" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.opengis.referencing.operation.CoordinateOperationFactory"/>
</fileset>
</concat>
<!-- ==== Apache SIS service providers ========================================================================= -->
<!-- ObjectConverter implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.apache.sis.util.ObjectConverter" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.apache.sis.util.ObjectConverter"/>
</fileset>
</concat>
<!-- TypeRegistration implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.TypeRegistration"/>
</fileset>
</concat>
<!-- AdapterReplacement implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.apache.sis.internal.jaxb.AdapterReplacement" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.apache.sis.internal.jaxb.AdapterReplacement"/>
</fileset>
</concat>
<!-- Initializer implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.apache.sis.internal.metadata.sql.Initializer" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.apache.sis.internal.metadata.sql.Initializer"/>
</fileset>
</concat>
<!-- SpecializedOperationFactory implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.apache.sis.internal.referencing.SpecializedOperationFactory" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.apache.sis.internal.referencing.SpecializedOperationFactory"/>
</fileset>
</concat>
<!-- DataStoreProvider implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.apache.sis.storage.DataStoreProvider" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.apache.sis.storage.DataStoreProvider"/>
</fileset>
</concat>
<!-- NetCDF conventions to be loaded by ServiceLoader. -->
<concat destfile="${build.classes.dir}/META-INF/services/org.apache.sis.internal.netcdf.Convention" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/main/resources/META-INF/services/org.apache.sis.internal.netcdf.Convention"/>
</fileset>
</concat>
</target>
<!--
Called after compilation of test classes in order to copy test files.
-->
<target name="-post-compile-test">
<copy todir="${build.test.classes.dir}">
<fileset dir="${project.root}/core/sis-metadata/src/test/resources">
<include name="**/*.properties"/>
<include name="**/*.xml"/>
</fileset>
<fileset dir="${project.root}/core/sis-referencing/src/test/resources">
<include name="**/*.xml"/>
<include name="**/*.txt"/>
<include name="**/*.gsb"/>
<include name="**/*.laa"/>
<include name="**/*.loa"/>
</fileset>
<fileset dir="${project.root}/storage/sis-storage/src/test/resources">
<include name="**/*.txt"/>
<include name="**/*.prj"/>
<include name="**/*.xml"/>
</fileset>
<fileset dir="${project.root}/storage/sis-xmlstore/src/test/resources">
<include name="**/*.gpx"/>
<include name="**/*.xml"/>
</fileset>
<fileset dir="${project.root}/storage/sis-sqlstore/src/test/resources">
<include name="**/*.sql"/>
</fileset>
<fileset dir="${project.root}/storage/sis-earth-observation/src/test/resources">
<include name="**/*.txt"/>
</fileset>
<fileset dir="${project.root}/storage/sis-shapefile/src/test/resources">
<include name="**/*.dbf"/>
<include name="**/*.prj"/>
<include name="**/*.shp"/>
<include name="**/*.shx"/>
</fileset>
<fileset dir="${project.root}/profiles/sis-french-profile/src/test/resources">
<include name="**/*.xml"/>
</fileset>
</copy>
<!-- OperationMethod implementations to be loaded by ServiceLoader. -->
<concat destfile="${build.test.classes.dir}/META-INF/services/org.opengis.referencing.operation.OperationMethod" encoding="UTF-8" fixlastline="yes">
<fileset dir="${project.root}">
<include name="*/*/src/test/resources/META-INF/services/org.opengis.referencing.operation.OperationMethod"/>
</fileset>
</concat>
</target>
</project>