| <?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="platform/api.annotations.common"> |
| <description>Builds, tests, and runs the project org.netbeans.annotations.common</description> |
| |
| <import file="../../nbbuild/templates/projectized.xml"/> |
| |
| <!-- |
| <target name="findbugs-annotations-init" if="api.annotations.common.findbugs"> |
| <echo>Building common annotations for usage with FindBugs...</echo> |
| |
| <property name="src.dir" location="build/generated"/> |
| <property name="src.common" location="src"/> |
| |
| </target> |
| |
| <target name="build-init" depends="findbugs-annotations-init, projectized.build-init"/> |
| |
| <target name="compile" depends="findbugs-annotations, projectized-common.compile"/> |
| |
| <target name="findbugs-annotations" if="api.annotations.common.findbugs" depends="build-init, projectized.findbugs-init"> |
| <copy todir="${src.dir}"> |
| <fileset dir="${src.common}"> |
| <exclude name="org/netbeans/api/annotations/common/CheckForNull.java"/> |
| <exclude name="org/netbeans/api/annotations/common/NonNull.java"/> |
| <exclude name="org/netbeans/api/annotations/common/ConditionalNull.java"/> |
| <exclude name="org/netbeans/api/annotations/common/NullAllowed.java"/> |
| </fileset> |
| <filterchain> |
| <tokenfilter> |
| <filetokenizer/> |
| <replacestring from="RetentionPolicy.SOURCE" to="RetentionPolicy.CLASS"/> |
| </tokenfilter> |
| </filterchain> |
| </copy> |
| |
| <copy file="${src.common}/org/netbeans/api/annotations/common/CheckForNull.java" |
| tofile="${src.dir}/org/netbeans/api/annotations/common/CheckForNull.java"> |
| <filterchain> |
| <tokenfilter> |
| <filetokenizer/> |
| <replacestring from="@Retention(RetentionPolicy.SOURCE)" |
| to="@Retention(RetentionPolicy.CLASS) @javax.annotation.Nonnull(when=javax.annotation.meta.When.MAYBE) @javax.annotation.meta.TypeQualifierNickname"/> |
| </tokenfilter> |
| </filterchain> |
| </copy> |
| |
| <copy file="${src.common}/org/netbeans/api/annotations/common/NullAllowed.java" |
| tofile="${src.dir}/org/netbeans/api/annotations/common/NullAllowed.java"> |
| <filterchain> |
| <tokenfilter> |
| <filetokenizer/> |
| <replacestring from="@Retention(RetentionPolicy.SOURCE)" |
| to="@Retention(RetentionPolicy.CLASS) @javax.annotation.Nonnull(when=javax.annotation.meta.When.MAYBE) @javax.annotation.meta.TypeQualifierNickname"/> |
| </tokenfilter> |
| </filterchain> |
| </copy> |
| |
| <copy file="${src.common}/org/netbeans/api/annotations/common/NonNull.java" |
| tofile="${src.dir}/org/netbeans/api/annotations/common/NonNull.java"> |
| <filterchain> |
| <tokenfilter> |
| <filetokenizer/> |
| <replacestring from="@Retention(RetentionPolicy.SOURCE)" |
| to="@Retention(RetentionPolicy.CLASS) @javax.annotation.Nonnull(when=javax.annotation.meta.When.ALWAYS) @javax.annotation.meta.TypeQualifierNickname"/> |
| </tokenfilter> |
| </filterchain> |
| </copy> |
| |
| <copy file="${src.common}/org/netbeans/api/annotations/common/ConditionalNull.java" |
| tofile="${src.dir}/org/netbeans/api/annotations/common/ConditionalNull.java"> |
| <filterchain> |
| <tokenfilter> |
| <filetokenizer/> |
| <replacestring from="@Retention(RetentionPolicy.SOURCE)" |
| to="@Retention(RetentionPolicy.CLASS) @javax.annotation.Nonnull(when=javax.annotation.meta.When.UNKNOWN) @javax.annotation.meta.TypeQualifierNickname"/> |
| </tokenfilter> |
| </filterchain> |
| </copy> |
| </target> |
| --> |
| |
| </project> |