blob: 2627bc349c2f2755570cb5bc06ef7bc2aaa452cf [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.
-->
<project basedir="." default="build" name="libs.osgi">
<description>Builds, tests, and runs the project org.netbeans.libs.osgi</description>
<import file="../nbbuild/templates/projectized.xml"/>
<!-- A task to check if the binary 'external/osgi.cmpn-4.2.jar' exists -->
<target name="-check-requires-patching-maven-sources">
<available file="external/osgi.cmpn-4.2.jar" property="sources-already-patched" />
</target>
<!--
'-javac-init' task is invoked after maven sources have been downloaded
to 'external/org.osgi.compendium-4.2.0.jar'
(see external/binaries-list).
Netbeans had its own copy of osgi.cmpn-4.2.jar, which is identical to
the downloaded binary. The downloaded binary contains the source code
in addition to the compiled class files.
The sources are now stripped from the binary to create the original file
netbeans used to bundle.
-->
<target name="-prepare-patched-binary" depends="-check-requires-patching-maven-sources" unless="sources-already-patched">
<echo message="Patching org.osgi.compendium-4.2.0 for Netbeans..." />
<zip destfile="external/osgi.cmpn-4.2.jar">
<zipfileset src="external/org.osgi.compendium-4.2.0.jar" excludes="OSGI-OPT/**" />
</zip>
</target>
<!-- Hook into harness "-javac-init" task -->
<target name="-javac-init" depends="-prepare-patched-binary, projectized-common.-javac-init" />
</project>