001 /**
002 * Copyright 2010-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.common.deploy.spring;
017
018 import java.util.Arrays;
019 import java.util.List;
020
021 import org.kuali.common.util.Mode;
022 import org.springframework.context.annotation.Configuration;
023
024 /**
025 * This lets properties defined in the pom override properties defined elsewhere. System/environment properties still override everything.
026 *
027 * @deprecated
028 */
029 @Configuration
030 @Deprecated
031 public class DeployMavenPropertySourceConfig extends org.kuali.common.util.spring.MavenPropertySourceConfig {
032
033 @Override
034 protected List<org.kuali.common.util.property.ProjectProperties> getOtherProjectProperties() {
035 org.kuali.common.util.ProjectContext jdbc = new org.kuali.common.jdbc.JdbcProjectContext();
036 org.kuali.common.util.property.ProjectProperties jpp = org.kuali.common.util.spring.ConfigUtils.getProjectProperties(jdbc);
037 org.kuali.common.util.property.ProjectProperties dpp = getDeployProjectProperties();
038 return Arrays.asList(jpp, dpp);
039 }
040
041 public org.kuali.common.util.property.ProjectProperties getDeployProjectProperties() {
042 org.kuali.common.util.ProjectContext deploy = new org.kuali.common.deploy.DeployProjectContext();
043 org.kuali.common.util.property.ProjectProperties dpp = org.kuali.common.util.spring.ConfigUtils.getProjectProperties(deploy);
044 // Some environments don't have any special properties and thus no corresponding properties file
045 dpp.getPropertiesContext().setMissingLocationsMode(Mode.INFORM);
046 return dpp;
047 }
048
049 }