Error executing mvn install spring-boot:run

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Error executing mvn install spring-boot:run

Claudia
Hello, I am trying to connect to my Citrus Simulator interface in the browser located in http://localhost:8080/services/rest/

I have my project configured with Maven and Spring, but when I run the command mvn install spring-boot:run the following error comes out.

[ERROR] Failed to execute goal on project citrus-simulator-sample-jms: Could not resolve dependencies for project com.consol.citrus:citrus-simulator-sample-jms:jar:1.0.1-SNAPSHOT: The following artifacts could not be resolved: com.consol.citrus:citrus-simulator-starter:jar:1.0.1-SNAPSHOT, com.consol.citrus:citrus-simulator-ui:jar:1.0.1-SNAPSHOT: Failure to find com.consol.citrus:citrus-simulator-starter:jar:1.0.1-SNAPSHOT in http://labs.consol.de/maven/snapshots-repository/ was cached in the local repository, resolution will not be reattempted until the update interval of consol-labs-snapshots has elapsed or updates are forced

This is my pom.xml. Is there any dependency missing?

<?xml version="1.0" encoding="UTF-8"?>
<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>

  <parent>
    <groupId>com.consol.citrus</groupId>
    <artifactId>citrus-simulator-samples</artifactId>
    <version>1.0.1-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <artifactId>citrus-simulator-sample-jms</artifactId>
  <name>${project.artifactId}</name>

  <properties>
    <activemq.version>5.15.0</activemq.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-dependencies</artifactId>
        <version>${spring.boot.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
    </dependency>

   
    <dependency>
      <groupId>com.consol.citrus</groupId>
      <artifactId>citrus-simulator-starter</artifactId>
    </dependency>
    <dependency>
      <groupId>com.consol.citrus</groupId>
      <artifactId>citrus-simulator-ui</artifactId>
    </dependency>

   
    <dependency>
      <groupId>com.consol.citrus</groupId>
      <artifactId>citrus-jms</artifactId>
    </dependency>

    <dependency>
      <groupId>org.testng</groupId>
      <artifactId>testng</artifactId>
      <scope>test</scope>
    </dependency>

   
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-broker</artifactId>
      <version>${activemq.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.activemq</groupId>
      <artifactId>activemq-spring</artifactId>
      <version>${activemq.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.xbean</groupId>
      <artifactId>xbean-spring</artifactId>
      <version>4.4</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-failsafe-plugin</artifactId>
        <executions>
          <execution>
            <id>integration-tests</id>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <failOnMissingWebXml>false</failOnMissingWebXml>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.activemq.tooling</groupId>
        <artifactId>activemq-maven-plugin</artifactId>
        <version>${activemq.version}</version>
        <configuration>
          <fork>false</fork>
          <systemProperties>
            <property>
              <name>log4j.configuration</name>
              <value>log4j.properties</value>
            </property>
          </systemProperties>
        </configuration>
        <executions>
          <execution>
            <id>start-activemq</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>run</goal>
            </goals>
            <configuration>
              <fork>true</fork>
            </configuration>
          </execution>
          <execution>
            <id>stop-activemq</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>stop</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-maven-plugin</artifactId>
        <configuration>
          <fork>true</fork>
          <wait>1000</wait>
          <maxAttempts>180</maxAttempts>
        </configuration>
        <executions>
          <execution>
            <id>pre-integration-test</id>
            <goals>
              <goal>start</goal>
            </goals>
            <configuration>
              <fork>true</fork>
              <wait>1000</wait>
              <maxAttempts>180</maxAttempts>
            </configuration>
          </execution>
          <execution>
            <id>post-integration-test</id>
            <goals>
              <goal>stop</goal>
            </goals>
            <configuration>
              <fork>true</fork>
            </configuration>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

</project>

Thanks too much
Reply | Threaded
Open this post in threaded view
|

Re: Error executing mvn install spring-boot:run

Christoph Deppisch
Administrator
Hi Claudia,

this is because you use the latest SNAPSHOT version 1.0.1-SNAPSHOT in your project. This version is not released at the moment so Maven can not download it.

Two options for you:

1) Use 1.0.0 final version in your pom.xml
2) Download/clone github repository https://github.com/christophd/citrus-simulator and call `mvn clean install` locally in that project. Then you have built the citrus-simulator SNAPSHOT version on your own for local usage.

I will also see if I can add a nightly SNAPSHOT release for the simulator project. That would enable you to use the SNAPSHOT without any additional steps. Thank you for pointing to that.
Reply | Threaded
Open this post in threaded view
|

Re: Error executing mvn install spring-boot:run

Claudia

Hi Christoph,
I changed the SNAPSHOT version for 1.0.0 as you suggested and now it shows another error when running mvn install spring-boot:run. I'm getting:
[ERROR] Failed to execute goal org.apache.activemq.tooling:activemq-maven-plugin:5.15.0:run (start-activemq) on project citrus-simulator-sample-jms: Failed to start the ActiveMQ Broker: Failed to bind to server socket: tcp://localhost:61616 due to: java.net.BindException: Address already in use: JVM_Bind -  
Reply | Threaded
Open this post in threaded view
|

Re: Error executing mvn install spring-boot:run

Christoph Deppisch
Administrator
You need to separate compile and building from spring-boot run command. please use

mvn install

if this is completed with success then call

mvn spring-boot:run

In case you are using a JMS sample simulator you need some ActiveMQ message broker, too started on your local machine. You can call the following command in another terminal session.

mvn activemq:run