This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 251878 - Maven cannot find pom.xml on secondary drive
Summary: Maven cannot find pom.xml on secondary drive
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0.2
Hardware: PC Windows 8 x64
: P3 normal (vote)
Assignee: Tomas Stupka
Depends on:
Reported: 2015-04-16 04:00 UTC by gil_yoder
Modified: 2015-09-10 14:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description gil_yoder 2015-04-16 04:00:10 UTC
When the IDE attempts to build a project located on a secondary drive, Maven looks for POM in the current directory on the primary directory, and is thus unable to locate a project's pom.xml file.

I noticed an error message similar to this: "The goal you specified requires a project to execute but there is no POM in this directory (c:\)...." Of course my project was not in the root of C:, so it wouldn't have found POM there. In my case the project was in a directory on drive D. As a work-around I added a mavenrc_pre.bat batch file called in my home directory, in which I force drive D to be the current drive. When execution returned to mvn.bat, the build proceeded correctly.

Apparently the IDE made the project directory the current directory on drive D, but because C remained the current drive, Maven was wasn't running within the project directory. A fix would make sure that both the project drive, and project directory were set to be the current drive and directory.

Product Version = NetBeans IDE 8.0.2 (Build 201411181905)
Operating System = Windows 8 version 6.2 running on amd64
Java; VM; Vendor = 1.7.0_72
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.72-b04
Comment 1 Tomas Stupka 2015-09-10 14:06:39 UTC
not sure what exactly happened, but the netbeans maven support doesn't look for a pom in the current directory.
if a project is supposed to be build, then the project is already given by the pom.xml (in whatever directory)

please also reproduce the problem in your IDE and attach to this issue your messages.log file and the complete output from the output view