fabric8-quickstarts / karaf2-camel-amq

Camel route using ActiveMQ in Karaf container
1 stars 19 forks source link

fails to build locally and on CD server, missing deps #130

Open rawlingsj opened 7 years ago

rawlingsj commented 7 years ago
[ERROR] Failed to execute goal on project karaf2-camel-amq: Could not resolve dependencies for project io.fabric8.quickstarts:karaf2-camel-amq:bundle:1.0-SNAPSHOT: The following artifacts could not be resolved: org.apache.camel:camel-core:jar:2.17.0.redhat-630187, org.jboss.fuse:fuse-karaf-framework:kar:6.3.0.redhat-187: Could not find artifact org.apache.camel:camel-core:jar:2.17.0.redhat-630187 in central (https://repo.maven.apache.org/maven2) -> [Help 1]

Are the dependencies versions for this project correct? I thought for upstream we shouldn't be using Red Hat versions?

If they are correct then we need to configure a different repo on our CI. CD and local settings.xml by the looks of things. I've found them in https://mvnrepository.com/repos/redhat-ga but

If that's the case perhaps we should have that info in the ReadMe or if not can we stick to using community versions?

rawlingsj commented 7 years ago

Same for karaf2-camel-log too.

@chirino @jstrachan @dhirajsb what's the right thing to do here? Perhaps these two projects shouldn't be using a red hat camel version in the master branch?

rawlingsj commented 7 years ago

@nicolaferraro actually this may be a question for you. I see you added https://github.com/fabric8io/fabric8/commit/5b77a4f94d9a84c38f4370033ca70a2efb1c0258 the karaf bom using a red hat version and importing the redhat-ga maven repo, is there a non red hat versioned bom available we can use?

jamesnetherton commented 7 years ago

Each of the karaf-2 quickstarts has a configuration/settings.xml containing the relevant repos. If you take a peek at the PR jobs for these builds, you'll see that they include additional maven args -s configuration/settings.xml.

nicolaferraro commented 7 years ago

@rawlingsj these karaf2- quickstarts (unlike the karaf- ones) have always been targeting fuse, I have just changed the dependency on the fuse BOM into a wider BOM. There are some artifacts eg. fuse karaf framework that are available on red hat GA only. I think the best solution to build them is the one suggested by James.

rawlingsj commented 7 years ago

Each of the karaf-2 quickstarts has a configuration/settings.xml containing the relevant repos. If you take a peek at the PR jobs for these builds, you'll see that they include additional maven args -s configuration/settings.xml.

By overriding the environment configured settings.xml with a provided configuration/settings.xml means each job run downloads every single dependency and transitive dependency direct from maven central. For example in the CD environment we use the cluster specific nexus as well as a persistent volume to cache maven dependencies. This speeds up the builds, reduces the downloads from the internet in our cloud CD environment and removes all the download messages in the logs which are a pain to filter through when things go wrong.

I have removed the -s configuration/settings.xml here https://github.com/fabric8io/ipaas-quickstarts/commit/402d0d0283e793f44ae64b1c68b8e11639170c20 so we now get the improved build times and benefits above. For me a settings.xml should not be checked in, it provides cluster / environment configuration.

Having said that if these quickstarts aren't needed by fabric8 maybe we just remove them?

So maybe we: