mirror of
https://gitee.com/dcren/initializr.git
synced 2025-04-05 17:38:06 +08:00
Polish "Remove default Web UI from Initializr library"
Closes gh-860
This commit is contained in:
parent
7e479e8297
commit
e527172282
@ -63,14 +63,3 @@ The project can be built from the root directory using the standard Maven comman
|
|||||||
----
|
----
|
||||||
$ ./mvnw clean install
|
$ ./mvnw clean install
|
||||||
----
|
----
|
||||||
|
|
||||||
The project also has Selenium tests that instrument the client side. In order to run them
|
|
||||||
you need first to install Firefox and the latest
|
|
||||||
https://github.com/mozilla/geckodriver[geckodriver].
|
|
||||||
|
|
||||||
Once those are installed you can run the smoke tests by enabling an extra profile:
|
|
||||||
|
|
||||||
[indent=0]
|
|
||||||
----
|
|
||||||
$ ./mvnw verify -PsmokeTests
|
|
||||||
----
|
|
||||||
|
@ -208,14 +208,6 @@ Just invoke the build at the root of the project
|
|||||||
$ ./mvnw clean install
|
$ ./mvnw clean install
|
||||||
----
|
----
|
||||||
|
|
||||||
If you want to run the smoke tests using Geb, you need to enable the
|
|
||||||
`smokeTests` profile. Firefox should also be installed on your machine:
|
|
||||||
|
|
||||||
[indent=0]
|
|
||||||
----
|
|
||||||
$ ./mvnw verify -PsmokeTests
|
|
||||||
----
|
|
||||||
|
|
||||||
To generate the docs as well, you should enable the `full` profile:
|
To generate the docs as well, you should enable the `full` profile:
|
||||||
|
|
||||||
[indent=0]
|
[indent=0]
|
||||||
|
@ -114,16 +114,6 @@
|
|||||||
<artifactId>jsonassert</artifactId>
|
<artifactId>jsonassert</artifactId>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>org.seleniumhq.selenium</groupId>
|
|
||||||
<artifactId>selenium-firefox-driver</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.seleniumhq.selenium</groupId>
|
|
||||||
<artifactId>selenium-support</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@ -176,37 +166,6 @@
|
|||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
<profile>
|
|
||||||
<id>smokeTests</id>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>integration-test</id>
|
|
||||||
<phase>integration-test</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>test</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<systemProperties>
|
|
||||||
<smoke.test>true</smoke.test>
|
|
||||||
</systemProperties>
|
|
||||||
<includes>
|
|
||||||
<include>**/*SmokeTests.java</include>
|
|
||||||
</includes>
|
|
||||||
<excludes>
|
|
||||||
<exclude>**/Abstract*.java</exclude>
|
|
||||||
</excludes>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</profile>
|
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
@ -60,7 +60,6 @@ import org.springframework.context.ApplicationEventPublisher;
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.core.env.Environment;
|
import org.springframework.core.env.Environment;
|
||||||
import org.springframework.web.servlet.resource.ResourceUrlProvider;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link org.springframework.boot.autoconfigure.EnableAutoConfiguration
|
* {@link org.springframework.boot.autoconfigure.EnableAutoConfiguration
|
||||||
@ -149,12 +148,10 @@ public class InitializrAutoConfiguration {
|
|||||||
public MainController initializrMainController(
|
public MainController initializrMainController(
|
||||||
InitializrMetadataProvider metadataProvider,
|
InitializrMetadataProvider metadataProvider,
|
||||||
TemplateRenderer templateRenderer,
|
TemplateRenderer templateRenderer,
|
||||||
ResourceUrlProvider resourceUrlProvider,
|
|
||||||
DependencyMetadataProvider dependencyMetadataProvider,
|
DependencyMetadataProvider dependencyMetadataProvider,
|
||||||
ProjectGenerationInvoker projectGenerationInvoker) {
|
ProjectGenerationInvoker projectGenerationInvoker) {
|
||||||
return new MainController(metadataProvider, templateRenderer,
|
return new MainController(metadataProvider, templateRenderer,
|
||||||
resourceUrlProvider, dependencyMetadataProvider,
|
dependencyMetadataProvider, projectGenerationInvoker);
|
||||||
projectGenerationInvoker);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -24,7 +24,6 @@ import io.spring.initializr.metadata.InitializrMetadataProvider;
|
|||||||
|
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||||
import org.springframework.web.servlet.resource.ResourceUrlProvider;
|
|
||||||
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
|
import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -38,8 +37,7 @@ public abstract class AbstractInitializrController {
|
|||||||
|
|
||||||
private Boolean forceSsl;
|
private Boolean forceSsl;
|
||||||
|
|
||||||
protected AbstractInitializrController(InitializrMetadataProvider metadataProvider,
|
protected AbstractInitializrController(InitializrMetadataProvider metadataProvider) {
|
||||||
ResourceUrlProvider resourceUrlProvider) {
|
|
||||||
this.metadataProvider = metadataProvider;
|
this.metadataProvider = metadataProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,6 @@ import org.springframework.web.bind.annotation.RequestHeader;
|
|||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
import org.springframework.web.servlet.resource.ResourceUrlProvider;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The main initializr controller provides access to the configured metadata and serves as
|
* The main initializr controller provides access to the configured metadata and serves as
|
||||||
@ -91,10 +90,10 @@ public class MainController extends AbstractInitializrController {
|
|||||||
private final ProjectGenerationInvoker projectGenerationInvoker;
|
private final ProjectGenerationInvoker projectGenerationInvoker;
|
||||||
|
|
||||||
public MainController(InitializrMetadataProvider metadataProvider,
|
public MainController(InitializrMetadataProvider metadataProvider,
|
||||||
TemplateRenderer templateRenderer, ResourceUrlProvider resourceUrlProvider,
|
TemplateRenderer templateRenderer,
|
||||||
DependencyMetadataProvider dependencyMetadataProvider,
|
DependencyMetadataProvider dependencyMetadataProvider,
|
||||||
ProjectGenerationInvoker projectGenerationInvoker) {
|
ProjectGenerationInvoker projectGenerationInvoker) {
|
||||||
super(metadataProvider, resourceUrlProvider);
|
super(metadataProvider);
|
||||||
this.dependencyMetadataProvider = dependencyMetadataProvider;
|
this.dependencyMetadataProvider = dependencyMetadataProvider;
|
||||||
this.commandLineHelpGenerator = new CommandLineHelpGenerator(templateRenderer);
|
this.commandLineHelpGenerator = new CommandLineHelpGenerator(templateRenderer);
|
||||||
this.projectGenerationInvoker = projectGenerationInvoker;
|
this.projectGenerationInvoker = projectGenerationInvoker;
|
||||||
|
Loading…
Reference in New Issue
Block a user