Common repository


#1

Hello there! I an new to cicleCI and i’m trying to get this working in my environment. Today I have two git projects (lets call them project A and project B). Both projects are java projects and uses maven, but to generate the project B build, I need some things from project A - something like common libraries. This is the error that I got:

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 12.831 s
[INFO] Finished at: 2016-01-08T17:28:51+00:00
[INFO] Final Memory: 26M/1963M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project widget: Could not resolve dependencies for project br.com:widget:war:1.0-SNAPSHOT: The following artifacts could not be resolved: br.com.common:common-restful:jar:1.0-SNAPSHOT, br.com.common:common-project:jar:1.0-SNAPSHOT: Could not find artifact br.com.common:common-restful:jar:1.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 know this error in my local environment and I know that to get this working, I need to clone another git repository and run the command “mvn clean install eclipse:clean eclipse:eclipse -P desenv -Dmaven.test.skip=true”, but I don’t know how to get this working on circleCI.

Can someone help me with this?

Thanks!


#2

You can totally clone the repo on CircleCI as well. We pre-install the full-fledged git command-line client, so git clone should do it.

However, if the project you are trying to clone is private, you’ll need to add another SSH key to CircleCI and GitHub. There are more details around this in this doc.


#3

Great!!!

Thanks, alexey! I will try this and then I put the results here, ok?


#4

Absolutely, will be happy to help you out if you have any other questions.


#5

Hello alexey!
I was able to generate the build now! I just put the ssh key there (as described in the document) and run the commands git clone and mvn as needed!

Thanks for your help in this case!!!


#6