Search code examples
eclipsemavenbuildpom.xmlsiddhi

Checked out siddhi code, & ran mvn eclipse:eclipse throws error at <relativePath>../../pom.xml</relativePath>


I find it really odd that a project like siddhi wont build right out of the box, I wonder what I am missing.

To start with I just need way to import siddhi into eclipse, and it won't show me any projects when I choose Import Existing Projects. If I import from file system, it show a whole bunch of errors and I cannot run simple stuff like Call and Type. Really crappy.

Out of all that I googled, I installed maven, and am trying to follow maven eclipse configuration

When I run sudo mvn eclipse:eclipse, I get the following error

~/Development/workinprogress/siddhi$ sudo mvn eclipse:eclipse
[INFO] Scanning for projects...
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.wso2.cep:cep-parent:3.1.0 (/home/jsiddharth/Development/workinprogress/siddhi/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Failure to find org.wso2.carbon:carbon-products:pom:4.2.0 in http://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 22, column 13 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

Line 22 has

<parent>^M
    <groupId>org.wso2.carbon</groupId>^M
    <artifactId>carbon-products</artifactId>^M
    <version>4.2.0</version>^M
    <relativePath>../../pom.xml</relativePath>^M
</parent>^M

I ran mvn eclipse:eclipse from the siddhi folder where pom.xml exists. Now where will I find ../../pom.xml. It seems like a really silly bug. What am I missing here?


Solution

  • Surprisingly the source path at the website is wrong. The link mentioned is

    http://svn.wso2.org/repos/wso2/trunk/commons/siddhi2

    It is actually

    http://svn.wso2.org/repos/wso2/trunk/commons/siddhi

    I checked this code out using svn co http://svn.wso2.org/repos/wso2/trunk/commons/siddhi siddhi and then ran chmod 777 -R siddhi. After this I ran mvn eclipse:eclipse, imported the projects to eclipse and its all green now.

    Finally... thanks @mb21