Multimodule project

This commit is contained in:
Marcin Grzejszczak
2017-03-07 09:57:02 +01:00
parent 7183af82d3
commit 85b718753c
209 changed files with 207 additions and 104 deletions

View File

@@ -0,0 +1,48 @@
/*
* Copyright 2013-2017 the original author or authors.
*
* Licensed 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.springframework.cloud.release;
import static org.slf4j.LoggerFactory.getLogger;
import java.io.File;
import java.lang.invoke.MethodHandles;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.release.internal.ProjectUpdater;
@SpringBootApplication
public class ReleaserApplication implements CommandLineRunner {
private static final Logger log = getLogger(MethodHandles.lookup().lookupClass());
public static void main(String[] args) {
SpringApplication.run(ReleaserApplication.class, args);
}
@Autowired ProjectUpdater projectUpdater;
@Override public void run(String... strings) throws Exception {
String workingDir = System.getProperty("user.dir");
log.info("Will run the application for root folder [{}]", workingDir);
log.info("Press any key to continue...");
System.in.read();
this.projectUpdater.updateProject(new File(workingDir));
}
}

View File

@@ -0,0 +1,20 @@
package org.springframework.cloud.release.spring;
/**
* @author Marcin Grzejszczak
*/
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.release.internal.ProjectUpdater;
import org.springframework.cloud.release.internal.ReleaserProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableConfigurationProperties(ReleaserProperties.class)
class ReleaserConfiguration {
@Bean ProjectUpdater projectUpdater(ReleaserProperties properties) {
return new ProjectUpdater(properties);
}
}