Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hiwepy/maven-invoker-spring-boot-starter

Spring Boot Starter For Maven Invoker
https://github.com/hiwepy/maven-invoker-spring-boot-starter

Last synced: about 1 month ago
JSON representation

Spring Boot Starter For Maven Invoker

Awesome Lists containing this project

README

        

# maven-invoker-spring-boot-starter
Spring Boot Starter For Maven Invoker

### 说明

> 基于 maven-invoker 的 Spring Boot Starter 实现

1. 整合 maven-invoker

### Maven

``` xml

com.github.hiwepy
maven-invoker-spring-boot-starter
${project.version}

```

### Sample

```java

import javax.annotation.PostConstruct;

import org.apache.maven.spring.boot.ext.MavenInvokerTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@EnableMavenInvoker
@SpringBootApplication
public class Application {

@Autowired
private MavenInvokerTemplate mavenInvokerTemplate;

@PostConstruct
private void init() {

//mavenInvokerTemplate.deploy(file, groupId, artifactId, version, packaging, url, repositoryId);
//mavenInvokerTemplate.deploy(basedir, file, groupId, artifactId, version, packaging, url, repositoryId);

//mavenInvokerTemplate.execute(basedir, goals);
//mavenInvokerTemplate.execute(basedir, goals);

}

public static void main(String[] args) throws Exception {
SpringApplication.run(Application.class, args);
}

}

```