why is “test-jar” dependency required for “mvn compile”

后端 未结 4 1443
名媛妹妹
名媛妹妹 2021-02-02 13:38

I\'m having trouble using test-jar dependencies in a multi-module project. For example, when I declare that the cleartk-syntax module depends on the

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-02 14:27

    In my case the root cause was that the module which should be used as a dependency in test scope with type test-jar did not include the required maven-jar-plugin configuration. Without the snippet below no test jar will be deployed when you call mvn deploy on the respective module.

    
    
      
        org.apache.maven.plugins
        maven-jar-plugin
        
          
            
              test-jar
            
          
        
      
    
    

    See https://maven.apache.org/guides/mini/guide-attached-tests.html for more details.

提交回复
热议问题