Repository: karaf Updated Branches: refs/heads/master fd4b3f677 -> 69a53969d
Clean main jar a bit to avoid unused or duplicate classes Project: http://git-wip-us.apache.org/repos/asf/karaf/repo Commit: http://git-wip-us.apache.org/repos/asf/karaf/commit/bf00db92 Tree: http://git-wip-us.apache.org/repos/asf/karaf/tree/bf00db92 Diff: http://git-wip-us.apache.org/repos/asf/karaf/diff/bf00db92 Branch: refs/heads/master Commit: bf00db92c148cd9b852596273cbba3e6f510dcd6 Parents: fd4b3f6 Author: Guillaume Nodet <gno...@gmail.com> Authored: Fri Apr 11 20:56:48 2014 +0200 Committer: Guillaume Nodet <gno...@gmail.com> Committed: Fri Apr 11 20:56:48 2014 +0200 ---------------------------------------------------------------------- main/pom.xml | 5 +- .../apache/karaf/main/util/ServerInfoImpl.java | 107 ------------------- 2 files changed, 2 insertions(+), 110 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/karaf/blob/bf00db92/main/pom.xml ---------------------------------------------------------------------- diff --git a/main/pom.xml b/main/pom.xml index 2f4982a..e3783b4 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -93,9 +93,8 @@ </Export-Package> <Private-Package> org.apache.karaf.main*, - org.apache.felix.*;-split-package:=merge-first, - org.apache.karaf.util.*;-split-package:=merge-first, - org.osgi.*;-split-package:=merge-first, + org.apache.felix.utils.properties;-split-package:=merge-first, + org.apache.karaf.util.locks;-split-package:=merge-first, META-INF;-split-package:=merge-first </Private-Package> <Import-Package>!*</Import-Package> http://git-wip-us.apache.org/repos/asf/karaf/blob/bf00db92/main/src/main/java/org/apache/karaf/main/util/ServerInfoImpl.java ---------------------------------------------------------------------- diff --git a/main/src/main/java/org/apache/karaf/main/util/ServerInfoImpl.java b/main/src/main/java/org/apache/karaf/main/util/ServerInfoImpl.java deleted file mode 100644 index aa4821f..0000000 --- a/main/src/main/java/org/apache/karaf/main/util/ServerInfoImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * 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. - */ - - -package org.apache.karaf.main.util; - -import java.io.File; -import java.net.URI; - -import org.apache.karaf.info.ServerInfo; - -public class ServerInfoImpl implements ServerInfo { - - private final File base; - private final File home; - private final File data; - private final File instances; - private final String[] args; - - public ServerInfoImpl(String[] args, File base, File data, File home, File instances) { - this.args = args; - this.base = base; - this.data = data; - this.home = home; - this.instances = instances; - } - - @Override - public File getHomeDirectory() { - return home; - } - - @Override - public String resolveHomePath(String filename) { - return resolveWithBase(home, filename).getAbsolutePath(); - } - - @Override - public File resolveHome(String filename) { - return resolveWithBase(home, filename); - } - - @Override - public URI resolveHome(URI uri) { - return home.toURI().resolve(uri); - } - - @Override - public File getBaseDirectory() { - return base; - } - - @Override - public String resolveBasePath(String filename) { - return resolveWithBase(base, filename).getAbsolutePath(); - } - - @Override - public File resolveBase(String filename) { - return resolveWithBase(base, filename); - } - - @Override - public URI resolveBase(URI uri) { - return base.toURI().resolve(uri); - } - - @Override - public File getDataDirectory() { - return data; - } - - @Override - public File getInstancesDirectory() { - return instances; - } - - @Override - public String[] getArgs() { - return args.clone(); - } - - private File resolveWithBase(File baseDir, String filename) { - File file = new File(filename); - if (file.isAbsolute()) { - return file; - } - return new File(baseDir, filename); - } - -}