| <?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. |
| |
| --> |
| |
| <project name="java/lib.jshell.agent" default="build" basedir="."> |
| <description>Builds, tests, and runs the project org.netbeans.lib.jshell.agent.</description> |
| <import file="../../nbbuild/templates/projectized.xml"/> |
| |
| <target name="probe-init" depends="init"> |
| <mkdir dir="build/agent/classes"/> |
| <unjar src="${agentsrc.asm.cp}" dest="build/agent/classes"> |
| <patternset> |
| <exclude name="META-INF/**"/> |
| </patternset> |
| </unjar> |
| <javac srcdir="agentsrc" destdir="build/agent/classes" debug="true" deprecation="true" target="1.8" source="1.8"> |
| <classpath> |
| <pathelement path="${module.classpath}"/> |
| </classpath> |
| </javac> |
| </target> |
| |
| <target name="modular-probe" depends="probe-init"> |
| <mkdir dir="${cluster}/modules/ext"/> |
| <nb-ext-jar jarfile="${cluster}/modules/ext/nb-mod-jshell-probe.jar"> |
| <manifest> |
| <attribute name="NetBeans-Own-Library" value="true"/> |
| <attribute name="Main-Class" value="org.netbeans.lib.jshell.agent.AgentWorker"/> |
| <attribute name="Premain-Class" value="org.netbeans.lib.jshell.agent.NbJShellAgent"/> |
| <attribute name="Can-Redefine-Classes" value="true"/> |
| <attribute name="Can-Retransform-Classes" value="true"/> |
| </manifest> |
| <fileset dir="build/agent/classes"> |
| <exclude name="jdk/**"/> |
| </fileset> |
| </nb-ext-jar> |
| </target> |
| |
| <target name="jar-probe" depends="probe-init"> |
| <unjar src="${agentsrc.jshell.cp}" dest="build/agent/classes"> |
| <patternset> |
| <include name="jdk/jshell/execution/**"/> |
| <exclude name="**/JDI*.class"/> |
| <exclude name="**/LocalExecutionControl.class"/> |
| <exclude name="**/StreamingExecutionControl.class"/> |
| <!--<exclude name="**/DemultiplexInput.class"/>--> |
| </patternset> |
| <patternset> |
| <include name="jdk/jshell/spi/ExecutionControl*.class"/> |
| <exclude name="jdk/jshell/spi/ExecutionControl*Generator.class"/> |
| <include name="jdk/jshell/spi/SPIResolutionException.class"/> |
| </patternset> |
| </unjar> |
| <mkdir dir="${cluster}/modules/ext"/> |
| <nb-ext-jar jarfile="${cluster}/modules/ext/nb-custom-jshell-probe.jar"> |
| <manifest> |
| <attribute name="NetBeans-Own-Library" value="true"/> |
| <attribute name="Main-Class" value="org.netbeans.lib.jshell.agent.AgentWorker"/> |
| <attribute name="Premain-Class" value="org.netbeans.lib.jshell.agent.NbJShellAgent"/> |
| <attribute name="Can-Redefine-Classes" value="true"/> |
| <attribute name="Can-Retransform-Classes" value="true"/> |
| </manifest> |
| <fileset dir="build/agent/classes"/> |
| </nb-ext-jar> |
| </target> |
| |
| <target name="probe" depends="modular-probe,jar-probe"> |
| </target> |
| |
| <target name="netbeans-extra" depends="probe"/></project> |