m2e shade eclipse “project main artifact does not exist”

后端 未结 2 1365
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-10 16:46

I\'m trying to make a deployment package that bundles all the dependencies of my maven module that has dependencies to another maven project in eclipse.

I have this in m

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-10 17:12

    The shade plugin is attempting to include the project's artifact in the shaded JAR. Since it doesn't exist (yet), you're getting this error. You either need to build/package the project artifact first (e.g., by attaching the shade goal to the package phase)

    If you don't have any project artifact to include in the shaded JAR, you can add an excludes node to remove the project's artifact.

    Here's an example:

    
            org.apache.maven.plugins
            maven-shade-plugin
            1.6
            
                
                    package
                    
                        shade
                    
                    
                        
                            
                                com.group.id.Launcher1
                            
                        
                        
                            com.my.proj:AAA
                        
                    
                
            
        
    

提交回复
热议问题