In maven how can I include non-java src files in the same place in the output jar?

后端 未结 3 1827
时光取名叫无心
时光取名叫无心 2020-12-01 15:18

I received a source code bundle. Inside the src directory tree there are some properties files(.properties) which I want to keep in the output jar in the same place. e.g: I

3条回答
  •  盖世英雄少女心
    2020-12-01 16:05

    Include and mix all your non .java src files and the src/main/resources:

    
            
                src/main/resources
            
            
                ${project.build.sourceDirectory}
                
                    **/*.java
                
            
        
    
        
            
                src/test/resources
            
            
                ${project.build.testSourceDirectory}
                
                    **/*.java
                
            
        
    

提交回复
热议问题