Maven常见问题

1、关于Pom基础的group问题

         问题描述:

                   新建了一个多模块项目,父模块继承自spring-boot-starter-parent,父模块中未指定group.id,导致在子模块一直报找不到父模块的错误。

Maven常见问题_第1张图片

         解决方案:

                   在父模块中加入group.id配置。

         问题原因分析:

                   如果模块中不指定group.id属性,默认模块继承其父模块的group.id属性。像此种情况,我新建的父pom和springboot的group不属于同一group,但在子模块中指定了不同于springboot的group.id,导致报不能解析父模块的pom。

 

2、Maven的顶级POM

          https://maven.apache.org/ref/3.6.3/maven-model-builder/super-pom.html


  4.0.0
 
  
    
      central
      Central Repository
      https://repo.maven.apache.org/maven2
      default
      
        false
      
    
  
 
  
    
      central
      Central Repository
      https://repo.maven.apache.org/maven2
      default
      
        false
      
      
        never
      
    
  
 
  
    ${project.basedir}/target
    ${project.build.directory}/classes
    ${project.artifactId}-${project.version}
    ${project.build.directory}/test-classes
    ${project.basedir}/src/main/java
    ${project.basedir}/src/main/scripts
    ${project.basedir}/src/test/java
    
      
        ${project.basedir}/src/main/resources
      
    
    
      
        ${project.basedir}/src/test/resources
      
    
    
      
      
      
        
          maven-antrun-plugin
          1.3
        
        
          maven-assembly-plugin
          2.2-beta-5
        
        
          maven-dependency-plugin
          2.8
        
        
          maven-release-plugin
          2.5.3
        
      
    
  
 
  
    ${project.build.directory}/site
  
 
  
    
    
      release-profile
 
      
        
          performRelease
          true
        
      
 
      
        
          
            true
            maven-source-plugin
            
              
                attach-sources
                
                  jar-no-fork
                
              
            
          
          
            true
            maven-javadoc-plugin
            
              
                attach-javadocs
                
                  jar
                
              
            
          
          
            true
            maven-deploy-plugin
            
              true
            
          
        
      
    
  
 

3、Maven的pom继承规则:

           https://maven.apache.org/guides/introduction/introduction-to-the-pom.html

4、Maven的依赖以及依赖域

          https://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

5、Maven项目的标准文件结构

         https://maven.apache.org/guides/introduction/introduction-to-the-standard-directory-layout.html

6、Maven的profile

        https://maven.apache.org/guides/introduction/introduction-to-profiles.html

7、Maven项目的生命周期

        https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html

8、Maven的setting.xml文件的配置

       https://maven.apache.org/settings.html

       https://maven.apache.org/guides/mini/guide-mirror-settings.html

9、Repositories和Mirrors的区别

         https://maven.apache.org/guides/introduction/introduction-to-repositories.html

         https://maven.apache.org/guides/mini/guide-mirror-settings.html

10、别人总结的一些问题,也很好

         https://blog.csdn.net/huxiutao/article/details/87835076

 

你可能感兴趣的:(Maven)