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.

Daemon forgets about maven settings on reuse

See original GitHub issue

I have a custom settings.xml which points to our company nexus. On first start of the daemon, the settings get applied. Dependencies are downloaded from nexus.

On subsequent uses of the daemon however, the mirrors setting is not getting used. The daemon tries to download from maven central. I now have to mvnd --stop, and then run the build again.

Log from subsequent runs:

[ERROR] project-web:1.0.0-SNAPSHOT: Unexpected message type 24: ExecutionFailure{projectId='project-web', halted=true, exception='org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project project-web: Could not resolve
 dependencies for project com.company:project-web-1.0.0-SNAPSHOT: com.company:commons:jar:1.1.0 was not found in https://repo.maven.apache.org/maven2 during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of central has elapsed or updates are forced'}

Settings.xml:

<mirrors>
		<mirror>
			<id>nexus_internal</id>
			<mirrorOf>internal</mirrorOf>
			<url>https://nexus03.company.com/repository/internal</url>
		</mirror>
		<mirror>
			<id>nexus_public</id>
			<mirrorOf>*</mirrorOf>
			<url>https://nexus03.company.com/repository/public</url>
		</mirror>
	</mirrors>

My mvnd.properties:

maven.settings=/Users/mnp/.m2/mvnd.properties

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
rkraneiscommented, Nov 15, 2021

Same issue here with mvnd 0.6.0; we apply such settings with an activeByDefault profile, which isn’t activated …

0reactions
pptomcommented, Dec 29, 2021

I get the same problem using mvnd-0.7.1-linux-amd64

Read more comments on GitHub >

github_iconTop Results From Across the Web

Daemon forgets about maven settings on reuse #490 - GitHub
I have a custom settings.xml which points to our company nexus. On first start of the daemon, the settings get applied.
Read more >
mvndaemon on Twitter: "mvnd 0.7.0 highlights: • Improvements on ...
Release 0.7.0 · apache/maven-mvnd. Full Changelog Closed issues: PATH computation ... #497 Daemon forgets about maven settings on reuse #490 Support Maven ....
Read more >
mvnd: Maven's Speed Daemon, a Conversation with Peter ...
The Maven Daemon project intends to increase the speed of the Maven builds by ... ensuring that the plugins can be reused multiple...
Read more >
Reusing maven configuration - Stack Overflow
What is the best way to create reusable dependency definitions and profiles in maven? I would like to externalize dependencies and profiles for ......
Read more >
Faster Maven builds in Docker - A Java geek
The idea is to avoid reusing a previously built image. ... the previous post regarding regular Maven builds, I mentioned the Maven daemon....
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