question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

mvnd native executable is not passing -Dkey=val to the daemon

See original GitHub issue

I do have the following configuration for my docker-maven-plugin in the parent pom.xml for my multi module project:

	<plugin>
		<groupId>com.spotify</groupId>
		<artifactId>dockerfile-maven-plugin</artifactId>
		<version>1.4.13</version>
		<executions>
			<execution>
				<id>default</id>
				<goals>
					<goal>build</goal>
				</goals>
			</execution>
		</executions>
		<configuration>
			<repository>${docker.user}/${project.artifactId}</repository>
			<tag>${project.version}</tag>
			<buildArgs>
				<JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
			</buildArgs>
		</configuration>
	</plugin>

each of my modules import this configuration using the following directive:

	<profiles>
		<profile>
			<id>docker</id>
			<activation>
				<property>
					<name>docker</name>
					<value>build</value>
				</property>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.spotify</groupId>
						<artifactId>dockerfile-maven-plugin</artifactId>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>	

With the command mvn clean package -DskipTests -P docker -Ddocker.user=thiagolocatelli project builds successfully and my docker images are created, however when I use the command mvnd clean package -DskipTests -P docker -Ddocker.user=thiagolocatelli the project fail with the following error messages:

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for homeflix-parent 1.0.0-SNAPSHOT:
[INFO]
[INFO] homeflix-parent .................................... SUCCESS [  0.182 s]
[INFO] user-service ....................................... FAILURE [ 10.839 s]
[INFO] rental-service ..................................... FAILURE [ 10.839 s]
[INFO] cart-service ....................................... FAILURE [ 10.840 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  15.523 s (Wall Clock)
[INFO] Finished at: 2020-10-26T10:20:39-04:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.13:build (default) on project user-service: Repo name "${docker.user}/user-service" must contain only lowercase, numbers, '-', '_' or '.'. -> [Help 1]
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.13:build (default) on project rental-service: Repo name "${docker.user}/rental-service" must contain only lowercase, numbers, '-', '_' or '.'. -> [Help 1]
[ERROR] Failed to execute goal com.spotify:dockerfile-maven-plugin:1.4.13:build (default) on project cart-service: Repo name "${docker.user}/cart-service" must contain only lowercase, numbers, '-', '_' or '.'. -> [Help 1]

Not sure this is a bug related to mvnd but it is only happening with mvnd on my local environment. The same error happen with other projects as well.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
thiagolocatellicommented, Oct 27, 2020

ok, I ran using the shell script

Building gracenote-parent  threads: 7  time: 20s  progress: 5/8 62%
:gracenote-csv-exporter-605:com.spotify:dockerfile-maven-plugin:1.4.13:build {execution: default}
:gracenote-history-loader-605:com.spotify:dockerfile-maven-plugin:1.4.13:build {execution: default}
:gracenote-data-loader-605:com.spotify:dockerfile-maven-plugin:1.4.13:build {execution: default}

it worked but I guess the shell script is calling java directly and not using the native binary, which I can not run at the time.

1reaction
ppalagacommented, Oct 27, 2020

-H:-ParseRuntimeOptions looks very promissing https://github.com/oracle/graal/issues/779#issuecomment-436274256

Read more comments on GitHub >

github_iconTop Results From Across the Web

mvnd native executable is not passing -Dkey=val to the daemon
I do have the following configuration for my docker-maven-plugin in the parent pom.xml for my multi module project: com.spotify ...
Read more >
Let's talk about mvnd - Onesait Platform Community
A daemon instance can serve multiple consecutive requests from the mvnd client. mvnd is a native executable built with GraalVM, so it starts ......
Read more >
https://raw.githubusercontent.com/mvndaemon/mvnd/m...
Changelog ## [0.8.1](https://github.com/apache/maven-mvnd/tree/0.8.1) (2022-09-08) [Full ... mvnd native executable is not passing -Dkey=val to the daemon ...
Read more >
mvnd: Maven's Speed Daemon, a Conversation with Peter ...
The native executable starts blazing fast and spends a fraction of memory compared to the traditional JVM. The mvnd client is there to...
Read more >
mvndaemon - Twitter
Maven Daemon 0.8.2 released. mvnd native executable for darwin-aarch64 a.k.a. ... The last attempt did not pass the vote at ASF Maven project...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found