Search code examples
javaeclipsemavenjarpackage

Running 'mvn clean package' in the command line - I cannot see jar file in the eclipse repository


I have a 'Main.java' file.

When I run 'mvn clean package' in the terminal, it packages the jar file.

However, I cannot see where the .jar file is stored. I believe it should be in the 'target' folder on my eclipse repository, but it is not there! (see screenshot below)

In the terminal, I changed the current directory to: '/Users/macbook/eclipse-workspace/newestplugin' before running 'mvn clean package'.

enter image description here

I would be so grateful for a helping hand as to whether there is a way round this so I can actually find the .jar file?


Solution

  • To solve this, I went through the following steps:

    1. I first closed the eclipse app on my macbook which I used to create the source code
    2. I then opened the app again
    3. I then clicked on the '.java' file and went to the tab 'file', and then pressed 'refresh' to refresh the file
    4. The '.jar' file then appeared in the 'target' folder, which was located within the main project folder on eclipse.