Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camel-k-maven-settings localRepository change is not working #1010

Closed
athishsreeram opened this issue Oct 11, 2019 · 5 comments
Closed

camel-k-maven-settings localRepository change is not working #1010

athishsreeram opened this issue Oct 11, 2019 · 5 comments
Labels
status/waiting-for-feedback Needs some feedback

Comments

@athishsreeram
Copy link

i did a mvn clean install -> jar to local repo

In camel-k-maven-settings.xml i configured the local repo

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository>/Users/anharay/.m2</localRepository>
  <profiles>
    <profile>
      <id>maven-settings</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <repositories>
        <repository>
          <id>central</id>
          <url>https://repo.maven.apache.org/maven2</url>
          <snapshots>
            <enabled>false</enabled>
            <checksumPolicy>fail</checksumPolicy>
          </snapshots>
          <releases>
            <enabled>true</enabled>
            <checksumPolicy>fail</checksumPolicy>
          </releases>
        </repository>
      </repositories>
      <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>https://repo.maven.apache.org/maven2</url>
          <snapshots>
            <enabled>false</enabled>
            <checksumPolicy>fail</checksumPolicy>
          </snapshots>
          <releases>
            <enabled>true</enabled>
            <checksumPolicy>fail</checksumPolicy>
          </releases>
        </pluginRepository>
      </pluginRepositories>
    </profile>
  </profiles>
</settings>


kamel run -d mvn:com.javainuse:apache-camel-consume:0.0.1-SNAPSHOT SimpleRouteBuilder.java --dev

Snapshot is not getting pulled from the local repo

Code repo
https://github.com/athishsreeram/apache-camel-consume.git


[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13.834 s
[INFO] Finished at: 2019-10-11T21:36:58Z
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project camel-k-integration: Could not resolve dependencies for project org.apache.camel.k.integration:camel-k-integration:jar:1.0.0-M2: Could not find artifact com.javainuse:apache-camel-consume:jar:0.0.1-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
{"level":"info","ts":1570829818.8779883,"logger":"camel-k.builder","msg":"step failed with error: failure while determining classpath: exit status 1","step":"github.com/apache/camel-k/pkg/builder/ComputeDependencies","phase":20,"kit":"kit-bmgfahvkqcnejl8ng910"}
{"level":"info","ts":1570829818.8780565,"logger":"camel-k.builder","msg":"build request kit-bmgfahvkqcnejl8ng910 executed in 14.831754139s"}
{"level":"info","ts":1570829818.8780706,"logger":"camel-k.builder","msg":"dependencies: [camel:bean camel:cxf camel:direct camel:file camel:http camel:mock camel:rest mvn:com.javainuse:apache-camel-consume:0.0.1-SNAPSHOT mvn:org.apache.camel.k/camel-k-loader-java mvn:org.apache.camel.k/camel-k-runtime-main]"}
{"level":"info","ts":1570829818.8781338,"logger":"camel-k.builder","msg":"artifacts: []"}
{"level":"info","ts":1570829818.8781366,"logger":"camel-k.builder","msg":"artifacts selected: []"}
{"level":"info","ts":1570829818.8781388,"logger":"camel-k.builder","msg":"requested image: "}
{"level":"info","ts":1570829818.878141,"logger":"camel-k.builder","msg":"base image: fabric8/s2i-java:3.0-java8"}
{"level":"info","ts":1570829818.8781428,"logger":"camel-k.builder","msg":"resolved image: fabric8/s2i-java:3.0-java8"}
@athishsreeram athishsreeram changed the title camel-k-maven-settings localrepo change is not working camel-k-maven-settings localRepository change is not working Oct 11, 2019
@lburgazzoli
Copy link
Contributor

The local repository is of course local to the camel-k builder pod so if to get your local dependency taken into account by camel-k best option is to put your artifact to a public maven repo such as sonatype snapshot repo.

@keyone
Copy link

keyone commented Oct 14, 2019

Is there no option to configure private repo or local repo

@lburgazzoli
Copy link
Contributor

Upon installation, you can use the option --maven-repository to add add your own private repo to the list of known repositories. In camel-k is already installed you can amend the config-map that contains the maven settings, by default is should be named camel-k-maven-settings.

Local repo does not make sense as the build happens inside k8s

@lburgazzoli lburgazzoli added the status/waiting-for-feedback Needs some feedback label Jan 1, 2020
@lburgazzoli
Copy link
Contributor

@keyone can we close this one ?

@keyone
Copy link

keyone commented Jan 3, 2020

@lburgazzoli yes you can close it. Thank you for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/waiting-for-feedback Needs some feedback
Projects
None yet
Development

No branches or pull requests

3 participants