Results 1 to 7 of 7
  1. #1
    Jack_Tauson_Sr is offline Senior Member
    Join Date
    Nov 2011
    Posts
    165
    Rep Power
    7

    Default Getting Build Failure :Failed to execute goal on project WebdevApp

    I am getting Build Failure while doing maven build in Eclipse Neon.My pom.xml is as follows and error details are mentioned following as well:

    Java Code:
    <project xmlns="http://maven.apache.org/POM/4.0.0" 
        		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        		xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
          <modelVersion>4.0.0</modelVersion>
          <groupId>edu.xyz.abcd</groupId>
          <artifactId>WebdevAPP</artifactId>
          <version>0.0.60</version>  
          <packaging>war</packaging>
        
          <properties>
              <java.version>1.8</java.version>
              <spring.orm.version>4.2.5.RELEASE</spring.orm.version>
              <hibernate.version>4.3.5.Final</hibernate.version>
              <oracle.jdbc.version>12.1.0.1</oracle.jdbc.version>
              <apache.commons.version>2.1.1</apache.commons.version>
              <junit.version>4.12</junit.version>
              <LocalORM.version>0.0.23</LocalORM.version>
              <maven.tomcat.server>mytomcat</maven.tomcat.server>
              <maven.tomcat.url>http://localhost:8080/WebdevAPP</maven.tomcat.url>
          </properties>
            
          <parent>
        	  <groupId>org.springframework.boot</groupId>
        	  <artifactId>spring-boot-starter-parent</artifactId>
        	  <version>1.3.3.RELEASE</version>
          </parent>
        
          <dependencies>
          	  <!-- Spring Boot Starter dependencies below -->
        	  <dependency>
        	      <groupId>org.springframework.boot</groupId>
        		  <artifactId>spring-boot-starter-web</artifactId>
        	  </dependency>
        	  <dependency>
        		  <groupId>org.springframework.boot</groupId>
        		  <artifactId>spring-boot-starter-tomcat</artifactId>
        		  <scope>provided</scope>		  
        	  </dependency>
        	  <!--  Spring Boot Health -->
        	  <dependency>
        	      <groupId>org.springframework.boot</groupId> 	
                  <artifactId>spring-boot-starter-actuator</artifactId>
              </dependency>            
        	  
        	  <!-- Spring ORM/Oracle/JDBC dependencies below -->
        	  <dependency>
                  <groupId>org.springframework</groupId>
                  <artifactId>spring-jdbc</artifactId>
              </dependency>
              <dependency>
                  <groupId>com.h2database</groupId>
                  <artifactId>h2</artifactId>
              </dependency>             
        	  <dependency>
                  <groupId>org.apache.commons</groupId>
                  <artifactId>commons-dbcp2</artifactId>
                  <version>${apache.commons.version}</version>
              </dependency>	  
        	  <dependency>
        		  <groupId>com.oracle</groupId>
        		  <artifactId>ojdbc7</artifactId>
        		  <version>${oracle.jdbc.version}</version>		  
        	  </dependency> 	
        	  <dependency>
                  <groupId>org.springframework</groupId>
                  <artifactId>spring-orm</artifactId>
                  <version>${spring.orm.version}</version>
              </dependency>
        
               <dependency>
            <groupId>org.springframework.security</groupId>
                <artifactId>spring-security-core</artifactId>
                    <version>4.2.1.RELEASE</version>
                    </dependency>
        
        
              
              <!-- Hibernate dependencies -->
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-entitymanager</artifactId>
                  <version>${hibernate.version}</version>
              </dependency>
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-core</artifactId>
                  <version>${hibernate.version}</version>
              </dependency>   
          	  
          	  <!-- JUNIT testing dependencies below -->
          	  <dependency>
        		  <groupId>junit</groupId>
        		  <artifactId>junit</artifactId>
        		  <version>${junit.version}</version>
        	  </dependency>	  
        	  
        	  <!-- LocalORM Library -->  	
          	  <dependency>
        		  <groupId>edu.xyz.abcd</groupId>
        		  <artifactId>LocalORM</artifactId>
        		  <version>${LocalORM.version}</version>
        		  <type>jar</type>		  
        	  </dependency>
        
          </dependencies>
        
          <build>
          		<finalName>${project.artifactId}</finalName>
                <plugins>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <configuration>
                			<mainClass>edu.xyz.registry.WebdevAPPApp</mainClass>        			
              			</configuration>
                    </plugin> 
                    <plugin>
        				<groupId>org.codehaus.mojo</groupId>
        				<artifactId>tomcat-maven-plugin</artifactId>
        				<configuration>
        					<url>${maven.tomcat.url}</url>
        					<server>${maven.tomcat.server}</server>
        					<path>/${project.artifactId}</path>
        					<update>true</update>        			
        				</configuration>
        			</plugin>                     			
                </plugins>
          </build>
            
          <repositories>
              <repository>
                  <id>spring-releases</id>
                  <url>https://repo.spring.io/libs-release</url>
              </repository>
          </repositories>
            
          <pluginRepositories>
              <pluginRepository>
                  <id>spring-releases</id>
                  <url>https://repo.spring.io/libs-release</url>
              </pluginRepository>
          </pluginRepositories>  
            
        </project>
    Here is the Console related content of my Eclipse.


    Java Code:
    [INFO] Scanning for projects...
        [WARNING] 
        [WARNING] Some problems were encountered while building the effective model for edu.xyz.abcd:WebdevAPP:war:0.0.60
        [WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:tomcat-maven-plugin is missing. @ line 125, column 21
        [WARNING] 
        [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
        [WARNING] 
        [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
        [WARNING] 
        [INFO]                                                                         
        [INFO] ------------------------------------------------------------------------
        [INFO] Building WebdevAPP 0.0.60
        [INFO] ------------------------------------------------------------------------
        [INFO] Downloading: https://repo.spring.io/libs-release/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.pom
        [INFO] Downloading: https://repo.maven.apache.org/maven2/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.pom
        [WARNING] The POM for com.oracle:ojdbc7:jar:12.1.0.1 is missing, no dependency information available
        [INFO] Downloading: https://repo.spring.io/libs-release/edu/xyz/abcd/LocalORM/0.0.23/LocalORM-0.0.23.pom
        [INFO] Downloading: https://repo.maven.apache.org/maven2/edu/xyz/abcd/LocalORM/0.0.23/LocalORM-0.0.23.pom
        [WARNING] The POM for edu.xyz.abcd:LocalORM:jar:0.0.23 is missing, no dependency information available
        [INFO] Downloading: https://repo.spring.io/libs-release/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.jar
        [INFO] Downloading: https://repo.maven.apache.org/maven2/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.jar
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 7.903 s
        [INFO] Finished at: 2017-04-19T21:58:42-05:00
        [INFO] Final Memory: 17M/114M
        [INFO] ------------------------------------------------------------------------
        [ERROR] Failed to execute goal on project WebdevAPP: Could not resolve dependencies for project edu.xyz.abcd:WebdevAPP:war:0.0.60: Could not find artifact com.oracle:ojdbc7:jar:12.1.0.1 in spring-releases (https://repo.spring.io/libs-release) -> [Help 1]
        [ERROR] 
        [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
        [ERROR] Re-run Maven using the -X switch to enable full debug logging.
        [ERROR] 
        [ERROR] For more information about the errors and possible solutions, please read the following articles:
        [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

    I have ojdbc7 jar file at the following location as shown in the screenshot below :

    D:\Users\myusername\.m2\repository\com\oracle\ojdb c7\12.1.0.1


    Getting Build Failure :Failed to execute goal on project WebdevApp-ojdbcjarlocation.png
    Similarly I have my LocalORM related files located in the following directory, not sure why Warning is shown above :

    D:\Users\myusername\.m2\repository\edu\xyz\abcd\Lo calORM\0.0.23

    Java Code:
     LocalORM-0.0.23.jar
        LocalORM-0.0.23.pom.lastUpdated
    This project I imported is via Eclipses' Import-->Git wizard from the github. So, please let me know if git repository doesn't seem like putting all files in correct place etc. Or if there is any alternative approach I can follow. Thanks

  2. #2
    Jack_Tauson_Sr is offline Senior Member
    Join Date
    Nov 2011
    Posts
    165
    Rep Power
    7

    Default Re: Getting Build Failure :Failed to execute goal on project WebdevApp

    Quote Originally Posted by Jack_Tauson_Sr View Post
    I am getting Build Failure while doing maven build in Eclipse Neon.My pom.xml is as follows and error details are mentioned following as well:

    Java Code:
    <project xmlns="http://maven.apache.org/POM/4.0.0" 
        		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
        		xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
          <modelVersion>4.0.0</modelVersion>
          <groupId>edu.xyz.abcd</groupId>
          <artifactId>WebdevAPP</artifactId>
          <version>0.0.60</version>  
          <packaging>war</packaging>
        
          <properties>
              <java.version>1.8</java.version>
              <spring.orm.version>4.2.5.RELEASE</spring.orm.version>
              <hibernate.version>4.3.5.Final</hibernate.version>
              <oracle.jdbc.version>12.1.0.1</oracle.jdbc.version>
              <apache.commons.version>2.1.1</apache.commons.version>
              <junit.version>4.12</junit.version>
              <LocalORM.version>0.0.23</LocalORM.version>
              <maven.tomcat.server>mytomcat</maven.tomcat.server>
              <maven.tomcat.url>http://localhost:8080/WebdevAPP</maven.tomcat.url>
          </properties>
            
          <parent>
        	  <groupId>org.springframework.boot</groupId>
        	  <artifactId>spring-boot-starter-parent</artifactId>
        	  <version>1.3.3.RELEASE</version>
          </parent>
        
          <dependencies>
          	  <!-- Spring Boot Starter dependencies below -->
        	  <dependency>
        	      <groupId>org.springframework.boot</groupId>
        		  <artifactId>spring-boot-starter-web</artifactId>
        	  </dependency>
        	  <dependency>
        		  <groupId>org.springframework.boot</groupId>
        		  <artifactId>spring-boot-starter-tomcat</artifactId>
        		  <scope>provided</scope>		  
        	  </dependency>
        	  <!--  Spring Boot Health -->
        	  <dependency>
        	      <groupId>org.springframework.boot</groupId> 	
                  <artifactId>spring-boot-starter-actuator</artifactId>
              </dependency>            
        	  
        	  <!-- Spring ORM/Oracle/JDBC dependencies below -->
        	  <dependency>
                  <groupId>org.springframework</groupId>
                  <artifactId>spring-jdbc</artifactId>
              </dependency>
              <dependency>
                  <groupId>com.h2database</groupId>
                  <artifactId>h2</artifactId>
              </dependency>             
        	  <dependency>
                  <groupId>org.apache.commons</groupId>
                  <artifactId>commons-dbcp2</artifactId>
                  <version>${apache.commons.version}</version>
              </dependency>	  
        	  <dependency>
        		  <groupId>com.oracle</groupId>
        		  <artifactId>ojdbc7</artifactId>
        		  <version>${oracle.jdbc.version}</version>		  
        	  </dependency> 	
        	  <dependency>
                  <groupId>org.springframework</groupId>
                  <artifactId>spring-orm</artifactId>
                  <version>${spring.orm.version}</version>
              </dependency>
        
               <dependency>
            <groupId>org.springframework.security</groupId>
                <artifactId>spring-security-core</artifactId>
                    <version>4.2.1.RELEASE</version>
                    </dependency>
        
        
              
              <!-- Hibernate dependencies -->
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-entitymanager</artifactId>
                  <version>${hibernate.version}</version>
              </dependency>
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-core</artifactId>
                  <version>${hibernate.version}</version>
              </dependency>   
          	  
          	  <!-- JUNIT testing dependencies below -->
          	  <dependency>
        		  <groupId>junit</groupId>
        		  <artifactId>junit</artifactId>
        		  <version>${junit.version}</version>
        	  </dependency>	  
        	  
        	  <!-- LocalORM Library -->  	
          	  <dependency>
        		  <groupId>edu.xyz.abcd</groupId>
        		  <artifactId>LocalORM</artifactId>
        		  <version>${LocalORM.version}</version>
        		  <type>jar</type>		  
        	  </dependency>
        
          </dependencies>
        
          <build>
          		<finalName>${project.artifactId}</finalName>
                <plugins>
                    <plugin>
                        <groupId>org.springframework.boot</groupId>
                        <artifactId>spring-boot-maven-plugin</artifactId>
                        <configuration>
                			<mainClass>edu.xyz.registry.WebdevAPPApp</mainClass>        			
              			</configuration>
                    </plugin> 
                    <plugin>
        				<groupId>org.codehaus.mojo</groupId>
        				<artifactId>tomcat-maven-plugin</artifactId>
        				<configuration>
        					<url>${maven.tomcat.url}</url>
        					<server>${maven.tomcat.server}</server>
        					<path>/${project.artifactId}</path>
        					<update>true</update>        			
        				</configuration>
        			</plugin>                     			
                </plugins>
          </build>
            
          <repositories>
              <repository>
                  <id>spring-releases</id>
                  <url>https://repo.spring.io/libs-release</url>
              </repository>
          </repositories>
            
          <pluginRepositories>
              <pluginRepository>
                  <id>spring-releases</id>
                  <url>https://repo.spring.io/libs-release</url>
              </pluginRepository>
          </pluginRepositories>  
            
        </project>
    Here is the Console related content of my Eclipse.


    Java Code:
    [INFO] Scanning for projects...
        [WARNING] 
        [WARNING] Some problems were encountered while building the effective model for edu.xyz.abcd:WebdevAPP:war:0.0.60
        [WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:tomcat-maven-plugin is missing. @ line 125, column 21
        [WARNING] 
        [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
        [WARNING] 
        [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
        [WARNING] 
        [INFO]                                                                         
        [INFO] ------------------------------------------------------------------------
        [INFO] Building WebdevAPP 0.0.60
        [INFO] ------------------------------------------------------------------------
        [INFO] Downloading: https://repo.spring.io/libs-release/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.pom
        [INFO] Downloading: https://repo.maven.apache.org/maven2/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.pom
        [WARNING] The POM for com.oracle:ojdbc7:jar:12.1.0.1 is missing, no dependency information available
        [INFO] Downloading: https://repo.spring.io/libs-release/edu/xyz/abcd/LocalORM/0.0.23/LocalORM-0.0.23.pom
        [INFO] Downloading: https://repo.maven.apache.org/maven2/edu/xyz/abcd/LocalORM/0.0.23/LocalORM-0.0.23.pom
        [WARNING] The POM for edu.xyz.abcd:LocalORM:jar:0.0.23 is missing, no dependency information available
        [INFO] Downloading: https://repo.spring.io/libs-release/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.jar
        [INFO] Downloading: https://repo.maven.apache.org/maven2/com/oracle/ojdbc7/12.1.0.1/ojdbc7-12.1.0.1.jar
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 7.903 s
        [INFO] Finished at: 2017-04-19T21:58:42-05:00
        [INFO] Final Memory: 17M/114M
        [INFO] ------------------------------------------------------------------------
        [ERROR] Failed to execute goal on project WebdevAPP: Could not resolve dependencies for project edu.xyz.abcd:WebdevAPP:war:0.0.60: Could not find artifact com.oracle:ojdbc7:jar:12.1.0.1 in spring-releases (https://repo.spring.io/libs-release) -> [Help 1]
        [ERROR] 
        [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
        [ERROR] Re-run Maven using the -X switch to enable full debug logging.
        [ERROR] 
        [ERROR] For more information about the errors and possible solutions, please read the following articles:
        [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

    I have ojdbc7 jar file at the following location as shown in the screenshot below :

    D:\Users\myusername\.m2\repository\com\oracle\ojdb c7\12.1.0.1


    Click image for larger version. 

Name:	ojdbcjarlocation.PNG 
Views:	11 
Size:	5.5 KB 
ID:	7299
    Similarly I have my LocalORM related files located in the following directory, not sure why Warning is shown above :

    D:\Users\myusername\.m2\repository\edu\xyz\abcd\Lo calORM\0.0.23

    Java Code:
     LocalORM-0.0.23.jar
        LocalORM-0.0.23.pom.lastUpdated
    This project I imported is via Eclipses' Import-->Git wizard from the github. So, please let me know if git repository doesn't seem like putting all files in correct place etc. Or if there is any alternative approach I can follow. Thanks
    Not sure why it's only showing half width content only. This site has been behaving weird, not able log in also unless I clear my cache every time.

  3. #3
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    388
    Rep Power
    4

    Default Re: Getting Build Failure :Failed to execute goal on project WebdevApp

    Did you import all dependencies via Maven?

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    25

    Default Re: Getting Build Failure :Failed to execute goal on project WebdevApp

    Quote Originally Posted by benji2505 View Post
    Did you import all dependencies via Maven?
    The answer to that is "no", based on the other thread.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    388
    Rep Power
    4

    Default Re: Getting Build Failure :Failed to execute goal on project WebdevApp

    Ok, I did not see the IntelliJ thread. If I had to single out the best Maven feature, it would be that it organizes all your dependencies for you, making sure they all play nicely with each other.

  6. #6
    Jack_Tauson_Sr is offline Senior Member
    Join Date
    Nov 2011
    Posts
    165
    Rep Power
    7

    Default Re: Getting Build Failure :Failed to execute goal on project WebdevApp

    For those who stumble upon this thread for the same error, I had to install the local dependency using mvn install:install-file from command line.

    Thanks everyone who tried to help me.

  7. #7
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    388
    Rep Power
    4

    Default Re: Getting Build Failure :Failed to execute goal on project WebdevApp

    For what it is worth, here is the solution I use if there is only one, max two external repositories to be integrated.
    How to add external libraries in Maven | Charlie Wu

Similar Threads

  1. Replies: 2
    Last Post: 06-05-2014, 11:06 AM
  2. How to start build a project (using netbeans)
    By rothe in forum New To Java
    Replies: 6
    Last Post: 12-13-2013, 05:58 PM
  3. Replies: 3
    Last Post: 03-16-2012, 10:47 AM
  4. can eclipse use makefile to build the project ?
    By Baseer in forum Advanced Java
    Replies: 1
    Last Post: 03-16-2012, 07:29 AM
  5. How can I change a project's build directory?
    By sylvpan in forum NetBeans
    Replies: 11
    Last Post: 02-03-2011, 06:18 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •