blob: 40395594a8e9ad7fc9c7d98a2b93504895864bfa [file]
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!--
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.
-->
<project basedir="." default="build" name="enterprise/web.monitor">
<import file="../../nbbuild/templates/projectized.xml"/>
<target name="compile-server" depends="init,compile">
<!-- Build the JavaEE version of the http monitor -->
<mkdir dir="build/server-classes"/>
<javac srcdir="serversrc"
destdir="build/server-classes"
deprecation="${build.compiler.deprecation}"
debug="${build.compiler.debug}"
source="${javac.source}"
release="8"
includeantruntime="false"
>
<classpath>
<path path="${server.cp.extra}:build/classes"/>
</classpath>
</javac>
<copy todir="build/server-classes">
<fileset dir="serversrc" excludes="${jar-excludes}"/>
</copy>
<!--
Build the JakartaEE version of the http monitor by using the source
of the JavaEE version and replacing the package references.
The requires to only access functionality present in both APIs
or use reflection to call the missing parts.
-->
<mkdir dir="build/server-jakarta-serversrc"/>
<copy todir="build/server-jakarta-serversrc">
<fileset dir="serversrc" />
</copy>
<replace dir="build/server-jakarta-serversrc" token="javax.servlet" value="jakarta.servlet" includes="**/*" />
<mkdir dir="build/server-jakarta-classes"/>
<javac srcdir="build/server-jakarta-serversrc"
destdir="build/server-jakarta-classes"
deprecation="${build.compiler.deprecation}"
debug="${build.compiler.debug}"
source="${javac.source}"
release="8"
includeantruntime="false">
<classpath>
<path path="${server.cp.extra.jakarta}:build/classes"/>
</classpath>
</javac>
<copy todir="build/server-jakarta-classes">
<fileset dir="build/server-jakarta-serversrc" excludes="${jar-excludes}"/>
</copy>
</target>
<!-- NOTE: this is not an IDE module. It is deployed on the execution
server. It will not be deployed correctly if we build a separate
version for another language -->
<target name="jar-server" depends="compile-server">
<mkdir dir="${cluster}/modules/ext"/>
<jar jarfile="${cluster}/modules/ext/org-netbeans-modules-web-httpmonitor.jar"
compress="false">
<fileset dir="build/server-classes"/>
<fileset dir="build/classes">
<include name="org/netbeans/modules/web/monitor/data/"/>
</fileset>
</jar>
<jar jarfile="${cluster}/modules/ext/org-netbeans-modules-web-httpmonitor-jakarta.jar"
compress="false">
<fileset dir="build/server-jakarta-classes"/>
<fileset dir="build/classes">
<include name="org/netbeans/modules/web/monitor/data/"/>
</fileset>
</jar>
</target>
<target name="netbeans-extra" depends="jar-server"/>
</project>