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.

Unable to create empty Maven POM project

See original GitHub issue

Apache NetBeans version

Apache NetBeans 13

What happened

Trying to create a new Maven POM Project results in an empty directory with no pom.xml, project wizard shows a warning icon and an exception is logged.

How to reproduce

  1. New Project
  2. Java with Maven -> POM Project
  3. Finish wizard with defaults

Did this work correctly in an earlier version?

Apache NetBeans 12.6

Operating System

Windows 10

JDK

Eclipse Adoptium 11.0.13.8-hotspot

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

This also happens when adding a new empty POM module to an existing project. Maven Java Application, NetBeans Module, NetBeans Application and Project from Archetype seem to work fine.

INFO [org.netbeans.ui.metrics.maven]: USG_PROJECT_CREATE_MAVEN
INFO [org.openide.WizardDescriptor]
msg
Caused: java.io.SyncFailedException: C:\Users\iajn\Documents\NetBeansProjects\mavenproject1
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createData(FolderObj.java:377)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createDataImpl(FolderObj.java:324)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$1.call(FolderObj.java:290)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$1.call(FolderObj.java:288)
	at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.runAsInconsistent(FileBasedFileSystem.java:97)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createData(FolderObj.java:293)
	at org.netbeans.api.templates.CreateFromTemplateImpl.defaultCreate(CreateFromTemplateImpl.java:334)
	at org.netbeans.api.templates.CreateFromTemplateImpl.build(CreateFromTemplateImpl.java:151)
	at org.netbeans.api.templates.CreateFromTemplateImpl.lambda$build$0(CreateFromTemplateImpl.java:86)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:102)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:494)
	at org.netbeans.api.templates.CreateFromTemplateImpl.build(CreateFromTemplateImpl.java:84)
	at org.netbeans.api.templates.FileBuilder.build(FileBuilder.java:267)
	at org.netbeans.modules.maven.newproject.idenative.IDENativeMavenWizardIterator.instantiate(IDENativeMavenWizardIterator.java:85)
	at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1048)
	at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:602)
	at org.netbeans.modules.project.ui.NewProjectWizard.handleInstantiate(NewProjectWizard.java:51)
	at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:436)
	at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:228)
	at org.openide.loaders.TemplateWizardIteratorWrapper$ProgressInstantiatingIterator.instantiate(TemplateWizardIteratorWrapper.java:155)
	at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1602)
	at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1546)
	at org.openide.WizardDescriptor.access$2300(WizardDescriptor.java:67)
[catch] at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2233)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
ALL [null]: Cannot create file mavenproject1 in folder C:/Users/iajn/Documents/NetBeansProjects.

pom-project

Are you willing to submit a pull request?

No

Code of Conduct

Yes

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
bradhcommented, Jun 19, 2022

Confirm it works for me with NB 14 on Ubuntu (from Snap packages).

Thanks for the fix.

0reactions
mbiencommented, Jun 19, 2022

should be fixed in NB 14

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when creating a new maven project - Stack Overflow
It seems that your directory is not empty. this command line works for me: (in an empty directory) mvn archetype:generate -DgroupId=fr.
Read more >
Unable to build maven projects from Build > Build Project for ...
Click next without any archtype selection and create the project. It should create empty project with no dependencies and no classes; Add junit ......
Read more >
Add creating empty maven project without archetypes #869
This behavior can be found in IntelliJ IDEA. You can create an empty maven project with folders structure and the correct Java version...
Read more >
Starting a New Maven Project in Eclipse
We now have our first Eclipse project, huzzah! Defining the POM. So we have a project. That's great, but it's still empty: we...
Read more >
Maven in 5 Minutes
This is because Maven is downloading the most recent artifacts (plugin jars and other files) into your local repository. You may also need...
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