blob: 5273dcbe40e2f8c1bb1d6ecf47d8d15893245e87 [file] [log] [blame]
#!/bin/sh
# 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
#
# https://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.
echo "<Import-Package>"
grep -r "^import " src/main | \
grep -v target | \
sed "s/^.*\.java:import //" | \
sed "s/^static //" | \
sed "s/\.[A-Z][A-Za-z_\.]*;$//" | \
sed "s/^java\..*$//" | \
sed 's/^org.apache.directory.api.\(.*\)/org.apache.directory.api.\1;version=${org.apache.directory.api.version},/' | \
sed 's/^org.apache.directory.server.\(.*\)/org.apache.directory.server.\1;version=${project.version},/' | \
sed 's/^org.apache.commons.\(.*\)/org.apache.commons.\1;version=${commons.\1.version},/' | \
sed 's/^org.slf4j$/org.slf4j;version=${slf4j.api.bundleversion},/' | \
sed '/^$/d' | \
sort -u
echo "</Import-Package>"