001 /** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017 package org.apache.geronimo.system.repository; 018 019 import java.io.File; 020 import java.net.URI; 021 022 import org.apache.geronimo.gbean.GBeanInfo; 023 import org.apache.geronimo.gbean.GBeanInfoBuilder; 024 import org.apache.geronimo.system.serverinfo.ServerInfo; 025 026 /** 027 * @version $Rev: 508724 $ $Date: 2007-02-17 03:01:26 -0500 (Sat, 17 Feb 2007) $ 028 */ 029 public class Maven1Repository extends org.apache.geronimo.kernel.repository.Maven1Repository { 030 031 public Maven1Repository(URI root, ServerInfo serverInfo, boolean resolveToServer) { 032 super(new ServerInfoRootResolver(serverInfo, resolveToServer).resolve(root)); 033 } 034 035 public Maven1Repository(File rootFile) { 036 super(rootFile); 037 } 038 039 public static final GBeanInfo GBEAN_INFO; 040 041 static { 042 GBeanInfoBuilder infoFactory = GBeanInfoBuilder.createStatic(Maven1Repository.class, "Repository"); 043 infoFactory.addAttribute("root", URI.class, true); 044 infoFactory.addReference("ServerInfo", ServerInfo.class, "GBean"); 045 infoFactory.addAttribute("resolveToServer", Boolean.TYPE, true); 046 infoFactory.addInterface(Maven1Repository.class); 047 infoFactory.setConstructor(new String[]{"root", "ServerInfo", "resolveToServer"}); 048 GBEAN_INFO = infoFactory.getBeanInfo(); 049 } 050 051 public static GBeanInfo getGBeanInfo() { 052 return GBEAN_INFO; 053 } 054 }