Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
8b03834d
Commit
8b03834d
authored
Jun 16, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add integration test for "gradle install"
See gh-1105
parent
7c0c2e9e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
88 additions
and
0 deletions
+88
-0
InstallTests.java
...st/java/org/springframework/boot/gradle/InstallTests.java
+48
-0
installer.gradle
...oot-integration-tests/src/test/resources/installer.gradle
+40
-0
No files found.
spring-boot-integration-tests/src/test/java/org/springframework/boot/gradle/InstallTests.java
0 → 100644
View file @
8b03834d
/*
* Copyright 2012-2014 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
.
boot
.
gradle
;
import
java.io.IOException
;
import
org.gradle.tooling.ProjectConnection
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.springframework.boot.dependency.tools.ManagedDependencies
;
/**
* Tests for using the Gradle plugin's support for installing artifacts
*
* @author Dave Syer
*/
public
class
InstallTests
{
private
static
ProjectConnection
project
;
private
static
final
String
BOOT_VERSION
=
ManagedDependencies
.
get
()
.
find
(
"spring-boot"
).
getVersion
();
@BeforeClass
public
static
void
createProject
()
throws
IOException
{
project
=
new
ProjectCreator
().
createProject
(
"installer"
);
}
@Test
public
void
cleanInstall
()
{
project
.
newBuild
().
forTasks
(
"install"
).
withArguments
(
"-PbootVersion="
+
BOOT_VERSION
,
"--stacktrace"
).
run
();
}
}
spring-boot-integration-tests/src/test/resources/installer.gradle
0 → 100644
View file @
8b03834d
buildscript
{
repositories
{
mavenLocal
()
}
dependencies
{
classpath
(
"org.springframework.boot:spring-boot-gradle-plugin:${project.bootVersion}"
)
}
}
apply
plugin:
'java'
apply
plugin:
'maven'
apply
plugin:
'spring-boot'
group
=
'installer'
version
=
'0.0.0'
install
{
repositories
.
mavenInstaller
{
pom
.
project
{
parent
{
groupId
'org.springframework.boot'
artifactId
'spring-boot-starter-parent'
version
"${project.bootVersion}"
}
}
}
}
jar
{
baseName
=
'installer'
}
repositories
{
mavenLocal
()
mavenCentral
()
}
dependencies
{
compile
"org.springframework.boot:spring-boot-starter"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment