Maven Assembly Plugin - install the created assembly

前端 未结 3 702
执念已碎
执念已碎 2021-02-08 00:27

I have a project that simply consists of files. I want to package those files into a zip and store them in a maven repository. I have the assembly plugin configured to build t

3条回答
  •  执笔经年
    2021-02-08 00:51

    I don't know wether this could be usefull for you, but as a JAR file is basically a ZIP file plus the META-INF information, you could create your project as a jar without sources and add the xip countents in src/main/resources without needing any plugin configuration.

    If you want your content to be in a different location, you can always do something like:

    
    
      4.0.0
      com.mycompany.myzip
      myzip-artifact-id
      1.0-SNAPSHOT
      jar
      
        
          
            .
            false
            ${basedir}/zipcontent
            
              **/*
            
          
        
      
    
    

    I f you want your artifact to be installed and being accessible in a repository you will need to set it up for the deploy phase:

    http://maven.apache.org/plugins/maven-deploy-plugin/usage.html

提交回复
热议问题