You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by l891211 <l8...@yahoo.com> on 2015/08/30 12:04:42 UTC

Karaf 4.0.0 creatng custom distribution - bootRepositories / installedRepositories

Hello,

I'm trying to make a custom distribution of karaf, which should include
other features, as camel, cxf and other. 
My question is how do i specify the custom repositories from where the
features should be installed? I tried to specify the maven repository, but i
get an exception:

 Could not find artifact
org.apache.camel.karaf:apache-camel:xml:features:2.16.0.SNAPSHOT

If i don't specify any repository, i get message when karaf starts that
camel cannot be installed as feature not found.

<plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <version>4.0.0</version>
                <extensions>true</extensions>
                <configuration>                    
                    
                    <bootRepositories>
                       
<repository>mvn:org.apache.camel.karaf/apache-camel/2.16.0.SNAPSHOT/xml/features</repository>
                    </bootRepositories>
                    <bootFeatures>
                        <feature>jaas</feature>
                        <feature>shell</feature>
                        <feature>ssh</feature>
                        <feature>management</feature>
                        <feature>bundle</feature>
                        <feature>feature</feature>
                        <feature>config</feature>
                        <feature>deployer</feature>
                        <feature>diagnostic</feature>
                        <feature>instance</feature>
                        <feature>kar</feature>
                        <feature>log</feature>
                        <feature>package</feature>
                        <feature>service</feature>
                        <feature>system</feature>                                                
                        <feature>camel</feature>
                    </bootFeatures>
                    <installedFeatures>
                        <feature>wrapper</feature>
                        
                    </installedFeatures>
                </configuration>
            </plugin>

regards, 
Laji




--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-0-creatng-custom-distribution-bootRepositories-installedRepositories-tp4042144.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 4.0.0 creatng custom distribution - bootRepositories / installedRepositories

Posted by l891211 <l8...@yahoo.com>.
Hello,

I added now and i get the same error:

--- maven-clean-plugin:2.4.1:clean (default-clean) @ GSBv3 ---
Deleting /home/laji/projects/mavenproject1/ESBV3/target

--- maven-resources-plugin:2.6:resources (default-resources) @ GSBv3 ---
File encoding has not been set, using platform encoding UTF-8, i.e. build is
platform dependent!
Using platform encoding (UTF-8 actually) to copy filtered resources, i.e.
build is platform dependent!
skip non existing resourceDirectory
/home/laji/projects/mavenproject1/ESBV3/src/main/resources
skip non existing resourceDirectory
/home/laji/projects/mavenproject1/ESBV3/src/main/filtered-resources

--- karaf-maven-plugin:4.0.0:assembly (default-assembly) @ GSBv3 ---
Creating work directory
Loading kar and features repositories dependencies
Aug 30, 2015 5:26:55 PM org.apache.karaf.profile.assembly.Builder
doGenerateAssembly
INFO: Generating karaf assembly:
/home/laji/projects/mavenproject1/ESBV3/target/assembly
Aug 30, 2015 5:26:55 PM org.apache.karaf.profile.assembly.Builder
doGenerateAssembly
INFO: Unzipping kars
Aug 30, 2015 5:26:55 PM org.ops4j.pax.url.mvn.internal.AetherBasedResolver
resolve
WARNING: Error resolving
artifactorg.apache.camel.karaf:apache-camel:xml:features:2.16.0-SNAPSHOT:Could
not find artifact
org.apache.camel.karaf:apache-camel:xml:features:2.16.0-SNAPSHOT
shaded.org.eclipse.aether.resolution.ArtifactResolutionException: Could not
find artifact
org.apache.camel.karaf:apache-camel:xml:features:2.16.0-SNAPSHOT
	at
shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:444)
	at
shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifacts(DefaultArtifactResolver.java:246)
	at
shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolveArtifact(DefaultArtifactResolver.java:223)
	at
shaded.org.eclipse.aether.internal.impl.DefaultRepositorySystem.resolveArtifact(DefaultRepositorySystem.java:294)
	at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:573)
	at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:528)
	at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:506)
	at
org.ops4j.pax.url.mvn.internal.AetherBasedResolver.resolve(AetherBasedResolver.java:481)
	at
org.apache.karaf.features.internal.download.impl.MavenDownloadTask.download(MavenDownloadTask.java:34)
	at
org.apache.karaf.features.internal.download.impl.AbstractRetryableDownloadTask.run(AbstractRetryableDownloadTask.java:58)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: shaded.org.eclipse.aether.transfer.ArtifactNotFoundException:
Could not find artifact
org.apache.camel.karaf:apache-camel:xml:features:2.16.0-SNAPSHOT
	at
shaded.org.eclipse.aether.internal.impl.DefaultArtifactResolver.resolve(DefaultArtifactResolver.java:434)
	... 16 more



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-0-creatng-custom-distribution-bootRepositories-installedRepositories-tp4042144p4042148.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 4.0.0 creatng custom distribution - bootRepositories / installedRepositories

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Did you specify the Apache SNAPSHOT repo in your pom ?

<repository>
             <id>apache-snapshots</id>
             <name>Apache Snapshots Repository</name>
 
<url>http://repository.apache.org/content/groups/snapshots-group</url>
             <releases>
                 <enabled>false</enabled>
             </releases>
             <snapshots>
                 <enabled>true</enabled>
             </snapshots>
</repository>

Regards
JB

On 08/30/2015 12:04 PM, l891211 wrote:
> Hello,
>
> I'm trying to make a custom distribution of karaf, which should include
> other features, as camel, cxf and other.
> My question is how do i specify the custom repositories from where the
> features should be installed? I tried to specify the maven repository, but i
> get an exception:
>
>   Could not find artifact
> org.apache.camel.karaf:apache-camel:xml:features:2.16.0.SNAPSHOT
>
> If i don't specify any repository, i get message when karaf starts that
> camel cannot be installed as feature not found.
>
> <plugin>
>                  <groupId>org.apache.karaf.tooling</groupId>
>                  <artifactId>karaf-maven-plugin</artifactId>
>                  <version>4.0.0</version>
>                  <extensions>true</extensions>
>                  <configuration>
>
>                      <bootRepositories>
>
> <repository>mvn:org.apache.camel.karaf/apache-camel/2.16.0.SNAPSHOT/xml/features</repository>
>                      </bootRepositories>
>                      <bootFeatures>
>                          <feature>jaas</feature>
>                          <feature>shell</feature>
>                          <feature>ssh</feature>
>                          <feature>management</feature>
>                          <feature>bundle</feature>
>                          <feature>feature</feature>
>                          <feature>config</feature>
>                          <feature>deployer</feature>
>                          <feature>diagnostic</feature>
>                          <feature>instance</feature>
>                          <feature>kar</feature>
>                          <feature>log</feature>
>                          <feature>package</feature>
>                          <feature>service</feature>
>                          <feature>system</feature>
>                          <feature>camel</feature>
>                      </bootFeatures>
>                      <installedFeatures>
>                          <feature>wrapper</feature>
>
>                      </installedFeatures>
>                  </configuration>
>              </plugin>
>
> regards,
> Laji
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-0-creatng-custom-distribution-bootRepositories-installedRepositories-tp4042144.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf 4.0.0 creatng custom distribution - bootRepositories / installedRepositories

Posted by l891211 <l8...@yahoo.com>.
Thanks for pointing that out, but even if i put the valid repository,  cannot
run the maven install command.

here is the pom

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>


    <groupId>com.mydistrib</groupId>
    <artifactId>GSBv3</artifactId>
    <version>1.0</version>
    <packaging>karaf-assembly</packaging>

    <dependencies>
        <dependency>
            
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <version>4.0.0</version>
            <type>kar</type>
        </dependency>
      
        <dependency>
            
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>standard</artifactId>
            <classifier>features</classifier>
            <version>4.0.0</version>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>spring</artifactId>
            <classifier>features</classifier>
            <version>4.0.0</version>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>
    </dependencies>

    <build>
        
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/filtered-resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>process-resources</id>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <version>4.0.0</version>
                <extensions>true</extensions>
                <configuration>                    
                    
                    <bootRepositories>
                       
<repository>mvn:org.apache.camel.karaf/apache-camel/2.16.0-SNAPSHOT/xml/features</repository>
                    </bootRepositories>
                    <bootFeatures>
                        <feature>jaas</feature>
                        <feature>shell</feature>
                        <feature>ssh</feature>
                        <feature>management</feature>
                        <feature>bundle</feature>
                        <feature>feature</feature>
                        <feature>config</feature>
                        <feature>deployer</feature>
                        <feature>diagnostic</feature>
                        <feature>instance</feature>
                        <feature>kar</feature>
                        <feature>log</feature>
                        <feature>package</feature>
                        <feature>service</feature>
                        <feature>system</feature>                                                
                        <feature>camel</feature>
                    </bootFeatures>
                    <installedFeatures>
                        <feature>wrapper</feature>
                        
                    </installedFeatures>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-0-creatng-custom-distribution-bootRepositories-installedRepositories-tp4042144p4042146.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Karaf 4.0.0 creatng custom distribution - bootRepositories / installedRepositories

Posted by Paul Spencer <pa...@apache.org>.
Laji,
If I think the camel version should be -SNAPSHOT not .SNAPHOT. 

Paul Spencer



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-4-0-0-creatng-custom-distribution-bootRepositories-installedRepositories-tp4042144p4042145.html
Sent from the Karaf - User mailing list archive at Nabble.com.