Search code examples
javamavenintellij-ideajar

what files are included when using maven deploy?


I want to run maven deploy to a project, I understand the deploy packages the project as a jar and puts this jar on a remote repository, however I was wondering, in project section of Intellij there are several files including reports generated when I run my code, so does the deployed jar include those files? for example: report.json , report.xml. etc... If anyone can tell what exactly does the deployed jar include that'd be great!


Solution

  • If anyone can tell what exactly does the deployed jar include that'd be great!

    Here's the official doc of what you're interested in.

    It says that mvn deploy does the following ...

    deploy:deploy is used to automatically install the artifact, its pom and the attached artifacts produced by a particular project. Most if not all of the information related to the deployment is stored in the project's pom.

    So what does it mean concretely ... well, we can look at an example artifact the maven central repo.

    Here's what we see ...

    activeio-2.0-r118.jar                             2005-11-22 02:00    239185      
    activeio-2.0-r118.jar.md5                         2005-11-22 02:00        32      
    activeio-2.0-r118.jar.sha1                        2005-11-22 02:00        40      
    activeio-2.0.pom                                  2005-11-22 02:00       148      
    activeio-2.0.pom.md5                              2005-11-22 02:00        32      
    activeio-2.0.pom.sha1                             2005-11-22 02:00        40      
    maven-metadata.xml                                2005-11-22 02:00       113      
    maven-metadata.xml.md5                            2005-11-22 02:00        77      
    maven-metadata.xml.sha1                           2005-11-22 02:00       132 
    

    We have ...

    1. jar file. Needed for the thing to work.
    2. pom.xml for this dependency. Needed to download transitive dependencies
    3. Metadata file
    4. Hashes .md5 and .sha1 which allow to validate the integrity of the other files