Maven:Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:2.7:resources

后端 未结 10 753
渐次进展
渐次进展 2020-12-05 06:34

I am building my project using Maven. My maven version is apache-maven-3.0.4. I am using Eclipse Luna. When I try to build my project I get the following error

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-05 06:47

    From official documentation

    Warning: Do not filter files with binary content like images! This will most likely result in corrupt output.

    If you have both text files and binary files as resources it is recommended to have two separated folders. One folder src/main/resources (default) for the resources which are not filtered and another folder src/main/resources-filtered for the resources which are filtered.

    
      ...
      
        ...
        
          
            src/main/resources-filtered
            true
          
          ...
        
        ...
      
      ...
    
    

    Now you can put those files into src/main/resources which should not filtered and the other files into src/main/resources-filtered.

    As already mentioned filtering binary files like images,pdf`s etc. could result in corrupted output. To prevent such problems you can configure file extensions which will not being filtered.

    Most certainly, You have in your directory files that cannot be filtered. So you have to specify the extensions that has not be filtered.

提交回复
热议问题