Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 341120 - IllegalStateException: ${maven.home} is not specified when using embedded runtime
Summary: IllegalStateException: ${maven.home} is not specified when using embedded run...
Status: CLOSED WONTFIX
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-28 11:33 EDT by Igor Fedorenko CLA
Modified: 2021-04-19 13:22 EDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Fedorenko CLA 2011-03-28 11:33:09 EDT
From https://issues.sonatype.org/browse/MNGECLIPSE-2350

<quote>
When launch with m2eclipse (0.12.0.20101115-1102) then maven-invoker-plugin fails with:
java.lang.IllegalStateException: ${maven.home} is not specified as a directory: 
'my_project_directory\EMBEDDED'

When launch with Maven 2.2.1 within or outside of M2Eclipse then maven-invoker-plugin is OK

I tried several ways to specify ${maven.home} to m2eclipse with no success
</quote>

The way to solve this is to package embedded runtime using conventional maven installation layout.
Comment 1 Philippe Bastiani CLA 2011-07-22 13:27:01 EDT
This can be reproduced on the Minerva project

https://github.com/caniszczyk/minerva.git
Sub-module : minerva-eclipse-project-archetype
Comment 2 Tuomas Kiviaho CLA 2012-06-01 04:41:47 EDT
This only happens with the embedded maven, but any external maven including 3.0.4 will do fine (done from Maven/installations). Embedder seems to pass ${maven.home} as imaginary ${project.basedir}/EMBEDDED and while invoker plugin does only support CLI based maven executions. Combination results invoker to think that everything is ok.
Comment 3 Santiago Gala CLA 2012-10-01 11:14:09 EDT
Any workaround? The bug is affecting me, using ubuntu 12.04.1 eclipse + m2e. I cannot build a project inside eclipse because of this very bug.
Comment 4 Igor Fedorenko CLA 2013-09-28 23:21:19 EDT
closing old/stale bugreports
Comment 5 Aurelien Pupier CLA 2017-03-16 06:01:09 EDT
Hi,

can we reconsider this issue, please? I hit it on my project too. The embedded Maven is the default configuration for Eclipse.
Comment 6 Aurelien Pupier CLA 2017-03-16 06:11:48 EDT
Workaround:
- unzip a maven distribution on your machine
- in Eclipse, Window -> preference -> Maven -> Installations, add the Maven installation you just unzipped
- new launch configuration will use this one, for existing launch configuration you need to update the "Maven Runtime" used at the bottom of the main tab of Launch Configuration dialog
Comment 7 Eclipse Genie CLA 2018-03-17 13:33:37 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 8 Lorenzo Bettini CLA 2019-12-24 15:20:37 EST
Indeed with current version of maven invoker you don't even get any error, but IT tests simply fail
Comment 9 Denis Roy CLA 2021-04-19 13:22:24 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/