Remove Sample Plugins
Issue gh-9539
This commit is contained in:
@@ -34,12 +34,6 @@ class ShowcaseITest extends Specification {
|
||||
.build();
|
||||
then: 'entire build passes'
|
||||
result.output.contains("BUILD SUCCESSFUL")
|
||||
|
||||
and: 'javadoc api works'
|
||||
|
||||
and: 'integration tests run'
|
||||
new File(testKit.getRootDir(), 'samples/sgbcs-sample-war/build/test-results/integrationTest/').exists()
|
||||
new File(testKit.getRootDir(), 'samples/sgbcs-sample-war/build/reports/tests/integrationTest/').exists()
|
||||
}
|
||||
|
||||
def "install"() {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
plugins {
|
||||
id 'io.spring.convention.javadoc-api'
|
||||
id 'io.spring.convention.spring-module' apply false
|
||||
id 'io.spring.convention.spring-sample' apply false
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
apply plugin: 'io.spring.convention.spring-sample'
|
||||
apply plugin: 'java'
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
apply plugin: 'io.spring.convention.spring-sample-war'
|
||||
|
||||
dependencies {
|
||||
provided 'javax.servlet:javax.servlet-api'
|
||||
testCompile 'commons-io:commons-io'
|
||||
testCompile 'junit:junit'
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package sample;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.net.URL;
|
||||
import java.nio.charset.Charset;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.junit.Test;
|
||||
|
||||
public class HelloServletTest {
|
||||
|
||||
@Test
|
||||
public void hello() throws Exception {
|
||||
String url = System.getProperty("app.baseURI");
|
||||
try(InputStream get = new URL(url).openConnection().getInputStream()) {
|
||||
String hello = IOUtils.toString(get, Charset.defaultCharset());
|
||||
assertEquals("Hello", hello);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright 2002-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
|
||||
*
|
||||
* https://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 sample;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet("/")
|
||||
public class HelloServlet extends HttpServlet {
|
||||
|
||||
@Override
|
||||
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
|
||||
resp.getWriter().write("Hello");
|
||||
}
|
||||
|
||||
private static final long serialVersionUID = -166535360229360350L;
|
||||
}
|
||||
Reference in New Issue
Block a user