You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Filippo Balicchia <fb...@gmail.com> on 2011/11/17 13:22:22 UTC

Custom distributions

Hello,

I try to create my Custom distributions and i start to follow the guide
http://karaf.apache.org/manual/latest-2.2.x/developers-guide/custom-distribution.html.

after some minor change to my pom.xml i try to build and during
compilation maven can't get
org.apache.karaf:apache-karaf:xml:features:2.2.2

Where i can download it ?

Please see the attach for my pom

Cheers

--Filippo

Re: Custom distributions

Posted by akuhtz <an...@gmail.com>.
Hi Filippo,

Try the following:



instead of 


File can then be found at the following location:
http://repo1.maven.org/maven2/org/apache/karaf/assemblies/features/standard/2.2.2/

If you need enterprise features you need to add the enterprise features
dependency.

Cheers
Andi

--
View this message in context: http://karaf.922171.n3.nabble.com/Custom-distributions-tp3515575p3515605.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Custom distributions

Posted by Filippo Balicchia <fb...@gmail.com>.
Thanks the problem was wrong dipendency . now have other issue but
dependes from me

Cheers

--Filippo




2011/11/17 akuhtz <an...@gmail.com>:
> Hi,
>
> There is a $ missing before {karaf.version}, should be ${karaf.version} in
> descriptor !!
>
> <descriptor>mvn:org.apache.karaf.assemblies.features/standard/${karaf.version}/xml/features</descriptor>
> <descriptor>mvn:org.apache.karaf.assemblies.features/enterprise/${karaf.version}/xml/features</descriptor>
>
> Cheers
> Andi
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Custom-distributions-tp3515575p3515848.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>

Re: Custom distributions

Posted by akuhtz <an...@gmail.com>.
Hi,

There is a $ missing before {karaf.version}, should be ${karaf.version} in
descriptor !!

<descriptor>mvn:org.apache.karaf.assemblies.features/standard/${karaf.version}/xml/features</descriptor>
<descriptor>mvn:org.apache.karaf.assemblies.features/enterprise/${karaf.version}/xml/features</descriptor> 

Cheers
Andi


--
View this message in context: http://karaf.922171.n3.nabble.com/Custom-distributions-tp3515575p3515848.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: Custom distributions

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Filippo,

your feature dependency is not correct:

>      <dependency>
>        <groupId>org.apache.karaf</groupId>
>        <artifactId>apache-karaf</artifactId>
>        <version>2.2.4</version>
>        <type>xml</type>
>        <classifier>features</classifier>
>      </dependency>

it should be:

     <dependency>
       <groupId>org.apache.karaf.assemblies.features</groupId>
       <artifactId>standard</artifactId>
       <version>2.2.4</version>
       <type>xml</type>
       <classifier>features</classifier>
     </dependency>

Regards
JB

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

Re: Custom distributions

Posted by Filippo Balicchia <fb...@gmail.com>.
Thanks for response but i ge the same error.

here my pom.xml


-- form here --
<?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
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
  <groupId>my.company</groupId>
  <artifactId>mycustom-karaf</artifactId>
  <version>1.0</version>
  <packaging>pom</packaging>
  <name>My Unix Custom Karaf Distribution</name>

  <properties>
    <karaf.version>2.2.4</karaf.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>org.apache.karaf</groupId>
      <artifactId>apache-karaf</artifactId>
      <version>2.2.4</version>
      <type>tar.gz</type>
    </dependency>
    <dependency>
      <groupId>org.apache.karaf</groupId>
      <artifactId>apache-karaf</artifactId>
      <version>2.2.4</version>
      <type>xml</type>
      <classifier>features</classifier>
    </dependency>
  </dependencies>

   <repositories>
        <!-- Required to allow building with a snapshot of the NMR
(parent POM) -->
        <repository>
            <id>apache.snapshots</id>
            <name>Apache Snapshot Repository</name>
            <url>http://repository.apache.org/snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
        <!-- Java.net Maven Repository, required by javax.mail -->
        <repository>
            <id>java.net</id>
            <name>Java.net Maven2 Repository</name>
            <url>http://download.java.net/maven/2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <!-- JBoss Maven Repository, required by Drools -->
        <repository>
            <id>jboss</id>
            <name>JBoss Maven2 Repository</name>
            <url>http://repository.jboss.com/nexus/content/groups/public/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <!-- Scriptengines Google Maven Repository, required by
scriptengines -->
        <repository>
            <id>scriptengines</id>
            <name>Scriptengines Google Code Maven Repository</name>
            <url>http://scriptengines.googlecode.com/svn/m2-repo</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <!-- ServiceMix Maven 2 repository: jsmpp 2.0 is not in central repo -->
        <repository>
            <id>servicemix.m2-repo</id>
            <name>ServiceMix Maven 2 repository</name>
            <url>http://svn.apache.org/repos/asf/servicemix/m2-repo</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

<build>
    <resources>
      <resource>
        <directory>${basedir}/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>
        <executions>
          <execution>
            <id>filter</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>resources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>features-maven-plugin</artifactId>
        <version>2.2.2</version>
        <executions>
          <execution>
           <id>add-features-to-repo</id>
           <phase>generate-resources</phase>
           <goals>
             <goal>add-features-to-repo</goal>
           </goals>
           <configuration>
              <descriptors>

<descriptor>mvn:org.apache.karaf.assemblies.features/standard/{karaf.version}/xml/features</descriptor>
		<descriptor>mvn:org.apache.karaf.assemblies.features/enterprise/{karaf.version}/xml/features</descriptor>

<descriptor>${basedir}/target/classes/my-features.xml</descriptor>
              </descriptors>
              <features>
                 <feature>config</feature>
              </features>
           </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>copy</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
               <!-- Define here the artifacts which should be
considered in the assembly -->
               <!-- For instance, the branding jar -->
               <artifactItems>
                 <artifactItem>
                    <groupId>org.apache.servicemix.features</groupId>

<artifactId>org.apache.servicemix.features.branding</artifactId>
                    <version>4.4.0-SNAPSHOT</version>
                    <outputDirectory>target/dependencies</outputDirectory>
                    <destFileName>mybranding.jar</destFileName>
                 </artifactItem>
               </artifactItems>
            </configuration>
          </execution>
          <execution>
            <!-- Uncompress the standard Karaf distribution -->
            <id>unpack</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.apache.karaf</groupId>
                  <artifactId>apache-karaf</artifactId>
                  <type>tar.gz</type>
                  <outputDirectory>target/dependencies</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <executions>
          <execution>
            <id>bin</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                <descriptor>src/main/descriptors/bin.xml</descriptor>
              </descriptors>
              <appendAssemblyId>false</appendAssemblyId>
              <tarLongFileMode>gnu</tarLongFileMode>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>

-- to here --






2011/11/17 Jean-Baptiste Onofré <jb...@nanthrax.net>:
> Hi Filippo,
>
> the documentation is not up to date, sorry for that.
>
> The features URLs to use are:
>
> mvn:org.apache.karaf.assemblies.features/standard/2.2.4/xml/features
> mvn:org.apache.karaf.assemblies.features/enterprise/2.2.4/xml/features
>
> Regards
> JB
>
> On 11/17/2011 01:22 PM, Filippo Balicchia wrote:
>>
>> Hello,
>>
>> I try to create my Custom distributions and i start to follow the guide
>>
>> http://karaf.apache.org/manual/latest-2.2.x/developers-guide/custom-distribution.html.
>>
>> after some minor change to my pom.xml i try to build and during
>> compilation maven can't get
>> org.apache.karaf:apache-karaf:xml:features:2.2.2
>>
>> Where i can download it ?
>>
>> Please see the attach for my pom
>>
>> Cheers
>>
>> --Filippo
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: Custom distributions

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Filippo,

the documentation is not up to date, sorry for that.

The features URLs to use are:

mvn:org.apache.karaf.assemblies.features/standard/2.2.4/xml/features
mvn:org.apache.karaf.assemblies.features/enterprise/2.2.4/xml/features

Regards
JB

On 11/17/2011 01:22 PM, Filippo Balicchia wrote:
> Hello,
>
> I try to create my Custom distributions and i start to follow the guide
> http://karaf.apache.org/manual/latest-2.2.x/developers-guide/custom-distribution.html.
>
> after some minor change to my pom.xml i try to build and during
> compilation maven can't get
> org.apache.karaf:apache-karaf:xml:features:2.2.2
>
> Where i can download it ?
>
> Please see the attach for my pom
>
> Cheers
>
> --Filippo

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