nicolaferraro commented on a change in pull request #239: initial support for
spring boot
URL: https://github.com/apache/camel-k/pull/239#discussion_r236034853
##########
File path: pkg/builder/builder_steps.go
##########
@@ -198,38 +202,44 @@ func packager(ctx *Context, selector ArtifactsSelector)
error {
}
defer tarAppender.Close()
- tarDir := "dependencies/"
+ tarDir := "dependencies"
for _, entry := range selectedArtifacts {
gav, err := maven.ParseGAV(entry.ID)
if err != nil {
return err
}
- tarPath := path.Join(tarDir, gav.GroupID)
- _, err = tarAppender.AddFile(entry.Location, tarPath)
+ _, fileName := path.Split(entry.Location)
+
+ _, err = tarAppender.AddFileWithName(gav.GroupID+"."+fileName,
entry.Location, tarDir)
if err != nil {
return err
}
}
- cp := ""
- for _, entry := range ctx.Artifacts {
- gav, err := maven.ParseGAV(entry.ID)
+ if ctx.ComputeClasspath {
+ cp := ""
+ for _, entry := range ctx.Artifacts {
+ gav, err := maven.ParseGAV(entry.ID)
+ if err != nil {
+ return nil
+ }
+ _, fileName := path.Split(entry.Location)
+ cp += path.Join(tarDir, gav.GroupID+"."+fileName) + "\n"
+ }
+
+ err = tarAppender.AppendData([]byte(cp), "classpath")
Review comment:
Does the classpath work also with the spring-boot loader?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services