Skip to content
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.

Error on multimodule spring boot project #319

Open
casper5822 opened this issue May 22, 2019 · 2 comments
Open

Error on multimodule spring boot project #319

casper5822 opened this issue May 22, 2019 · 2 comments

Comments

@casper5822
Copy link

Hello,
i have a multimodule spring boot project. In my parent pom i have this configuration:

	<plugin>
		<groupId>io.openliberty.boost</groupId>
		<artifactId>boost-maven-plugin</artifactId>
		<version>${boost.version}</version>
		 <executions>
		    <execution>
		      <goals>
		        <goal>docker-build</goal>
		        <goal>docker-push</goal>
		      </goals>
		    </execution>
		  </executions>
	</plugin>
	
</plugins>

In every submodule pom i have this configuration:

					<plugin>
					  <groupId>io.openliberty.boost</groupId>
					  <artifactId>boost-maven-plugin</artifactId>
					  <configuration>
					    <repository>${docker.repository}/${name}</repository>
					    <tag>${project.version}</tag>
					    <buildArgs>
						   <JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE>
						</buildArgs>
					  </configuration>
					  <executions>
					    <execution>
					      <goals>
					        <goal>docker-build</goal>
					        <goal>docker-push</goal>
					      </goals>
					    </execution>
					  </executions>
					  <dependencies>
					    <dependency>
					      <groupId>javax.activation</groupId>
					      <artifactId>activation</artifactId>
					      <version>1.1.1</version>
					    </dependency>
					  </dependencies>
					</plugin>	

When i run on the parent pom the command: mvn docker:build

i get the following error:

Failed to execute goal io.openliberty.boost:boost-maven-plugin:0.1.2:docker-build (default-cli) on project triptrainer: null: MojoExecutionException: BoostException: NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal io.openliberty.boost:boost-maven-plugin:0.1.2:docker-build (default-cli) on project : null


If i chage the goal in package in every submodule and remove the pluginManagement and run just clean package, the plugin works.

I don't know what is wrong.
Thank you for any response.

Best regards

@casper5822 casper5822 changed the title Error on multimodule spring boot plugin running Error on multimodule spring boot project May 22, 2019
@scottkurz
Copy link
Contributor

scottkurz commented May 28, 2019

I assume that by:

When i run on the parent pom the command: mvn docker:build

you actually meant mvn boost:docker-build.

If so, the problem seems to be that the plugin doesn't do a no-op for packaging type pom. That seems like a reasonable thing to consider.

In the meantime, you can still use the parent for pluginManagement and workaround the issue by using mvn --projects (or mvn -pl), like this, from the parent module dir:

mvn --projects child1,child2, ..., childN boost:docker-build

@casper5822
Copy link
Author

Yes the command is boost:docker-build

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants