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
d69364c0
Commit
d69364c0
authored
Dec 27, 2016
by
Phillip Webb
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7741 from ArloL/fix-7701
* pr/7741: Notify BuildContext of changed build-info file
parents
8baac239
3a709511
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
pom.xml
spring-boot-parent/pom.xml
+5
-0
pom.xml
spring-boot-tools/spring-boot-maven-plugin/pom.xml
+4
-0
BuildInfoMojo.java
...in/java/org/springframework/boot/maven/BuildInfoMojo.java
+6
-0
No files found.
spring-boot-parent/pom.xml
View file @
d69364c0
...
@@ -222,6 +222,11 @@
...
@@ -222,6 +222,11 @@
<artifactId>
kotlin-runtime
</artifactId>
<artifactId>
kotlin-runtime
</artifactId>
<version>
1.0.4
</version>
<version>
1.0.4
</version>
</dependency>
</dependency>
<dependency>
<groupId>
org.sonatype.plexus
</groupId>
<artifactId>
plexus-build-api
</artifactId>
<version>
0.0.7
</version>
</dependency>
<dependency>
<dependency>
<groupId>
org.zeroturnaround
</groupId>
<groupId>
org.zeroturnaround
</groupId>
<artifactId>
zt-zip
</artifactId>
<artifactId>
zt-zip
</artifactId>
...
...
spring-boot-tools/spring-boot-maven-plugin/pom.xml
View file @
d69364c0
...
@@ -170,6 +170,10 @@
...
@@ -170,6 +170,10 @@
<groupId>
org.codehaus.plexus
</groupId>
<groupId>
org.codehaus.plexus
</groupId>
<artifactId>
plexus-utils
</artifactId>
<artifactId>
plexus-utils
</artifactId>
</dependency>
</dependency>
<dependency>
<groupId>
org.sonatype.plexus
</groupId>
<artifactId>
plexus-build-api
</artifactId>
</dependency>
<!-- Optional -->
<!-- Optional -->
<dependency>
<dependency>
<groupId>
org.apache.maven.plugins
</groupId>
<groupId>
org.apache.maven.plugins
</groupId>
...
...
spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/BuildInfoMojo.java
View file @
d69364c0
...
@@ -22,10 +22,12 @@ import java.util.Map;
...
@@ -22,10 +22,12 @@ import java.util.Map;
import
org.apache.maven.plugin.AbstractMojo
;
import
org.apache.maven.plugin.AbstractMojo
;
import
org.apache.maven.plugin.MojoExecutionException
;
import
org.apache.maven.plugin.MojoExecutionException
;
import
org.apache.maven.plugin.MojoFailureException
;
import
org.apache.maven.plugin.MojoFailureException
;
import
org.apache.maven.plugins.annotations.Component
;
import
org.apache.maven.plugins.annotations.LifecyclePhase
;
import
org.apache.maven.plugins.annotations.LifecyclePhase
;
import
org.apache.maven.plugins.annotations.Mojo
;
import
org.apache.maven.plugins.annotations.Mojo
;
import
org.apache.maven.plugins.annotations.Parameter
;
import
org.apache.maven.plugins.annotations.Parameter
;
import
org.apache.maven.project.MavenProject
;
import
org.apache.maven.project.MavenProject
;
import
org.sonatype.plexus.build.incremental.BuildContext
;
import
org.springframework.boot.loader.tools.BuildPropertiesWriter
;
import
org.springframework.boot.loader.tools.BuildPropertiesWriter
;
import
org.springframework.boot.loader.tools.BuildPropertiesWriter.NullAdditionalPropertyValueException
;
import
org.springframework.boot.loader.tools.BuildPropertiesWriter.NullAdditionalPropertyValueException
;
...
@@ -41,6 +43,9 @@ import org.springframework.boot.loader.tools.BuildPropertiesWriter.ProjectDetail
...
@@ -41,6 +43,9 @@ import org.springframework.boot.loader.tools.BuildPropertiesWriter.ProjectDetail
@Mojo
(
name
=
"build-info"
,
defaultPhase
=
LifecyclePhase
.
GENERATE_RESOURCES
,
threadSafe
=
true
)
@Mojo
(
name
=
"build-info"
,
defaultPhase
=
LifecyclePhase
.
GENERATE_RESOURCES
,
threadSafe
=
true
)
public
class
BuildInfoMojo
extends
AbstractMojo
{
public
class
BuildInfoMojo
extends
AbstractMojo
{
@Component
private
BuildContext
buildContext
;
/**
/**
* The Maven project.
* The Maven project.
*/
*/
...
@@ -67,6 +72,7 @@ public class BuildInfoMojo extends AbstractMojo {
...
@@ -67,6 +72,7 @@ public class BuildInfoMojo extends AbstractMojo {
.
writeBuildProperties
(
new
ProjectDetails
(
this
.
project
.
getGroupId
(),
.
writeBuildProperties
(
new
ProjectDetails
(
this
.
project
.
getGroupId
(),
this
.
project
.
getArtifactId
(),
this
.
project
.
getVersion
(),
this
.
project
.
getArtifactId
(),
this
.
project
.
getVersion
(),
this
.
project
.
getName
(),
this
.
additionalProperties
));
this
.
project
.
getName
(),
this
.
additionalProperties
));
this
.
buildContext
.
refresh
(
this
.
outputFile
);
}
}
catch
(
NullAdditionalPropertyValueException
ex
)
{
catch
(
NullAdditionalPropertyValueException
ex
)
{
throw
new
MojoFailureException
(
throw
new
MojoFailureException
(
...
...
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