Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-8554

[fiware-stackoverflow] Fiware cygnus build failure

    Details

      Description

      Created question in FIWARE Q/A platform on 18-04-2017 at 00:04
      Please, ANSWER this question AT http://stackoverflow.com/questions/43460906/fiware-cygnus-build-failure

      Question:
      Fiware cygnus build failure

      Description:
      I wanted to use Fiware cygnus to persist data from the context broker into a CKAN instance. I've already created an orion context broker vm which is orion-psb-image-R5.4 version 1.7.0 and a ckan VM on Fiware cloud. I began to install fiware cygnus knowing that the cygnus is based on both cygnus-common and cygnus-ngsi . So, i started by downloading the fiware-cygnus https://github.com/telefonicaid/fiware-cygnus
      , then i began building cygnus-common successfully using maven 3.2.5 . But when i started to build cygnus-ngsi it failed although i've tried many ways to solve this but Noone worked .
      Here's what i have done in details .

      Firstly installing Apache Flume as described here http://fiware-cygnus.readthedocs.io/en/1.3.0/cygnus-common/installation_and_administration_guide/install_from_sources/index.html

      $ wget http://www.eu.apache.org/dist/flume/1.4.0/apache-flume-1.4.0-bin.tar.gz
      tar xvzf apache-flume-1.4.0-bin.tar.gz
      $ mv apache-flume-1.4.0-bin APACHE_FLUME_HOME
      $ mv APACHE_FLUME_HOME/lib/httpclient-4.2.1.jar APACHE_FLUME_HOME/lib/httpclient-4.2.1.jar.old
      $ mv APACHE_FLUME_HOME/lib/httpcore-4.2.1.jar APACHE_FLUME_HOME/lib/httpcore-4.2.1.jar.old
      $ mv APACHE_FLUME_HOME/lib/libthrift-0.7.0.jar APACHE_FLUME_HOME/lib/libthrift-0.7.0.jar.old
      $ mkdir -p APACHE_FLUME_HOME/plugins.d/cygnus/
      $ mkdir APACHE_FLUME_HOME/plugins.d/cygnus/lib
      $ mkdir APACHE_FLUME_HOME/plugins.d/cygnus/libext

      secondly , downloading fiware-cygnus and building cygnus-common:

      git clone https://github.com/telefonicaid/fiware-cygnus.git

      cd fiware-cygnus/cygnus-common

      mvn clean compile exec:exec assembly:single

      cp target/cygnus-common-1.1.0-jar-with-dependencies.jar /usr/cygnus/plugins.d/cygnus/libext

      mvn install:install-file -

      Dfile=/usr/cygnus/plugins.d/cygnus/libext/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar -DgroupId=com.telefonica.iot -DartifactId=cygnus-common -Dversion=1.7.0 -Dpackaging=jar -DgeneratePom=false

      cp target/classes/cygnus-flume-ng /usr/cygnus/bin/cygnus-flume-ng

      then i started bulding cygnus-ngsi as follows

      cd cygnus-ngsi

      mvn clean compile exec:exec assembly:single

      and i got these results on building it:

      [INFO] Building cygnus-ngsi 1.7.0_SNAPSHOT
      [INFO] ------------------------------------------------------------------------
      [WARNING] The POM for com.telefonica.iot:cygnus-common:jar:1.7.0_SNAPSHOT is missing, no dependency information available
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 1.243 s
      [INFO] Finished at: 2017-04-17T22:04:25+00:00
      [INFO] Final Memory: 7M/28M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal on project cygnus-ngsi: Could not resolve dependencies for project com.telefonica.iot:cygnus-ngsi:jar:1.7.0_SNAPSHOT: Could not find artifact com.telefonica.iot:cygnus-common:jar:1.7.0_SNAPSHOT -> [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 copied the generated jar file to the /usr/cygnus/plugins.d/cygnus/libext as explained in the same link above by running:

      cp cygnus-common/target/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar /usr/cygnus/plugins.d/cygnus/libext

      although i have also copied the jar file to maven repository path to make sure everything is set properly by running the command

      cp cygnus-common/target/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar ~/.m2/repository/com/telefonica/iot/cygnus-common/1.7.0

      Now i have in the ~/.m2/repository/com/telefonica/iot/cygnus-common/1.7.0 directory two jars, the cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar and cygnus-common-1.7.0.jar as well as the usr/cygnus/plugins.d/cygnus/libext directory containing them and actually i don't know whether the existence of two jars inside either of these directories would make a problem or not.

      i also thought that the cygnus-ngsi pom.xml file could be a part of the problem .. and here's the pom.xml of cygnus-ngsi:

      <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>com.telefonica.iot</groupId>
      <artifactId>cygnus-ngsi</artifactId>
      <version>1.7.0_SNAPSHOT</version>
      <packaging>jar</packaging>

      <name>cygnus-ngsi</name>
      <url>http://maven.apache.org&lt;/url&gt;

      <properties>
      <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      </properties>

      <dependencies>
      <!-- Required for testing -->
      <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-all</artifactId>
      <version>1.9.5</version>
      <scope>test</scope>
      </dependency>
      <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
      </dependency>
      <!-- Required by NGSIRestHandler -->
      <dependency>
      <groupId>org.apache.httpcomponents</groupId>
      <artifactId>httpcore</artifactId>
      <version>4.3.1</version>
      </dependency>
      <!-- Required for logging -->
      <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.17</version>
      </dependency>
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
      <version>1.7.21</version>
      </dependency>
      <!-- Required by NameMapper -->
      <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-lang3</artifactId>
      <version>3.4</version>
      </dependency>
      <!-- Required by any agent -->
      <dependency>
      <groupId>com.telefonica.iot</groupId>
      <artifactId>cygnus-common</artifactId>
      <version>1.7.0_SNAPSHOT</version>
      </dependency>
      </dependencies>

      <build>
      <!-- reference: http://stackoverflow.com/questions/3697449/retrieve-version-from-maven-pom-xml-in-code -->
      <resources>
      <resource>
      <directory>src/main/resources</directory>
      <filtering>true</filtering>
      </resource>
      </resources>
      <pluginManagement>
      <plugins>
      <!-- Explicit Java version declaration in needed in some systems in which Maven seems not -->
      <!-- being able to find itself the right version. Many systems don't need this declaration -->
      <!-- but it doesn't use to hurt anyway -->
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version>3.5.1</version>
      <configuration>
      <source>1.7</source>
      <target>1.7</target>
      <compilerArgument></compilerArgument>
      <fork>true</fork>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-assembly-plugin</artifactId>
      <version>2.6</version>
      <configuration>
      <descriptorRefs>
      <descriptorRef>jar-with-dependencies</descriptorRef>
      </descriptorRefs>
      </configuration>
      </plugin>
      <!-- http://www.chrissearle.org/2009/09/05/Using_maven-exec-plugin_to_store_the_current_git_sha_in_a_build/ -->
      <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>exec-maven-plugin</artifactId>
      <version>1.5.0</version>
      <executions>
      <execution>
      <phase>compile</phase>
      <goals>
      <goal>exec</goal>
      </goals>
      </execution>
      </executions>
      <configuration>
      <executable>git</executable>
      <arguments>
      <argument>rev-parse</argument>
      <argument>HEAD</argument>
      </arguments>
      <outputFile>target/classes/last_git_commit.txt</outputFile>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-site-plugin</artifactId>
      <version>3.5.1</version>
      <configuration>
      <reportPlugins>
      <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>cobertura-maven-plugin</artifactId>
      <version>2.6</version>
      <configuration>
      <aggregate>true</aggregate>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-surefire-report-plugin</artifactId>
      <version>2.16</version>
      <configuration>
      <aggregate>true</aggregate>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-checkstyle-plugin</artifactId>
      <version>2.12</version>
      <configuration>
      <configLocation>telefonica_checkstyle.xml</configLocation>
      <includeTestSourceDirectory>false</includeTestSourceDirectory>
      <failOnViolation>false</failOnViolation>
      </configuration>
      </plugin>
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-javadoc-plugin</artifactId>
      <version>2.9</version>
      <configuration>
      <aggregate>true</aggregate>
      </configuration>
      </plugin>
      </reportPlugins>
      </configuration>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>
      </project>

      Now i want to know what may cause this failure . All i want to do is to set a cygnus agent to use the ckansink by configuring the agent_.conf file with providing the necessary ckan parameters and then start the cygnus. and i know the this process wouldn't be completed unless the cygnus-ngsi was built successfuly

        Activity

        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        backlogmanager Backlog Manager made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        fla Fernando Lopez made changes -
        Assignee Francisco Romero [ frb ]
        fla Fernando Lopez made changes -
        HD-Enabler Cosmos [ 10872 ]
        Description
        Created question in FIWARE Q/A platform on 18-04-2017 at 00:04
        {color: red}Please, ANSWER this question AT{color} http://stackoverflow.com/questions/43460906/fiware-cygnus-build-failure


        +Question:+
        Fiware cygnus build failure

        +Description:+
        I wanted to use Fiware cygnus to persist data from the context broker into a CKAN instance. I've already created an orion context broker vm which is orion-psb-image-R5.4 version 1.7.0 and a ckan VM on Fiware cloud. I began to install fiware cygnus knowing that the cygnus is based on both cygnus-common and cygnus-ngsi . So, i started by downloading the fiware-cygnus https://github.com/telefonicaid/fiware-cygnus
        , then i began building cygnus-common successfully using maven 3.2.5 . But when i started to build cygnus-ngsi it failed although i've tried many ways to solve this but Noone worked .
        Here's what i have done in details .

        Firstly installing Apache Flume as described here http://fiware-cygnus.readthedocs.io/en/1.3.0/cygnus-common/installation_and_administration_guide/install_from_sources/index.html

        $ wget http://www.eu.apache.org/dist/flume/1.4.0/apache-flume-1.4.0-bin.tar.gz
         tar xvzf apache-flume-1.4.0-bin.tar.gz
        $ mv apache-flume-1.4.0-bin APACHE_FLUME_HOME
        $ mv APACHE_FLUME_HOME/lib/httpclient-4.2.1.jar APACHE_FLUME_HOME/lib/httpclient-4.2.1.jar.old
        $ mv APACHE_FLUME_HOME/lib/httpcore-4.2.1.jar APACHE_FLUME_HOME/lib/httpcore-4.2.1.jar.old
        $ mv APACHE_FLUME_HOME/lib/libthrift-0.7.0.jar APACHE_FLUME_HOME/lib/libthrift-0.7.0.jar.old
        $ mkdir -p APACHE_FLUME_HOME/plugins.d/cygnus/
        $ mkdir APACHE_FLUME_HOME/plugins.d/cygnus/lib
        $ mkdir APACHE_FLUME_HOME/plugins.d/cygnus/libext


        secondly , downloading fiware-cygnus and building cygnus-common:

        git clone https://github.com/telefonicaid/fiware-cygnus.git

        cd fiware-cygnus/cygnus-common

        mvn clean compile exec:exec assembly:single

        cp target/cygnus-common-1.1.0-jar-with-dependencies.jar /usr/cygnus/plugins.d/cygnus/libext

        mvn install:install-file -

        Dfile=/usr/cygnus/plugins.d/cygnus/libext/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar -DgroupId=com.telefonica.iot -DartifactId=cygnus-common -Dversion=1.7.0 -Dpackaging=jar -DgeneratePom=false

        cp target/classes/cygnus-flume-ng /usr/cygnus/bin/cygnus-flume-ng


        then i started bulding cygnus-ngsi as follows

        cd cygnus-ngsi

        mvn clean compile exec:exec assembly:single


        and i got these results on building it:

        [INFO] Building cygnus-ngsi 1.7.0_SNAPSHOT
        [INFO] ------------------------------------------------------------------------
        [WARNING] The POM for com.telefonica.iot:cygnus-common:jar:1.7.0_SNAPSHOT is missing, no dependency information available
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 1.243 s
        [INFO] Finished at: 2017-04-17T22:04:25+00:00
        [INFO] Final Memory: 7M/28M
        [INFO] ------------------------------------------------------------------------
        [ERROR] Failed to execute goal on project cygnus-ngsi: Could not resolve dependencies for project com.telefonica.iot:cygnus-ngsi:jar:1.7.0_SNAPSHOT: Could not find artifact com.telefonica.iot:cygnus-common:jar:1.7.0_SNAPSHOT -&gt; [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 copied the generated jar file to the /usr/cygnus/plugins.d/cygnus/libext as explained in the same link above by running:

        cp cygnus-common/target/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar /usr/cygnus/plugins.d/cygnus/libext


        although i have also copied the jar file to maven repository path to make sure everything is set properly by running the command

        cp cygnus-common/target/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar ~/.m2/repository/com/telefonica/iot/cygnus-common/1.7.0


        Now i have in the ~/.m2/repository/com/telefonica/iot/cygnus-common/1.7.0 directory two jars, the cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar and cygnus-common-1.7.0.jar as well as the usr/cygnus/plugins.d/cygnus/libext directory containing them and actually i don't know whether the existence of two jars inside either of these directories would make a problem or not.

        i also thought that the cygnus-ngsi pom.xml file could be a part of the problem .. and here's the pom.xml of cygnus-ngsi:

            &lt;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"&gt;
            &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

            &lt;groupId&gt;com.telefonica.iot&lt;/groupId&gt;
            &lt;artifactId&gt;cygnus-ngsi&lt;/artifactId&gt;
            &lt;version&gt;1.7.0_SNAPSHOT&lt;/version&gt;
            &lt;packaging&gt;jar&lt;/packaging&gt;

            &lt;name&gt;cygnus-ngsi&lt;/name&gt;
            &lt;url&gt;http://maven.apache.org&lt;/url>

            &lt;properties&gt;
                &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
            &lt;/properties&gt;

            &lt;dependencies&gt;
                &lt;!-- Required for testing --&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;org.mockito&lt;/groupId&gt;
                    &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
                    &lt;version&gt;1.9.5&lt;/version&gt;
                    &lt;scope&gt;test&lt;/scope&gt;
                &lt;/dependency&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;junit&lt;/groupId&gt;
                    &lt;artifactId&gt;junit&lt;/artifactId&gt;
                    &lt;version&gt;4.11&lt;/version&gt;
                    &lt;scope&gt;test&lt;/scope&gt;
                &lt;/dependency&gt;
                &lt;!-- Required by NGSIRestHandler --&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
                    &lt;artifactId&gt;httpcore&lt;/artifactId&gt;
                    &lt;version&gt;4.3.1&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;!-- Required for logging --&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;log4j&lt;/groupId&gt;
                    &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                    &lt;version&gt;1.2.17&lt;/version&gt;
           &lt;/dependency&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                    &lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;
                    &lt;version&gt;1.7.21&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;!-- Required by NameMapper --&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
                    &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
                    &lt;version&gt;3.4&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;!-- Required by any agent --&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;com.telefonica.iot&lt;/groupId&gt;
                    &lt;artifactId&gt;cygnus-common&lt;/artifactId&gt;
                    &lt;version&gt;1.7.0_SNAPSHOT&lt;/version&gt;
                &lt;/dependency&gt;
            &lt;/dependencies&gt;

            &lt;build&gt;
                &lt;!-- reference: http://stackoverflow.com/questions/3697449/retrieve-version-from-maven-pom-xml-in-code --&gt;
                &lt;resources&gt;
                    &lt;resource&gt;
                        &lt;directory&gt;src/main/resources&lt;/directory&gt;
                        &lt;filtering&gt;true&lt;/filtering&gt;
                    &lt;/resource&gt;
                &lt;/resources&gt;
                &lt;pluginManagement&gt;
                    &lt;plugins&gt;
                        &lt;!-- Explicit Java version declaration in needed in some systems in which Maven seems not --&gt;
                        &lt;!-- being able to find itself the right version. Many systems don't need this declaration --&gt;
                        &lt;!-- but it doesn't use to hurt anyway --&gt;
                        &lt;plugin&gt;
                            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                            &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                            &lt;version&gt;3.5.1&lt;/version&gt;
                            &lt;configuration&gt;
                                &lt;source&gt;1.7&lt;/source&gt;
                                &lt;target&gt;1.7&lt;/target&gt;
                                &lt;compilerArgument&gt;&lt;/compilerArgument&gt;
         &lt;fork&gt;true&lt;/fork&gt;
                            &lt;/configuration&gt;
                        &lt;/plugin&gt;
                        &lt;plugin&gt;
                            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                            &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                            &lt;version&gt;2.6&lt;/version&gt;
                            &lt;configuration&gt;
                                &lt;descriptorRefs&gt;
                                    &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                                &lt;/descriptorRefs&gt;
                            &lt;/configuration&gt;
                        &lt;/plugin&gt;
                        &lt;!-- http://www.chrissearle.org/2009/09/05/Using_maven-exec-plugin_to_store_the_current_git_sha_in_a_build/ --&gt;
                        &lt;plugin&gt;
                            &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                            &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
                            &lt;version&gt;1.5.0&lt;/version&gt;
                            &lt;executions&gt;
                                &lt;execution&gt;
                                    &lt;phase&gt;compile&lt;/phase&gt;
                                    &lt;goals&gt;
                                        &lt;goal&gt;exec&lt;/goal&gt;
                                    &lt;/goals&gt;
                                &lt;/execution&gt;
                            &lt;/executions&gt;
                            &lt;configuration&gt;
                                &lt;executable&gt;git&lt;/executable&gt;
                                &lt;arguments&gt;
                                    &lt;argument&gt;rev-parse&lt;/argument&gt;
                                    &lt;argument&gt;HEAD&lt;/argument&gt;
                                &lt;/arguments&gt;
                                &lt;outputFile&gt;target/classes/last_git_commit.txt&lt;/outputFile&gt;
                            &lt;/configuration&gt;
                        &lt;/plugin&gt;
           &lt;plugin&gt;
                            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                            &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
                            &lt;version&gt;3.5.1&lt;/version&gt;
                            &lt;configuration&gt;
                                &lt;reportPlugins&gt;
                                    &lt;plugin&gt;
                                        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                                        &lt;artifactId&gt;cobertura-maven-plugin&lt;/artifactId&gt;
                                        &lt;version&gt;2.6&lt;/version&gt;
                                        &lt;configuration&gt;
                                            &lt;aggregate&gt;true&lt;/aggregate&gt;
                                        &lt;/configuration&gt;
                                    &lt;/plugin&gt;
                                    &lt;plugin&gt;
                                        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                                        &lt;artifactId&gt;maven-surefire-report-plugin&lt;/artifactId&gt;
                                        &lt;version&gt;2.16&lt;/version&gt;
                                        &lt;configuration&gt;
                                            &lt;aggregate&gt;true&lt;/aggregate&gt;
                                        &lt;/configuration&gt;
                                    &lt;/plugin&gt;
                                    &lt;plugin&gt;
                                        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                                        &lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;
                                        &lt;version&gt;2.12&lt;/version&gt;
                                        &lt;configuration&gt;
                                            &lt;configLocation&gt;telefonica_checkstyle.xml&lt;/configLocation&gt;
                                            &lt;includeTestSourceDirectory&gt;false&lt;/includeTestSourceDirectory&gt;
                                            &lt;failOnViolation&gt;false&lt;/failOnViolation&gt;
                                        &lt;/configuration&gt;
                                    &lt;/plugin&gt;
                                    &lt;plugin&gt;
                                        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                                        &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
         &lt;version&gt;2.9&lt;/version&gt;
                                        &lt;configuration&gt;
                                            &lt;aggregate&gt;true&lt;/aggregate&gt;
                                        &lt;/configuration&gt;
                                    &lt;/plugin&gt;
                                &lt;/reportPlugins&gt;
                            &lt;/configuration&gt;
                        &lt;/plugin&gt;
                    &lt;/plugins&gt;
                &lt;/pluginManagement&gt;
            &lt;/build&gt;
        &lt;/project&gt;


        Now i want to know what may cause this failure . All i want to do is to set a cygnus agent to use the ckansink by configuring the agent_.conf file with providing the necessary ckan parameters and then start the cygnus. and i know the this process wouldn't be completed unless the cygnus-ngsi was built successfuly
        Created question in FIWARE Q/A platform on 18-04-2017 at 00:04
        {color: red}Please, ANSWER this question AT{color} http://stackoverflow.com/questions/43460906/fiware-cygnus-build-failure


        +Question:+
        Fiware cygnus build failure

        +Description:+
        I wanted to use Fiware cygnus to persist data from the context broker into a CKAN instance. I've already created an orion context broker vm which is orion-psb-image-R5.4 version 1.7.0 and a ckan VM on Fiware cloud. I began to install fiware cygnus knowing that the cygnus is based on both cygnus-common and cygnus-ngsi . So, i started by downloading the fiware-cygnus https://github.com/telefonicaid/fiware-cygnus
        , then i began building cygnus-common successfully using maven 3.2.5 . But when i started to build cygnus-ngsi it failed although i've tried many ways to solve this but Noone worked .
        Here's what i have done in details .

        Firstly installing Apache Flume as described here http://fiware-cygnus.readthedocs.io/en/1.3.0/cygnus-common/installation_and_administration_guide/install_from_sources/index.html

        $ wget http://www.eu.apache.org/dist/flume/1.4.0/apache-flume-1.4.0-bin.tar.gz
         tar xvzf apache-flume-1.4.0-bin.tar.gz
        $ mv apache-flume-1.4.0-bin APACHE_FLUME_HOME
        $ mv APACHE_FLUME_HOME/lib/httpclient-4.2.1.jar APACHE_FLUME_HOME/lib/httpclient-4.2.1.jar.old
        $ mv APACHE_FLUME_HOME/lib/httpcore-4.2.1.jar APACHE_FLUME_HOME/lib/httpcore-4.2.1.jar.old
        $ mv APACHE_FLUME_HOME/lib/libthrift-0.7.0.jar APACHE_FLUME_HOME/lib/libthrift-0.7.0.jar.old
        $ mkdir -p APACHE_FLUME_HOME/plugins.d/cygnus/
        $ mkdir APACHE_FLUME_HOME/plugins.d/cygnus/lib
        $ mkdir APACHE_FLUME_HOME/plugins.d/cygnus/libext


        secondly , downloading fiware-cygnus and building cygnus-common:

        git clone https://github.com/telefonicaid/fiware-cygnus.git

        cd fiware-cygnus/cygnus-common

        mvn clean compile exec:exec assembly:single

        cp target/cygnus-common-1.1.0-jar-with-dependencies.jar /usr/cygnus/plugins.d/cygnus/libext

        mvn install:install-file -

        Dfile=/usr/cygnus/plugins.d/cygnus/libext/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar -DgroupId=com.telefonica.iot -DartifactId=cygnus-common -Dversion=1.7.0 -Dpackaging=jar -DgeneratePom=false

        cp target/classes/cygnus-flume-ng /usr/cygnus/bin/cygnus-flume-ng


        then i started bulding cygnus-ngsi as follows

        cd cygnus-ngsi

        mvn clean compile exec:exec assembly:single


        and i got these results on building it:

        [INFO] Building cygnus-ngsi 1.7.0_SNAPSHOT
        [INFO] ------------------------------------------------------------------------
        [WARNING] The POM for com.telefonica.iot:cygnus-common:jar:1.7.0_SNAPSHOT is missing, no dependency information available
        [INFO] ------------------------------------------------------------------------
        [INFO] BUILD FAILURE
        [INFO] ------------------------------------------------------------------------
        [INFO] Total time: 1.243 s
        [INFO] Finished at: 2017-04-17T22:04:25+00:00
        [INFO] Final Memory: 7M/28M
        [INFO] ------------------------------------------------------------------------
        [ERROR] Failed to execute goal on project cygnus-ngsi: Could not resolve dependencies for project com.telefonica.iot:cygnus-ngsi:jar:1.7.0_SNAPSHOT: Could not find artifact com.telefonica.iot:cygnus-common:jar:1.7.0_SNAPSHOT -&gt; [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 copied the generated jar file to the /usr/cygnus/plugins.d/cygnus/libext as explained in the same link above by running:

        cp cygnus-common/target/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar /usr/cygnus/plugins.d/cygnus/libext


        although i have also copied the jar file to maven repository path to make sure everything is set properly by running the command

        cp cygnus-common/target/cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar ~/.m2/repository/com/telefonica/iot/cygnus-common/1.7.0


        Now i have in the ~/.m2/repository/com/telefonica/iot/cygnus-common/1.7.0 directory two jars, the cygnus-common-1.7.0_SNAPSHOT-jar-with-dependencies.jar and cygnus-common-1.7.0.jar as well as the usr/cygnus/plugins.d/cygnus/libext directory containing them and actually i don't know whether the existence of two jars inside either of these directories would make a problem or not.

        i also thought that the cygnus-ngsi pom.xml file could be a part of the problem .. and here's the pom.xml of cygnus-ngsi:

            &lt;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"&gt;
            &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;

            &lt;groupId&gt;com.telefonica.iot&lt;/groupId&gt;
            &lt;artifactId&gt;cygnus-ngsi&lt;/artifactId&gt;
            &lt;version&gt;1.7.0_SNAPSHOT&lt;/version&gt;
            &lt;packaging&gt;jar&lt;/packaging&gt;

            &lt;name&gt;cygnus-ngsi&lt;/name&gt;
            &lt;url&gt;http://maven.apache.org&lt;/url>

            &lt;properties&gt;
                &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
            &lt;/properties&gt;

            &lt;dependencies&gt;
                &lt;!-- Required for testing --&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;org.mockito&lt;/groupId&gt;
                    &lt;artifactId&gt;mockito-all&lt;/artifactId&gt;
                    &lt;version&gt;1.9.5&lt;/version&gt;
                    &lt;scope&gt;test&lt;/scope&gt;
                &lt;/dependency&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;junit&lt;/groupId&gt;
                    &lt;artifactId&gt;junit&lt;/artifactId&gt;
                    &lt;version&gt;4.11&lt;/version&gt;
                    &lt;scope&gt;test&lt;/scope&gt;
                &lt;/dependency&gt;
                &lt;!-- Required by NGSIRestHandler --&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;org.apache.httpcomponents&lt;/groupId&gt;
                    &lt;artifactId&gt;httpcore&lt;/artifactId&gt;
                    &lt;version&gt;4.3.1&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;!-- Required for logging --&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;log4j&lt;/groupId&gt;
                    &lt;artifactId&gt;log4j&lt;/artifactId&gt;
                    &lt;version&gt;1.2.17&lt;/version&gt;
           &lt;/dependency&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;org.slf4j&lt;/groupId&gt;
                    &lt;artifactId&gt;slf4j-simple&lt;/artifactId&gt;
                    &lt;version&gt;1.7.21&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;!-- Required by NameMapper --&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
                    &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
                    &lt;version&gt;3.4&lt;/version&gt;
                &lt;/dependency&gt;
                &lt;!-- Required by any agent --&gt;
                &lt;dependency&gt;
                    &lt;groupId&gt;com.telefonica.iot&lt;/groupId&gt;
                    &lt;artifactId&gt;cygnus-common&lt;/artifactId&gt;
                    &lt;version&gt;1.7.0_SNAPSHOT&lt;/version&gt;
                &lt;/dependency&gt;
            &lt;/dependencies&gt;

            &lt;build&gt;
                &lt;!-- reference: http://stackoverflow.com/questions/3697449/retrieve-version-from-maven-pom-xml-in-code --&gt;
                &lt;resources&gt;
                    &lt;resource&gt;
                        &lt;directory&gt;src/main/resources&lt;/directory&gt;
                        &lt;filtering&gt;true&lt;/filtering&gt;
                    &lt;/resource&gt;
                &lt;/resources&gt;
                &lt;pluginManagement&gt;
                    &lt;plugins&gt;
                        &lt;!-- Explicit Java version declaration in needed in some systems in which Maven seems not --&gt;
                        &lt;!-- being able to find itself the right version. Many systems don't need this declaration --&gt;
                        &lt;!-- but it doesn't use to hurt anyway --&gt;
                        &lt;plugin&gt;
                            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                            &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                            &lt;version&gt;3.5.1&lt;/version&gt;
                            &lt;configuration&gt;
                                &lt;source&gt;1.7&lt;/source&gt;
                                &lt;target&gt;1.7&lt;/target&gt;
                                &lt;compilerArgument&gt;&lt;/compilerArgument&gt;
         &lt;fork&gt;true&lt;/fork&gt;
                            &lt;/configuration&gt;
                        &lt;/plugin&gt;
                        &lt;plugin&gt;
                            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                            &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt;
                            &lt;version&gt;2.6&lt;/version&gt;
                            &lt;configuration&gt;
                                &lt;descriptorRefs&gt;
                                    &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt;
                                &lt;/descriptorRefs&gt;
                            &lt;/configuration&gt;
                        &lt;/plugin&gt;
                        &lt;!-- http://www.chrissearle.org/2009/09/05/Using_maven-exec-plugin_to_store_the_current_git_sha_in_a_build/ --&gt;
                        &lt;plugin&gt;
                            &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                            &lt;artifactId&gt;exec-maven-plugin&lt;/artifactId&gt;
                            &lt;version&gt;1.5.0&lt;/version&gt;
                            &lt;executions&gt;
                                &lt;execution&gt;
                                    &lt;phase&gt;compile&lt;/phase&gt;
                                    &lt;goals&gt;
                                        &lt;goal&gt;exec&lt;/goal&gt;
                                    &lt;/goals&gt;
                                &lt;/execution&gt;
                            &lt;/executions&gt;
                            &lt;configuration&gt;
                                &lt;executable&gt;git&lt;/executable&gt;
                                &lt;arguments&gt;
                                    &lt;argument&gt;rev-parse&lt;/argument&gt;
                                    &lt;argument&gt;HEAD&lt;/argument&gt;
                                &lt;/arguments&gt;
                                &lt;outputFile&gt;target/classes/last_git_commit.txt&lt;/outputFile&gt;
                            &lt;/configuration&gt;
                        &lt;/plugin&gt;
           &lt;plugin&gt;
                            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                            &lt;artifactId&gt;maven-site-plugin&lt;/artifactId&gt;
                            &lt;version&gt;3.5.1&lt;/version&gt;
                            &lt;configuration&gt;
                                &lt;reportPlugins&gt;
                                    &lt;plugin&gt;
                                        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                                        &lt;artifactId&gt;cobertura-maven-plugin&lt;/artifactId&gt;
                                        &lt;version&gt;2.6&lt;/version&gt;
                                        &lt;configuration&gt;
                                            &lt;aggregate&gt;true&lt;/aggregate&gt;
                                        &lt;/configuration&gt;
                                    &lt;/plugin&gt;
                                    &lt;plugin&gt;
                                        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                                        &lt;artifactId&gt;maven-surefire-report-plugin&lt;/artifactId&gt;
                                        &lt;version&gt;2.16&lt;/version&gt;
                                        &lt;configuration&gt;
                                            &lt;aggregate&gt;true&lt;/aggregate&gt;
                                        &lt;/configuration&gt;
                                    &lt;/plugin&gt;
                                    &lt;plugin&gt;
                                        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                                        &lt;artifactId&gt;maven-checkstyle-plugin&lt;/artifactId&gt;
                                        &lt;version&gt;2.12&lt;/version&gt;
                                        &lt;configuration&gt;
                                            &lt;configLocation&gt;telefonica_checkstyle.xml&lt;/configLocation&gt;
                                            &lt;includeTestSourceDirectory&gt;false&lt;/includeTestSourceDirectory&gt;
                                            &lt;failOnViolation&gt;false&lt;/failOnViolation&gt;
                                        &lt;/configuration&gt;
                                    &lt;/plugin&gt;
                                    &lt;plugin&gt;
                                        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                                        &lt;artifactId&gt;maven-javadoc-plugin&lt;/artifactId&gt;
         &lt;version&gt;2.9&lt;/version&gt;
                                        &lt;configuration&gt;
                                            &lt;aggregate&gt;true&lt;/aggregate&gt;
                                        &lt;/configuration&gt;
                                    &lt;/plugin&gt;
                                &lt;/reportPlugins&gt;
                            &lt;/configuration&gt;
                        &lt;/plugin&gt;
                    &lt;/plugins&gt;
                &lt;/pluginManagement&gt;
            &lt;/build&gt;
        &lt;/project&gt;


        Now i want to know what may cause this failure . All i want to do is to set a cygnus agent to use the ckansink by configuring the agent_.conf file with providing the necessary ckan parameters and then start the cygnus. and i know the this process wouldn't be completed unless the cygnus-ngsi was built successfuly
        HD-Chapter Data [ 10838 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            frb Francisco Romero
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: