001/** 002 * Copyright 2010-2014 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 */ 016package org.kuali.common.util.spring; 017 018import java.util.Properties; 019 020import org.kuali.common.util.property.Constants; 021import org.springframework.beans.factory.annotation.Autowired; 022import org.springframework.beans.factory.annotation.Qualifier; 023import org.springframework.context.annotation.Configuration; 024import org.springframework.util.Assert; 025 026/** 027 * Enhance the wired in Maven properties and create a <code>ProjectProperties</code> bean from them. 028 * 029 * @deprecated 030 */ 031@Deprecated 032@Configuration 033public class MavenPropertySourceConfig extends AbstractPropertySourceConfig { 034 035 @Autowired 036 @Qualifier(Constants.DEFAULT_MAVEN_PROPERTIES_BEAN_NAME) 037 Properties mavenProperties; 038 039 @Override 040 protected org.kuali.common.util.property.ProjectProperties getProjectProperties() { 041 042 // Make sure the maven properties got wired in correctly 043 Assert.notNull(mavenProperties, "mavenProperties are null"); 044 045 // Add in org, group, home, and enhanced version properties 046 org.kuali.common.util.MavenUtils.augmentProjectProperties(mavenProperties); 047 048 // Create a ProjectProperties pojo from the properties 049 return org.kuali.common.util.MavenUtils.getMavenProjectProperties(mavenProperties); 050 } 051 052}