Specify common resources in a multi-module maven project

前端 未结 6 1319
忘掉有多难
忘掉有多难 2020-12-09 15:00

Is there any way to share resources between modules of a parent project in Maven? For example, I would like to specify one log4j.properties file for all the modules in a mul

6条回答
  •  情书的邮戳
    2020-12-09 15:38

    I managed it to work like this:

    I create a project/assembly/test/resources/META-INF/persistence.xml file, and add this to my pom.xml:

    
        org.apache.maven.plugins
        maven-resources-plugin
        
            
                copy-test-persistence-xml-resources
                process-test-sources
                
                    copy-resources
                
                
                    src/
                    
                        
                            ${project.parent.basedir}/assembly/
                            true
                        
                    
                
            
        
    

提交回复
热议问题