Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error "MANIFEST.MF already exists in VFS" when creating new artifact

I have a Java project that I used to be able to build artifacts from, but now I am unable to.

First, my project was building and I was able to create artifacts, but on running the .jar I was getting "Java Exemption Error". I checked to see what version of the compiler I was using (1.8) and made sure my machine was up to date.

Next I tried to fix any dependency issues by deleting and re-associating some of my external .jar files.

Then I deleted the artifact setting and tried to create a new one. Now I receive a

.../MANIFEST.MF already exists in VFS

error when trying to create a new artifact.

I'm using the latest version of Intellij. My source code can be found here: https://github.com/mjtik/PiccoApp.

I can provide screen shots if necessary.

*I have created many .jars in the past, not sure what changed in my project.

Any suggestions or guidance would be appreciated.

like image 792
mjtik Avatar asked Jul 02 '15 16:07

mjtik


2 Answers

I solved my problem. Ever step I took lead me to the solution. The problem was with how I was creating the new artifact.

When creating the new artifact, I selected JAR and then a popup window displays default settings. It has me app module selected and the main class below is blank.

I was selecting the main class and it was producing an error. When I just accepted the default options left the main class blank, the artifact was created.

like image 88
mjtik Avatar answered Sep 17 '22 17:09

mjtik


Another solution would be to just :

  1. Navigate to $HOME$\IdeaProjects\ProjectFolder\src\META-INF and delete the MANIFEST.MF file in there.
  2. Restart IntelliJ Idea
  3. Go to Project Structure > Artifacts -> delete your project artifact setting
  4. Add new artifact setting and reconfigure as required.
like image 28
The-Droidster Avatar answered Sep 20 '22 17:09

The-Droidster