You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2015/10/22 10:30:27 UTC

[jira] [Commented] (KARAF-3935) Cannot build distribution from repository other than central

    [ https://issues.apache.org/jira/browse/KARAF-3935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14968793#comment-14968793 ] 

Freeman Fang commented on KARAF-3935:
-------------------------------------

The pax-url MavenResolver is actually configured by
{code}
if (localRepository != null) {
            props.put(Builder.ORG_OPS4J_PAX_URL_MVN_PID + ".localRepository", localRepository);
        }
        if (mavenRepositories != null) {
            props.put(Builder.ORG_OPS4J_PAX_URL_MVN_PID + ".repositories", mavenRepositories);
        }
        MavenResolver resolver = MavenResolvers.createMavenResolver(props, ORG_OPS4J_PAX_URL_MVN_PID);
{code}

And in the  karaf-maven-plugin AssemblyMojo.java, the localRepository and mavenRepositories are already passed in so I don't see any real problem
{code}
        Builder builder = Builder.newInstance();
        builder.offline(mavenSession.isOffline());
        builder.localRepository(localRepo.getBasedir());
        builder.mavenRepositories(remote.toString());
{code}

> Cannot build distribution from repository other than central
> ------------------------------------------------------------
>
>                 Key: KARAF-3935
>                 URL: https://issues.apache.org/jira/browse/KARAF-3935
>             Project: Karaf
>          Issue Type: Bug
>            Reporter: Fabian Lange
>            Assignee: Freeman Fang
>
> I am hitting a roadblock building a custom distribution with staging repo.
> I looks like that the karaf-maven-plugin:4.0.1:assembly (default-assembly) uses an unconfigured pax-url MavenResolver:
> https://github.com/apache/karaf/blob/master/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java#L370
> The only repository this thing knows is maven central.
> So of course the distribution build fails:
> Error resolving artifact org.apache.karaf.package:org.apache.karaf.package.core:jar:4.0.1: Could not find artifact org.apache.karaf.package:org.apache.karaf.package.core:jar:4.0.1 in central (http://repo1.maven.org/maven2/)
> I have yet been unsuccessful in convincing it to use ay maven settings i can actually influence and point to the staging repo.
> This is also the reason why the jenkins build fails:
> https://builds.apache.org/view/H-L/view/Karaf/job/karaf-master/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)