GoogleContainerTools / GoogleContainerTools/skaffold

`skaffold init --XXenableJibInit` does not detect disconnected child projects with an inherited jib configuration

Open
#5,658 6 comments 0 reactions 0 assignees View on GitHub
area/init build/jib kind/feature-request priority/p2
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

I'm using the following code in my parent pom:

```



com.google.cloud.tools
jib-maven-plugin
3.0.0

```

Note here: I'm **not** using it in my `pom.xml`.

### Expected behavior
```
skaffold init --XXenableJibInit

```

### Actual behavior
```
skaffold init --XXenableJibInit
one or more valid builder configuration (Dockerfile or Jib configuration) must be present to build images with skaffold; please provide at least one build config and try again or run `skaffold init --skip-build`
```

because scaffold not recognize the `jib-maven-plugin` in the parent pom.

### Information

- Skaffold version: 3.0.0
- Operating system: Ubuntu 20.04
- Installed via: skaffold.dev
- Contents of skaffold.yaml: empty

### Steps to reproduce the behavior

1. Create a bom.xml:

```

4.0.0

org.springframework.boot
spring-boot-starter-parent
2.4.4

de.test
parentbom
0.0.1-SNAPSHOT
pom
parentbom
parent bom


11
${java.version}
${java.version}
UTF-8
UTF-8



org.springframework.boot
spring-boot-starter-web


org.springframework.boot
spring-boot-starter-test
test


org.junit.vintage
junit-vintage-engine






org.springframework.boot
spring-boot-maven-plugin


org.apache.maven.plugins
maven-compiler-plugin


com.google.cloud.tools
jib-maven-plugin
3.0.0


```

use that bom in a project with pom.xml:

```

4.0.0

de.test
parentbom
0.0.1-SNAPSHOT

de.test
testapp
0.0.1-SNAPSHOT
testapp
testapp

```

try: `skaffold init --XXenableJibInit`
it is not working as i said. Because its not recognized. But i have the plugin (but in parent bom)

now try it with this pom which would work of course:

```

4.0.0

de.test
parentbom
0.0.1-SNAPSHOT

de.test
testapp
0.0.1-SNAPSHOT
testapp
testapp



com.google.cloud.tools
jib-maven-plugin
3.0.0

```

thank you

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.