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

Summary: Maven cannot find pom.xml on secondary drive
Product: projects Reporter: gil_yoder
Component: MavenAssignee: Tomas Stupka <tstupka>
Status: RESOLVED INCOMPLETE    
Severity: normal Keywords: SIMPLEFIX
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 8 x64   
Issue Type: DEFECT Exception Reporter:

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 

thanks