Maven Clean Issue - Non-resolvable import POM - Could not transfer artifact from NEXUS
19:52 31 Aug 2018

I am having problem doing a build on a new project. The build works for the old devs on the project, but after cloning the projects and using the same version of maven. Its not working for me.

Initially, I was doing a mvn clean install

But, after some research I found out the same build error occured with a simple mvn clean.

The error is as follows:

C:\workspace\some-web-app>mvn clean
[INFO] Scanning for projects...
Downloading from nexus-public: https://company-net:8080/nexus/content/groups/public/org/jboss/bom/jboss-eap-javaee7-with-tools/7.1.0.GA/jboss-eap-javaee7-with-tools-7.1.0.GA.pom
Downloading from nexus-releases: https://company-net:8080/nexus/content/repositories/releases/org/jboss/bom/jboss-eap-javaee7-with-tools/7.1.0.GA/jboss-eap-javaee7-with-tools-7.1.0.GA.pom
Downloading from nexus-public: https://company-net:8080/nexus/content/groups/public/org/jboss/bom/eap-runtime-artifacts/7.1.0.GA/eap-runtime-artifacts-7.1.0.GA.pom
Downloading from nexus-releases: https://company-net:8080/nexus/content/repositories/releases/org/jboss/bom/eap-runtime-artifacts/7.1.0.GA/eap-runtime-artifacts-7.1.0.GA.pom
Downloading from nexus-public: https://company-net:8080/nexus/content/groups/public/org/jboss/spec/jboss-javaee-7.0/1.1.0.Final-redhat-1/jboss-javaee-7.0-1.1.0.Final-redhat-1.pom
Downloading from nexus-releases: https://company-net:8080/nexus/content/repositories/releases/org/jboss/spec/jboss-javaee-7.0/1.1.0.Final-redhat-1/jboss-javaee-7.0-1.1.0.Final-redhat-1.pom
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-ejb-plugin is missing. @ line 292, column 22
[ERROR] Non-resolvable import POM: Could not transfer artifact org.jboss.bom:jboss-eap-javaee7-with-tools:pom:7.1.0.GA from/to nexus-public (https://company-net:8080/nexus/content/groups/p
[ERROR] Non-resolvable import POM: Could not transfer artifact org.jboss.bom:eap-runtime-artifacts:pom:7.1.0.GA from/to nexus-public (https://company-net:8080/nexus/content/groups/public/)
[ERROR] Non-resolvable import POM: Could not transfer artifact org.jboss.spec:jboss-javaee-7.0:pom:1.1.0.Final-redhat-1 from/to nexus-public (https://company-net:8080/nexus/content/groups/
[ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. @ line 136, column 21
[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-core:jar is missing. @ line 142, column 21
[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-validator:jar is missing. @ line 148, column 21
[ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-ehcache:jar is missing. @ line 160, column 21
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.servlet:jboss-servlet-api_3.1_spec:jar is missing. @ line 165, column 21
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.faces:jboss-jsf-api_2.2_spec:jar is missing. @ line 171, column 21
[ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ejb:jboss-ejb-api_3.2_spec:jar is missing. @ line 177, column 21

The settings.xml is under C:\Users[User-ID].m2 as follows:



    
    
    

        
          nexus-public
          user1
          pass1
        
        
          nexus-snapshots
          user1
          pass1
        
        
          nexus-releases
          user1
          pass1
        

    

    

    
        
            companydev

            
                mis-dev
                jdbc:mysql://mis-dev:1234/unit_test
            

            
                
                    nexus-public
                    https://company-net:8080/nexus/content/groups/public/
                    
                        true
                    
                    
                        false
                    
                
                
                    nexus-snapshots
                    https://company-net:8080/nexus/content/repositories/snapshots
                    
                        false
                    
                    
                        true
                    
                
                
                    nexus-releases
                    https://company-net:8080/nexus/content/repositories/releases
                    
                        true
                    
                    
                        false
                    
                
            
        
    

    
        companydev
    


The POM for the module to be build is:


    4.0.0

    sc.foc.fo.plc
    ams-parent
    pom
    0.0.1-SNAPSHOT

    ags
    desc  .........
    
        Org Name
    

    
        
            deployment
            Internal Releases
            http://1.2.3.4:8081/nexus/content/repositories/releases/
        
        
            deployment
            Internal Releases
            http://1.2.3.4:8081/nexus/content/repositories/snapshots/
        
    

    

        
        UTF-8

        2.4

        1.8.0

        1.1.0.Final-redhat-1
        6.1
        7.1.0.GA

        
        1.7.7
        1.2.0.Alpha4

        2.4

        2.0.2
        2.0.2
        2.3.1
        1.5.16

        3.1.12
        3.1.11

        4.12
        5.1.45

        1.9.2
        1.1.1
        3.2.4
        3.0.0
        2.8.9
        2.9.1-1
        0.9.9-RC1
        3.16.1-GA
        2.5.2
        1.0.3
        1.5.1-M2
        3.0.24.Final
        3.1.0
        1.10.19
        1.7.7

    

    
        
            
            
                org.jboss.bom
                jboss-eap-javaee7-with-tools
                ${server-bom.version}
                pom
                import
            

            
                org.jboss.bom
                eap-runtime-artifacts
                ${server-bom.version}
                pom
                import
            

            
            
            
                org.jboss.spec
                jboss-javaee-7.0
                ${jboss-spec-javaee-7.0.version}
                pom
                import
            

            
                org.jboss.as
                jboss-as-cli
                7.2.0.Final
                
                    
                    
                        sun.jdk
                        jconsole
                    
                
            

        
    

    

        
            javax.enterprise
            cdi-api
            provided
        

        
            org.hibernate
            hibernate-core
            provided
        

        
            org.hibernate
            hibernate-validator
            provided
            
                
                    org.slf4j
                    slf4j-api
                
            
        

        
            org.hibernate
            hibernate-ehcache
        

        
            org.jboss.spec.javax.servlet
            jboss-servlet-api_3.1_spec
            provided
        

        
            org.jboss.spec.javax.faces
            jboss-jsf-api_2.2_spec
            provided
        

        
            org.jboss.spec.javax.ejb
            jboss-ejb-api_3.2_spec
            provided
        

        
            org.primefaces
            primefaces
            ${primefaces.version}
        

        
            org.primefaces.themes
            all-themes
            1.0.10
        

        
            org.slf4j
            provided
            ${slf4j.version}
            slf4j-api
        

        
            commons-lang
            commons-lang
            ${commons-lang.version}
        

        
            commons-io
            commons-io
            ${commons-io.version}
        

        

        
            junit
            junit
            ${junit.version}
        

        
            org.dbunit
            dbunit
            2.5.4
            test
        

        
            mysql
            mysql-connector-java
            ${mysql-connector.version}
            test
        

    

    
        
            
                nl.geodienstencentrum.maven
                sass-maven-plugin
                
                2.25
            

            
                org.apache.maven.plugins
                maven-compiler-plugin
                3.3
                
                    1.8
                    1.8
                
            

            
                org.apache.maven.plugins
                maven-surefire-plugin
                2.4
                
            

            
                maven-install-plugin
                2.4
            

            

           
                org.apache.maven.plugins
                    maven-ejb-plugin
                    3.0.1
                    
                        3.0
                    
            


             
            
        
    

    
        ags-build-tools
        ags-core
        ags-core-api
        ags-jpa
        ags-integration-authorise-api
        ags-integration-authorise-api-impl
        ags-integration-jboss
        ags-database
        ags-web
    


I'v added the latest version for the dependencies in the POM to hack d 7 errors related to "'dependencies.dependency.version' ". But, my colleagues did not have to add the version to theirs'. So, my hack is not acceptable! The dependency have a scope of 'provided' and should be provided by the container. After research, I learned the dependencies should be downloaded into my .m2 (local repo) for local build, but they should not be packaged into the final artefact during buld.

Also, the second issue which is still unresolved is the "Non-resolvable import POM: Could not transfer artifact". I am thinking its a proxy issue, but my colleagues reckon using my mobile hot spot should work. Any ideas will be appreciated. Thanks.

Any ideas what could possibly be the problem?

java spring maven jboss nexus