You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Jean-Baptiste Onofré <jb...@nanthrax.net> on 2014/09/23 21:28:19 UTC
[UPDATE] New install-kar goal of karaf-maven-plugin
Hi guys,
as discussed with some of you on IRC, I pushed my refactoring of the
karaf-maven-plugin. For now, I only pushed the install-kar goal (I will
push the feature-generate-descriptor goal tomorrow).
This "new" install-kar goal now work recursively to resolve transitive
features repositories and features.
It simplifies the custom distribution creation and avoid Karaf to
download some "core" artifacts from Internet at startup.
If you have some time to test it, it would be helpful.
I keep you posted for the other goals.
Thanks,
Regards
JB
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Rodrigo,
For the first point, I'm not sure to follow you.
You build the Karaf assembly to create the tar.gz/zip file and copy on a
VM without Internet connection ?
For the second point, can you run with mvn -X to get details.
The NPE is at line 178 or the goal, and here, it's where it checks the
artifact classifier. I added a test to avoid the NPE if classifier is null.
Can you provide to me your pom.xml/project to work directly on my machine ?
Thanks,
Regards
JB
On 09/23/2014 10:55 PM, Rodrigo Serra wrote:
> Hi JB,
>
> I compile and run the generated assembly in a VM without internet access. The resulting assembly has reference to directories of my development environment. This is can be see in the karaf log:
>
> 2014-09-23 17:45:33,573 | WARN | FelixStartLevel | FeaturesServiceImpl | 20 - org.apache.karaf.features.core - 3.0.2.SNAPSHOT | Unable to add features repository /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml at startup
> java.lang.IllegalArgumentException: invalid URI: /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml
>
> "/Users/rserra/NetBeansProjects/Lecici/sgc" is the project root on my machine.
>
> Another problem was a generation of NPE if a regular jar is on dependencies: (is not necessary for my project, I included this dependencies in my last intent to generate a completed assembly)
>
> [ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars) on project sgc: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed. NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars) on project sgc: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> ... 19 more
> Caused by: java.lang.NullPointerException
> at org.apache.karaf.tooling.features.InstallKarsMojo.execute(InstallKarsMojo.java:178)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
> ... 20 more
>
>
> Regards,
> Rodrigo
>
> El 23/09/2014, a las 16:28, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>
>> Hi guys,
>>
>> as discussed with some of you on IRC, I pushed my refactoring of the karaf-maven-plugin. For now, I only pushed the install-kar goal (I will push the feature-generate-descriptor goal tomorrow).
>>
>> This "new" install-kar goal now work recursively to resolve transitive features repositories and features.
>>
>> It simplifies the custom distribution creation and avoid Karaf to download some "core" artifacts from Internet at startup.
>>
>> If you have some time to test it, it would be helpful.
>>
>> I keep you posted for the other goals.
>>
>> Thanks,
>> Regards
>> JB
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
By the way, I did a test:
- I removed all repositories in etc/org.ops4j.pax.url.mvn.cfg file
- I set a empty local repository in etc/org.ops4j.pax.url.mvn.cfg file:
org.ops4j.pax.url.mvn.localRepository=/tmp/repository
So, even if I have an Internet connection on my machine, Karaf is not
able to download any remote artifact or use my local Maven repository.
Karaf started without problem.
I was able to install the wrapper feature (as the wrapper feature is
<installedFeatures/> of the assembly).
The installation of the webconsole feature failed as Karaf is not able
to resolve artifact.
I will do a test on an isolated VM to be 100% sure.
Regards
JB
On 09/23/2014 10:55 PM, Rodrigo Serra wrote:
> Hi JB,
>
> I compile and run the generated assembly in a VM without internet access. The resulting assembly has reference to directories of my development environment. This is can be see in the karaf log:
>
> 2014-09-23 17:45:33,573 | WARN | FelixStartLevel | FeaturesServiceImpl | 20 - org.apache.karaf.features.core - 3.0.2.SNAPSHOT | Unable to add features repository /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml at startup
> java.lang.IllegalArgumentException: invalid URI: /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml
>
> "/Users/rserra/NetBeansProjects/Lecici/sgc" is the project root on my machine.
>
> Another problem was a generation of NPE if a regular jar is on dependencies: (is not necessary for my project, I included this dependencies in my last intent to generate a completed assembly)
>
> [ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars) on project sgc: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed. NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars) on project sgc: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> ... 19 more
> Caused by: java.lang.NullPointerException
> at org.apache.karaf.tooling.features.InstallKarsMojo.execute(InstallKarsMojo.java:178)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
> ... 20 more
>
>
> Regards,
> Rodrigo
>
> El 23/09/2014, a las 16:28, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>
>> Hi guys,
>>
>> as discussed with some of you on IRC, I pushed my refactoring of the karaf-maven-plugin. For now, I only pushed the install-kar goal (I will push the feature-generate-descriptor goal tomorrow).
>>
>> This "new" install-kar goal now work recursively to resolve transitive features repositories and features.
>>
>> It simplifies the custom distribution creation and avoid Karaf to download some "core" artifacts from Internet at startup.
>>
>> If you have some time to test it, it would be helpful.
>>
>> I keep you posted for the other goals.
>>
>> Thanks,
>> Regards
>> JB
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Thanks for the update,
I will take a look and test with your project.
Regards
JB
On 09/24/2014 11:38 AM, Rodrigo Serra wrote:
> Hi JB,
>
> I test again and NPE is gone and no more references to my working directory :)
>
> I Have a new problem, I thinks this is related to my project configuration. When start karaf i see errors related to unresolved bundles. Maybe some kars o features dependencies are missing. This is the list of bundles extracted from the log:
>
> org.apache.karaf.features:spring:xml:features:3.0.2-SNAPSHOT
> org.apache.karaf.management:org.apache.karaf.management.server
> org.apache.karaf.package:org.apache.karaf.package.core:jar:3.0.2-SNAPSHOT
> org.apache.mina:mina-core:jar:2.0.7
> org.apache.karaf.config:org.apache.karaf.config.core:jar:3.0.2-SNAPSHOT
> org.apache.karaf.kar:org.apache.karaf.kar.core:jar:3.0.2-SNAPSHOT
> org.apache.karaf.instance:org.apache.karaf.instance.core:jar:3.0.2-SNAPSHOT
> org.eclipse.equinox:region:jar:1.0.0.v20110506
>
> This is my pom file:
>
> <?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>
> <parent>
> <artifactId>sgc</artifactId>
> <groupId>ar.com.jlab</groupId>
> <version>1.1.13-SNAPSHOT</version>
> </parent>
>
> <groupId>ar.com.jlab.sgc.sgc-assembly</groupId>
> <artifactId>sgc</artifactId>
> <packaging>karaf-assembly</packaging>
>
> <name>SGC :: Assembly</name>
> <dependencies>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <artifactId>framework</artifactId>
> <version>${karaf.version}</version>
> <type>kar</type>
> </dependency>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <version>${karaf.version}</version>
> <artifactId>standard</artifactId>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <version>${karaf.version}</version>
> <artifactId>enterprise</artifactId>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>ar.com.jlab.sgc.sgc-features</groupId>
> <artifactId>sgc</artifactId>
> <version>1.1.13-SNAPSHOT</version>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>ar.com.jlab.osgi.derby</groupId>
> <artifactId>osgi-derby-feature</artifactId>
> <version>${osgi-derby.version}</version>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
> </dependencies>
> <build>
> <resources>
> <resource>
> <directory>${pom.basedir}/src/main</directory>
> <filtering>true</filtering>
> <includes>
> <include>**/*</include>
> </includes>
> </resource>
> </resources>
> <plugins>
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <version>1.7</version>
> <executions>
> <execution>
> <phase>validate</phase>
> <goals>
> <goal>run</goal>
> </goals>
> <configuration>
> <tasks>
> <property name="versionNumerica" value="${project.version}" />
> <script language="javascript">
> var versionNumerica = project.getProperty("versionNumerica");
> project.setProperty("versionNumerica", versionNumerica.replaceAll("-", "."));
> </script>
> </tasks>
> <exportAntProperties>true</exportAntProperties>
> </configuration>
> </execution>
> </executions>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.6</version>
> <executions>
> <execution>
> <id>resource</id>
> <phase>prepare-package</phase>
> <goals>
> <goal>copy-resources</goal>
> </goals>
> <configuration>
> <resources>
> <resource>
> <filtering>true</filtering>
> <directory>src/main/resources/</directory>
> </resource>
> </resources>
> <outputDirectory>target/assembly</outputDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> <plugin>
> <groupId>org.apache.karaf.tooling</groupId>
> <artifactId>karaf-maven-plugin</artifactId>
> <version>${karaf.version}</version>
> <extensions>true</extensions>
> <configuration>
> <resourcesDir>${basedir}/target/resources</resourcesDir>
> <bootFeatures>
> <feature>wrapper</feature>
> <feature>derby-server</feature>
> <feature>sgc</feature>
> </bootFeatures>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
>
>
> El 24/09/2014, a las 03:46, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>
>> I fixed it.
>>
>> I'm preparing some tests.
>>
>> Regards
>> JB
>>
>> On 09/24/2014 07:08 AM, Jean-Baptiste Onofré wrote:
>>> OK, I see a small mistake in the update of
>>> etc/org.apache.karaf.features.cfg file.
>>>
>>> I gonna fix that.
>>>
>>> Regards
>>> JB
>>>
>>> On 09/23/2014 10:55 PM, Rodrigo Serra wrote:
>>>> Hi JB,
>>>>
>>>> I compile and run the generated assembly in a VM without internet
>>>> access. The resulting assembly has reference to directories of my
>>>> development environment. This is can be see in the karaf log:
>>>>
>>>> 2014-09-23 17:45:33,573 | WARN | FelixStartLevel |
>>>> FeaturesServiceImpl | 20 - org.apache.karaf.features.core
>>>> - 3.0.2.SNAPSHOT | Unable to add features repository
>>>> /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml
>>>> at startup
>>>> java.lang.IllegalArgumentException: invalid URI:
>>>> /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml
>>>>
>>>>
>>>> "/Users/rserra/NetBeansProjects/Lecici/sgc" is the project root on my
>>>> machine.
>>>>
>>>> Another problem was a generation of NPE if a regular jar is on
>>>> dependencies: (is not necessary for my project, I included this
>>>> dependencies in my last intent to generate a completed assembly)
>>>>
>>>> [ERROR] Failed to execute goal
>>>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars)
>>>> on project sgc: Execution default-install-kars of goal
>>>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
>>>> NullPointerException -> [Help 1]
>>>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
>>>> execute goal
>>>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars)
>>>> on project sgc: Execution default-install-kars of goal
>>>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
>>>>
>>>> at
>>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
>>>>
>>>> at
>>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>>>>
>>>> at
>>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>>>>
>>>> at
>>>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
>>>>
>>>> at
>>>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
>>>>
>>>> at
>>>> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>>>>
>>>> at
>>>> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
>>>>
>>>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
>>>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
>>>> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
>>>> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
>>>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
>>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> at
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>
>>>> at
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>
>>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>>> at
>>>> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>>>>
>>>> at
>>>> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>>>>
>>>> at
>>>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>>>>
>>>> at
>>>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
>>>> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
>>>> default-install-kars of goal
>>>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
>>>>
>>>> at
>>>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
>>>>
>>>> at
>>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>>>>
>>>> ... 19 more
>>>> Caused by: java.lang.NullPointerException
>>>> at
>>>> org.apache.karaf.tooling.features.InstallKarsMojo.execute(InstallKarsMojo.java:178)
>>>>
>>>> at
>>>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
>>>>
>>>> ... 20 more
>>>>
>>>>
>>>> Regards,
>>>> Rodrigo
>>>>
>>>> El 23/09/2014, a las 16:28, Jean-Baptiste Onofré <jb...@nanthrax.net>
>>>> escribió:
>>>>
>>>>> Hi guys,
>>>>>
>>>>> as discussed with some of you on IRC, I pushed my refactoring of the
>>>>> karaf-maven-plugin. For now, I only pushed the install-kar goal (I
>>>>> will push the feature-generate-descriptor goal tomorrow).
>>>>>
>>>>> This "new" install-kar goal now work recursively to resolve
>>>>> transitive features repositories and features.
>>>>>
>>>>> It simplifies the custom distribution creation and avoid Karaf to
>>>>> download some "core" artifacts from Internet at startup.
>>>>>
>>>>> If you have some time to test it, it would be helpful.
>>>>>
>>>>> I keep you posted for the other goals.
>>>>>
>>>>> Thanks,
>>>>> Regards
>>>>> JB
>>>>> --
>>>>> Jean-Baptiste Onofré
>>>>> jbonofre@apache.org
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>>
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
OK, let me check (I'm on the Jira about network requirements ;)).
I keep you posted.
Regards
JB
On 09/24/2014 02:59 PM, Rodrigo Serra wrote:
> Hi JB, the resulting distribution. Regards, Rodrigo
>
> El 24/09/2014, a las 09:52, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>
>> Hi Rodrigo,
>>
>> you mean you launch mvn without Internet ?
>> or the resulting distribution on a vm without Internet ?
>>
>> Regards
>> JB
>>
>> On 09/24/2014 02:41 PM, Rodrigo Serra wrote:
>>> Hello JB,
>>>
>>> I try with a reduced version of my pom and i can reproduce problem. The only catch is running the assembly in VM a isolated from internet. This 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>test</groupId>
>>> <artifactId>assembly</artifactId>
>>> <packaging>karaf-assembly</packaging>
>>> <version>1.0.0-SNAPSHOT</version>
>>>
>>> <properties>
>>> <karaf.version>3.0.2-SNAPSHOT</karaf.version>
>>> </properties>
>>>
>>> <name>Test :: Assembly</name>
>>> <dependencies>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <artifactId>framework</artifactId>
>>> <version>${karaf.version}</version>
>>> <type>kar</type>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <version>${karaf.version}</version>
>>> <artifactId>standard</artifactId>
>>> <classifier>features</classifier>
>>> <type>xml</type>
>>> <scope>runtime</scope>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <version>${karaf.version}</version>
>>> <artifactId>enterprise</artifactId>
>>> <classifier>features</classifier>
>>> <type>xml</type>
>>> <scope>runtime</scope>
>>> </dependency>
>>> </dependencies>
>>> <build>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.karaf.tooling</groupId>
>>> <artifactId>karaf-maven-plugin</artifactId>
>>> <version>${karaf.version}</version>
>>> <extensions>true</extensions>
>>> <configuration>
>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>> </configuration>
>>> </plugin>
>>> </plugins>
>>> </build>
>>> </project>
>>>
>>> Regards,
>>> Rodrigo
>>>
>>> El 24/09/2014, a las 09:22, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>>>
>>>> Hi Rodrigo,
>>>>
>>>> unfortunately, I can't fully test your pom as it depends to other artifacts (sgc-features or osgi-derby-feature).
>>>>
>>>> Anyway, it looks good to me (I tested something similar with camel and it works fine).
>>>> So maybe you have some artifacts resolution issue (at bundle level).
>>>>
>>>> If you can send to me (private) the output of mvn -X clean install of your assembly, I can take a look.
>>>>
>>>> Thanks,
>>>> Regards
>>>> JB
>>>>
>>>> On 09/24/2014 11:38 AM, Rodrigo Serra wrote:
>>>>> <?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>
>>>>> <parent>
>>>>> <artifactId>sgc</artifactId>
>>>>> <groupId>ar.com.jlab</groupId>
>>>>> <version>1.1.13-SNAPSHOT</version>
>>>>> </parent>
>>>>>
>>>>> <groupId>ar.com.jlab.sgc.sgc-assembly</groupId>
>>>>> <artifactId>sgc</artifactId>
>>>>> <packaging>karaf-assembly</packaging>
>>>>>
>>>>> <name>SGC :: Assembly</name>
>>>>> <dependencies>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <artifactId>framework</artifactId>
>>>>> <version>${karaf.version}</version>
>>>>> <type>kar</type>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <version>${karaf.version}</version>
>>>>> <artifactId>standard</artifactId>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <version>${karaf.version}</version>
>>>>> <artifactId>enterprise</artifactId>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>ar.com.jlab.sgc.sgc-features</groupId>
>>>>> <artifactId>sgc</artifactId>
>>>>> <version>1.1.13-SNAPSHOT</version>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>ar.com.jlab.osgi.derby</groupId>
>>>>> <artifactId>osgi-derby-feature</artifactId>
>>>>> <version>${osgi-derby.version}</version>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> </dependencies>
>>>>> <build>
>>>>> <resources>
>>>>> <resource>
>>>>> <directory>${pom.basedir}/src/main</directory>
>>>>> <filtering>true</filtering>
>>>>> <includes>
>>>>> <include>**/*</include>
>>>>> </includes>
>>>>> </resource>
>>>>> </resources>
>>>>> <plugins>
>>>>> <plugin>
>>>>> <artifactId>maven-antrun-plugin</artifactId>
>>>>> <version>1.7</version>
>>>>> <executions>
>>>>> <execution>
>>>>> <phase>validate</phase>
>>>>> <goals>
>>>>> <goal>run</goal>
>>>>> </goals>
>>>>> <configuration>
>>>>> <tasks>
>>>>> <property name="versionNumerica" value="${project.version}" />
>>>>> <script language="javascript">
>>>>> var versionNumerica = project.getProperty("versionNumerica");
>>>>> project.setProperty("versionNumerica", versionNumerica.replaceAll("-", "."));
>>>>> </script>
>>>>> </tasks>
>>>>> <exportAntProperties>true</exportAntProperties>
>>>>> </configuration>
>>>>> </execution>
>>>>> </executions>
>>>>> </plugin>
>>>>> <plugin>
>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>> <artifactId>maven-resources-plugin</artifactId>
>>>>> <version>2.6</version>
>>>>> <executions>
>>>>> <execution>
>>>>> <id>resource</id>
>>>>> <phase>prepare-package</phase>
>>>>> <goals>
>>>>> <goal>copy-resources</goal>
>>>>> </goals>
>>>>> <configuration>
>>>>> <resources>
>>>>> <resource>
>>>>> <filtering>true</filtering>
>>>>> <directory>src/main/resources/</directory>
>>>>> </resource>
>>>>> </resources>
>>>>> <outputDirectory>target/assembly</outputDirectory>
>>>>> </configuration>
>>>>> </execution>
>>>>> </executions>
>>>>> </plugin>
>>>>>
>>>>> <plugin>
>>>>> <groupId>org.apache.karaf.tooling</groupId>
>>>>> <artifactId>karaf-maven-plugin</artifactId>
>>>>> <version>${karaf.version}</version>
>>>>> <extensions>true</extensions>
>>>>> <configuration>
>>>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>>>> <bootFeatures>
>>>>> <feature>wrapper</feature>
>>>>> <feature>derby-server</feature>
>>>>> <feature>sgc</feature>
>>>>> </bootFeatures>
>>>>> </configuration>
>>>>> </plugin>
>>>>> </plugins>
>>>>> </build>
>>>>> </project>
>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi,
yes I tested with your pom, and as you didn't provide any
boot/startup/install features, it tries to load all, so some
requirements to Spring bundles.
It's up to you to define the features that you want installed, and part
of boot or startup features. We do the standard Karaf distribution, you
have to decide the features in your custom distribution.
Regards
JB
On 09/25/2014 01:07 PM, Rodrigo Serra wrote:
> Helo JB,
>
> You make the tests with the pom from my previous mail?
>
> I found the problem. I compare the dependencies from my test pom vs dependencies in module "Apache Karaf :: Assemblies :: Default Distribution” and i found a dependency to spring feature:
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <artifactId>spring</artifactId>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
>
> When include this dependency to my pom the resulting assembly works. No more missing bundles.
>
> This is the expected behavior?
>
> Regards,
> Rodrigo
>
> El 25/09/2014, a las 03:11, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>
>> By the way, I tested both Java7 and Java8 successfully (again on CentOS 7 without Internet connection) ;)
>>
>> Regards
>> JB
>>
>> On 09/24/2014 02:59 PM, Rodrigo Serra wrote:
>>> Hi JB, the resulting distribution. Regards, Rodrigo
>>>
>>> El 24/09/2014, a las 09:52, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>>>
>>>> Hi Rodrigo,
>>>>
>>>> you mean you launch mvn without Internet ?
>>>> or the resulting distribution on a vm without Internet ?
>>>>
>>>> Regards
>>>> JB
>>>>
>>>> On 09/24/2014 02:41 PM, Rodrigo Serra wrote:
>>>>> Hello JB,
>>>>>
>>>>> I try with a reduced version of my pom and i can reproduce problem. The only catch is running the assembly in VM a isolated from internet. This 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>test</groupId>
>>>>> <artifactId>assembly</artifactId>
>>>>> <packaging>karaf-assembly</packaging>
>>>>> <version>1.0.0-SNAPSHOT</version>
>>>>>
>>>>> <properties>
>>>>> <karaf.version>3.0.2-SNAPSHOT</karaf.version>
>>>>> </properties>
>>>>>
>>>>> <name>Test :: Assembly</name>
>>>>> <dependencies>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <artifactId>framework</artifactId>
>>>>> <version>${karaf.version}</version>
>>>>> <type>kar</type>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <version>${karaf.version}</version>
>>>>> <artifactId>standard</artifactId>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <version>${karaf.version}</version>
>>>>> <artifactId>enterprise</artifactId>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> </dependencies>
>>>>> <build>
>>>>> <plugins>
>>>>> <plugin>
>>>>> <groupId>org.apache.karaf.tooling</groupId>
>>>>> <artifactId>karaf-maven-plugin</artifactId>
>>>>> <version>${karaf.version}</version>
>>>>> <extensions>true</extensions>
>>>>> <configuration>
>>>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>>>> </configuration>
>>>>> </plugin>
>>>>> </plugins>
>>>>> </build>
>>>>> </project>
>>>>>
>>>>> Regards,
>>>>> Rodrigo
>>>>>
>>>>> El 24/09/2014, a las 09:22, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>>>>>
>>>>>> Hi Rodrigo,
>>>>>>
>>>>>> unfortunately, I can't fully test your pom as it depends to other artifacts (sgc-features or osgi-derby-feature).
>>>>>>
>>>>>> Anyway, it looks good to me (I tested something similar with camel and it works fine).
>>>>>> So maybe you have some artifacts resolution issue (at bundle level).
>>>>>>
>>>>>> If you can send to me (private) the output of mvn -X clean install of your assembly, I can take a look.
>>>>>>
>>>>>> Thanks,
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>> On 09/24/2014 11:38 AM, Rodrigo Serra wrote:
>>>>>>> <?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>
>>>>>>> <parent>
>>>>>>> <artifactId>sgc</artifactId>
>>>>>>> <groupId>ar.com.jlab</groupId>
>>>>>>> <version>1.1.13-SNAPSHOT</version>
>>>>>>> </parent>
>>>>>>>
>>>>>>> <groupId>ar.com.jlab.sgc.sgc-assembly</groupId>
>>>>>>> <artifactId>sgc</artifactId>
>>>>>>> <packaging>karaf-assembly</packaging>
>>>>>>>
>>>>>>> <name>SGC :: Assembly</name>
>>>>>>> <dependencies>
>>>>>>> <dependency>
>>>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>>>> <artifactId>framework</artifactId>
>>>>>>> <version>${karaf.version}</version>
>>>>>>> <type>kar</type>
>>>>>>> </dependency>
>>>>>>> <dependency>
>>>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>>>> <version>${karaf.version}</version>
>>>>>>> <artifactId>standard</artifactId>
>>>>>>> <classifier>features</classifier>
>>>>>>> <type>xml</type>
>>>>>>> <scope>runtime</scope>
>>>>>>> </dependency>
>>>>>>> <dependency>
>>>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>>>> <version>${karaf.version}</version>
>>>>>>> <artifactId>enterprise</artifactId>
>>>>>>> <classifier>features</classifier>
>>>>>>> <type>xml</type>
>>>>>>> <scope>runtime</scope>
>>>>>>> </dependency>
>>>>>>> <dependency>
>>>>>>> <groupId>ar.com.jlab.sgc.sgc-features</groupId>
>>>>>>> <artifactId>sgc</artifactId>
>>>>>>> <version>1.1.13-SNAPSHOT</version>
>>>>>>> <classifier>features</classifier>
>>>>>>> <type>xml</type>
>>>>>>> <scope>runtime</scope>
>>>>>>> </dependency>
>>>>>>> <dependency>
>>>>>>> <groupId>ar.com.jlab.osgi.derby</groupId>
>>>>>>> <artifactId>osgi-derby-feature</artifactId>
>>>>>>> <version>${osgi-derby.version}</version>
>>>>>>> <classifier>features</classifier>
>>>>>>> <type>xml</type>
>>>>>>> <scope>runtime</scope>
>>>>>>> </dependency>
>>>>>>> </dependencies>
>>>>>>> <build>
>>>>>>> <resources>
>>>>>>> <resource>
>>>>>>> <directory>${pom.basedir}/src/main</directory>
>>>>>>> <filtering>true</filtering>
>>>>>>> <includes>
>>>>>>> <include>**/*</include>
>>>>>>> </includes>
>>>>>>> </resource>
>>>>>>> </resources>
>>>>>>> <plugins>
>>>>>>> <plugin>
>>>>>>> <artifactId>maven-antrun-plugin</artifactId>
>>>>>>> <version>1.7</version>
>>>>>>> <executions>
>>>>>>> <execution>
>>>>>>> <phase>validate</phase>
>>>>>>> <goals>
>>>>>>> <goal>run</goal>
>>>>>>> </goals>
>>>>>>> <configuration>
>>>>>>> <tasks>
>>>>>>> <property name="versionNumerica" value="${project.version}" />
>>>>>>> <script language="javascript">
>>>>>>> var versionNumerica = project.getProperty("versionNumerica");
>>>>>>> project.setProperty("versionNumerica", versionNumerica.replaceAll("-", "."));
>>>>>>> </script>
>>>>>>> </tasks>
>>>>>>> <exportAntProperties>true</exportAntProperties>
>>>>>>> </configuration>
>>>>>>> </execution>
>>>>>>> </executions>
>>>>>>> </plugin>
>>>>>>> <plugin>
>>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>>> <artifactId>maven-resources-plugin</artifactId>
>>>>>>> <version>2.6</version>
>>>>>>> <executions>
>>>>>>> <execution>
>>>>>>> <id>resource</id>
>>>>>>> <phase>prepare-package</phase>
>>>>>>> <goals>
>>>>>>> <goal>copy-resources</goal>
>>>>>>> </goals>
>>>>>>> <configuration>
>>>>>>> <resources>
>>>>>>> <resource>
>>>>>>> <filtering>true</filtering>
>>>>>>> <directory>src/main/resources/</directory>
>>>>>>> </resource>
>>>>>>> </resources>
>>>>>>> <outputDirectory>target/assembly</outputDirectory>
>>>>>>> </configuration>
>>>>>>> </execution>
>>>>>>> </executions>
>>>>>>> </plugin>
>>>>>>>
>>>>>>> <plugin>
>>>>>>> <groupId>org.apache.karaf.tooling</groupId>
>>>>>>> <artifactId>karaf-maven-plugin</artifactId>
>>>>>>> <version>${karaf.version}</version>
>>>>>>> <extensions>true</extensions>
>>>>>>> <configuration>
>>>>>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>>>>>> <bootFeatures>
>>>>>>> <feature>wrapper</feature>
>>>>>>> <feature>derby-server</feature>
>>>>>>> <feature>sgc</feature>
>>>>>>> </bootFeatures>
>>>>>>> </configuration>
>>>>>>> </plugin>
>>>>>>> </plugins>
>>>>>>> </build>
>>>>>>> </project>
>>>>>>
>>>>>> --
>>>>>> Jean-Baptiste Onofré
>>>>>> jbonofre@apache.org
>>>>>> http://blog.nanthrax.net
>>>>>> Talend - http://www.talend.com
>>>>>
>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Rodrigo Serra <ro...@jlab.com.ar>.
Helo JB,
You make the tests with the pom from my previous mail?
I found the problem. I compare the dependencies from my test pom vs dependencies in module "Apache Karaf :: Assemblies :: Default Distribution” and i found a dependency to spring feature:
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>spring</artifactId>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
When include this dependency to my pom the resulting assembly works. No more missing bundles.
This is the expected behavior?
Regards,
Rodrigo
El 25/09/2014, a las 03:11, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
> By the way, I tested both Java7 and Java8 successfully (again on CentOS 7 without Internet connection) ;)
>
> Regards
> JB
>
> On 09/24/2014 02:59 PM, Rodrigo Serra wrote:
>> Hi JB, the resulting distribution. Regards, Rodrigo
>>
>> El 24/09/2014, a las 09:52, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>>
>>> Hi Rodrigo,
>>>
>>> you mean you launch mvn without Internet ?
>>> or the resulting distribution on a vm without Internet ?
>>>
>>> Regards
>>> JB
>>>
>>> On 09/24/2014 02:41 PM, Rodrigo Serra wrote:
>>>> Hello JB,
>>>>
>>>> I try with a reduced version of my pom and i can reproduce problem. The only catch is running the assembly in VM a isolated from internet. This 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>test</groupId>
>>>> <artifactId>assembly</artifactId>
>>>> <packaging>karaf-assembly</packaging>
>>>> <version>1.0.0-SNAPSHOT</version>
>>>>
>>>> <properties>
>>>> <karaf.version>3.0.2-SNAPSHOT</karaf.version>
>>>> </properties>
>>>>
>>>> <name>Test :: Assembly</name>
>>>> <dependencies>
>>>> <dependency>
>>>> <groupId>org.apache.karaf.features</groupId>
>>>> <artifactId>framework</artifactId>
>>>> <version>${karaf.version}</version>
>>>> <type>kar</type>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>org.apache.karaf.features</groupId>
>>>> <version>${karaf.version}</version>
>>>> <artifactId>standard</artifactId>
>>>> <classifier>features</classifier>
>>>> <type>xml</type>
>>>> <scope>runtime</scope>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>org.apache.karaf.features</groupId>
>>>> <version>${karaf.version}</version>
>>>> <artifactId>enterprise</artifactId>
>>>> <classifier>features</classifier>
>>>> <type>xml</type>
>>>> <scope>runtime</scope>
>>>> </dependency>
>>>> </dependencies>
>>>> <build>
>>>> <plugins>
>>>> <plugin>
>>>> <groupId>org.apache.karaf.tooling</groupId>
>>>> <artifactId>karaf-maven-plugin</artifactId>
>>>> <version>${karaf.version}</version>
>>>> <extensions>true</extensions>
>>>> <configuration>
>>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>>> </configuration>
>>>> </plugin>
>>>> </plugins>
>>>> </build>
>>>> </project>
>>>>
>>>> Regards,
>>>> Rodrigo
>>>>
>>>> El 24/09/2014, a las 09:22, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>>>>
>>>>> Hi Rodrigo,
>>>>>
>>>>> unfortunately, I can't fully test your pom as it depends to other artifacts (sgc-features or osgi-derby-feature).
>>>>>
>>>>> Anyway, it looks good to me (I tested something similar with camel and it works fine).
>>>>> So maybe you have some artifacts resolution issue (at bundle level).
>>>>>
>>>>> If you can send to me (private) the output of mvn -X clean install of your assembly, I can take a look.
>>>>>
>>>>> Thanks,
>>>>> Regards
>>>>> JB
>>>>>
>>>>> On 09/24/2014 11:38 AM, Rodrigo Serra wrote:
>>>>>> <?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>
>>>>>> <parent>
>>>>>> <artifactId>sgc</artifactId>
>>>>>> <groupId>ar.com.jlab</groupId>
>>>>>> <version>1.1.13-SNAPSHOT</version>
>>>>>> </parent>
>>>>>>
>>>>>> <groupId>ar.com.jlab.sgc.sgc-assembly</groupId>
>>>>>> <artifactId>sgc</artifactId>
>>>>>> <packaging>karaf-assembly</packaging>
>>>>>>
>>>>>> <name>SGC :: Assembly</name>
>>>>>> <dependencies>
>>>>>> <dependency>
>>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>>> <artifactId>framework</artifactId>
>>>>>> <version>${karaf.version}</version>
>>>>>> <type>kar</type>
>>>>>> </dependency>
>>>>>> <dependency>
>>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>>> <version>${karaf.version}</version>
>>>>>> <artifactId>standard</artifactId>
>>>>>> <classifier>features</classifier>
>>>>>> <type>xml</type>
>>>>>> <scope>runtime</scope>
>>>>>> </dependency>
>>>>>> <dependency>
>>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>>> <version>${karaf.version}</version>
>>>>>> <artifactId>enterprise</artifactId>
>>>>>> <classifier>features</classifier>
>>>>>> <type>xml</type>
>>>>>> <scope>runtime</scope>
>>>>>> </dependency>
>>>>>> <dependency>
>>>>>> <groupId>ar.com.jlab.sgc.sgc-features</groupId>
>>>>>> <artifactId>sgc</artifactId>
>>>>>> <version>1.1.13-SNAPSHOT</version>
>>>>>> <classifier>features</classifier>
>>>>>> <type>xml</type>
>>>>>> <scope>runtime</scope>
>>>>>> </dependency>
>>>>>> <dependency>
>>>>>> <groupId>ar.com.jlab.osgi.derby</groupId>
>>>>>> <artifactId>osgi-derby-feature</artifactId>
>>>>>> <version>${osgi-derby.version}</version>
>>>>>> <classifier>features</classifier>
>>>>>> <type>xml</type>
>>>>>> <scope>runtime</scope>
>>>>>> </dependency>
>>>>>> </dependencies>
>>>>>> <build>
>>>>>> <resources>
>>>>>> <resource>
>>>>>> <directory>${pom.basedir}/src/main</directory>
>>>>>> <filtering>true</filtering>
>>>>>> <includes>
>>>>>> <include>**/*</include>
>>>>>> </includes>
>>>>>> </resource>
>>>>>> </resources>
>>>>>> <plugins>
>>>>>> <plugin>
>>>>>> <artifactId>maven-antrun-plugin</artifactId>
>>>>>> <version>1.7</version>
>>>>>> <executions>
>>>>>> <execution>
>>>>>> <phase>validate</phase>
>>>>>> <goals>
>>>>>> <goal>run</goal>
>>>>>> </goals>
>>>>>> <configuration>
>>>>>> <tasks>
>>>>>> <property name="versionNumerica" value="${project.version}" />
>>>>>> <script language="javascript">
>>>>>> var versionNumerica = project.getProperty("versionNumerica");
>>>>>> project.setProperty("versionNumerica", versionNumerica.replaceAll("-", "."));
>>>>>> </script>
>>>>>> </tasks>
>>>>>> <exportAntProperties>true</exportAntProperties>
>>>>>> </configuration>
>>>>>> </execution>
>>>>>> </executions>
>>>>>> </plugin>
>>>>>> <plugin>
>>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>>> <artifactId>maven-resources-plugin</artifactId>
>>>>>> <version>2.6</version>
>>>>>> <executions>
>>>>>> <execution>
>>>>>> <id>resource</id>
>>>>>> <phase>prepare-package</phase>
>>>>>> <goals>
>>>>>> <goal>copy-resources</goal>
>>>>>> </goals>
>>>>>> <configuration>
>>>>>> <resources>
>>>>>> <resource>
>>>>>> <filtering>true</filtering>
>>>>>> <directory>src/main/resources/</directory>
>>>>>> </resource>
>>>>>> </resources>
>>>>>> <outputDirectory>target/assembly</outputDirectory>
>>>>>> </configuration>
>>>>>> </execution>
>>>>>> </executions>
>>>>>> </plugin>
>>>>>>
>>>>>> <plugin>
>>>>>> <groupId>org.apache.karaf.tooling</groupId>
>>>>>> <artifactId>karaf-maven-plugin</artifactId>
>>>>>> <version>${karaf.version}</version>
>>>>>> <extensions>true</extensions>
>>>>>> <configuration>
>>>>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>>>>> <bootFeatures>
>>>>>> <feature>wrapper</feature>
>>>>>> <feature>derby-server</feature>
>>>>>> <feature>sgc</feature>
>>>>>> </bootFeatures>
>>>>>> </configuration>
>>>>>> </plugin>
>>>>>> </plugins>
>>>>>> </build>
>>>>>> </project>
>>>>>
>>>>> --
>>>>> Jean-Baptiste Onofré
>>>>> jbonofre@apache.org
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
By the way, I tested both Java7 and Java8 successfully (again on CentOS
7 without Internet connection) ;)
Regards
JB
On 09/24/2014 02:59 PM, Rodrigo Serra wrote:
> Hi JB, the resulting distribution. Regards, Rodrigo
>
> El 24/09/2014, a las 09:52, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>
>> Hi Rodrigo,
>>
>> you mean you launch mvn without Internet ?
>> or the resulting distribution on a vm without Internet ?
>>
>> Regards
>> JB
>>
>> On 09/24/2014 02:41 PM, Rodrigo Serra wrote:
>>> Hello JB,
>>>
>>> I try with a reduced version of my pom and i can reproduce problem. The only catch is running the assembly in VM a isolated from internet. This 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>test</groupId>
>>> <artifactId>assembly</artifactId>
>>> <packaging>karaf-assembly</packaging>
>>> <version>1.0.0-SNAPSHOT</version>
>>>
>>> <properties>
>>> <karaf.version>3.0.2-SNAPSHOT</karaf.version>
>>> </properties>
>>>
>>> <name>Test :: Assembly</name>
>>> <dependencies>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <artifactId>framework</artifactId>
>>> <version>${karaf.version}</version>
>>> <type>kar</type>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <version>${karaf.version}</version>
>>> <artifactId>standard</artifactId>
>>> <classifier>features</classifier>
>>> <type>xml</type>
>>> <scope>runtime</scope>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <version>${karaf.version}</version>
>>> <artifactId>enterprise</artifactId>
>>> <classifier>features</classifier>
>>> <type>xml</type>
>>> <scope>runtime</scope>
>>> </dependency>
>>> </dependencies>
>>> <build>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.karaf.tooling</groupId>
>>> <artifactId>karaf-maven-plugin</artifactId>
>>> <version>${karaf.version}</version>
>>> <extensions>true</extensions>
>>> <configuration>
>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>> </configuration>
>>> </plugin>
>>> </plugins>
>>> </build>
>>> </project>
>>>
>>> Regards,
>>> Rodrigo
>>>
>>> El 24/09/2014, a las 09:22, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>>>
>>>> Hi Rodrigo,
>>>>
>>>> unfortunately, I can't fully test your pom as it depends to other artifacts (sgc-features or osgi-derby-feature).
>>>>
>>>> Anyway, it looks good to me (I tested something similar with camel and it works fine).
>>>> So maybe you have some artifacts resolution issue (at bundle level).
>>>>
>>>> If you can send to me (private) the output of mvn -X clean install of your assembly, I can take a look.
>>>>
>>>> Thanks,
>>>> Regards
>>>> JB
>>>>
>>>> On 09/24/2014 11:38 AM, Rodrigo Serra wrote:
>>>>> <?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>
>>>>> <parent>
>>>>> <artifactId>sgc</artifactId>
>>>>> <groupId>ar.com.jlab</groupId>
>>>>> <version>1.1.13-SNAPSHOT</version>
>>>>> </parent>
>>>>>
>>>>> <groupId>ar.com.jlab.sgc.sgc-assembly</groupId>
>>>>> <artifactId>sgc</artifactId>
>>>>> <packaging>karaf-assembly</packaging>
>>>>>
>>>>> <name>SGC :: Assembly</name>
>>>>> <dependencies>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <artifactId>framework</artifactId>
>>>>> <version>${karaf.version}</version>
>>>>> <type>kar</type>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <version>${karaf.version}</version>
>>>>> <artifactId>standard</artifactId>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <version>${karaf.version}</version>
>>>>> <artifactId>enterprise</artifactId>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>ar.com.jlab.sgc.sgc-features</groupId>
>>>>> <artifactId>sgc</artifactId>
>>>>> <version>1.1.13-SNAPSHOT</version>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>ar.com.jlab.osgi.derby</groupId>
>>>>> <artifactId>osgi-derby-feature</artifactId>
>>>>> <version>${osgi-derby.version}</version>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> </dependencies>
>>>>> <build>
>>>>> <resources>
>>>>> <resource>
>>>>> <directory>${pom.basedir}/src/main</directory>
>>>>> <filtering>true</filtering>
>>>>> <includes>
>>>>> <include>**/*</include>
>>>>> </includes>
>>>>> </resource>
>>>>> </resources>
>>>>> <plugins>
>>>>> <plugin>
>>>>> <artifactId>maven-antrun-plugin</artifactId>
>>>>> <version>1.7</version>
>>>>> <executions>
>>>>> <execution>
>>>>> <phase>validate</phase>
>>>>> <goals>
>>>>> <goal>run</goal>
>>>>> </goals>
>>>>> <configuration>
>>>>> <tasks>
>>>>> <property name="versionNumerica" value="${project.version}" />
>>>>> <script language="javascript">
>>>>> var versionNumerica = project.getProperty("versionNumerica");
>>>>> project.setProperty("versionNumerica", versionNumerica.replaceAll("-", "."));
>>>>> </script>
>>>>> </tasks>
>>>>> <exportAntProperties>true</exportAntProperties>
>>>>> </configuration>
>>>>> </execution>
>>>>> </executions>
>>>>> </plugin>
>>>>> <plugin>
>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>> <artifactId>maven-resources-plugin</artifactId>
>>>>> <version>2.6</version>
>>>>> <executions>
>>>>> <execution>
>>>>> <id>resource</id>
>>>>> <phase>prepare-package</phase>
>>>>> <goals>
>>>>> <goal>copy-resources</goal>
>>>>> </goals>
>>>>> <configuration>
>>>>> <resources>
>>>>> <resource>
>>>>> <filtering>true</filtering>
>>>>> <directory>src/main/resources/</directory>
>>>>> </resource>
>>>>> </resources>
>>>>> <outputDirectory>target/assembly</outputDirectory>
>>>>> </configuration>
>>>>> </execution>
>>>>> </executions>
>>>>> </plugin>
>>>>>
>>>>> <plugin>
>>>>> <groupId>org.apache.karaf.tooling</groupId>
>>>>> <artifactId>karaf-maven-plugin</artifactId>
>>>>> <version>${karaf.version}</version>
>>>>> <extensions>true</extensions>
>>>>> <configuration>
>>>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>>>> <bootFeatures>
>>>>> <feature>wrapper</feature>
>>>>> <feature>derby-server</feature>
>>>>> <feature>sgc</feature>
>>>>> </bootFeatures>
>>>>> </configuration>
>>>>> </plugin>
>>>>> </plugins>
>>>>> </build>
>>>>> </project>
>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Rodrigo,
I tested on CentOS 7 VM without Internet connection with latest Karaf
3.0.2-SNAPSHOT, and it starts without problem.
I also tested the installation of the wrapper feature (feature:install
wrapper) which is a "installedFeature" in the install-kar goal: it works
fine as well.
I tested an optional feature like webconsole (feature:install
webconsole) and it fails: which is normal.
So, the Karaf assembly itself is OK.
In your case, your have to define the installedFeature, bootFeatures,
startupFeatures that you want. Take a look on the Karaf assembly.
Regards
JB
On 09/24/2014 02:59 PM, Rodrigo Serra wrote:
> Hi JB, the resulting distribution. Regards, Rodrigo
>
> El 24/09/2014, a las 09:52, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>
>> Hi Rodrigo,
>>
>> you mean you launch mvn without Internet ?
>> or the resulting distribution on a vm without Internet ?
>>
>> Regards
>> JB
>>
>> On 09/24/2014 02:41 PM, Rodrigo Serra wrote:
>>> Hello JB,
>>>
>>> I try with a reduced version of my pom and i can reproduce problem. The only catch is running the assembly in VM a isolated from internet. This 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>test</groupId>
>>> <artifactId>assembly</artifactId>
>>> <packaging>karaf-assembly</packaging>
>>> <version>1.0.0-SNAPSHOT</version>
>>>
>>> <properties>
>>> <karaf.version>3.0.2-SNAPSHOT</karaf.version>
>>> </properties>
>>>
>>> <name>Test :: Assembly</name>
>>> <dependencies>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <artifactId>framework</artifactId>
>>> <version>${karaf.version}</version>
>>> <type>kar</type>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <version>${karaf.version}</version>
>>> <artifactId>standard</artifactId>
>>> <classifier>features</classifier>
>>> <type>xml</type>
>>> <scope>runtime</scope>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <version>${karaf.version}</version>
>>> <artifactId>enterprise</artifactId>
>>> <classifier>features</classifier>
>>> <type>xml</type>
>>> <scope>runtime</scope>
>>> </dependency>
>>> </dependencies>
>>> <build>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.karaf.tooling</groupId>
>>> <artifactId>karaf-maven-plugin</artifactId>
>>> <version>${karaf.version}</version>
>>> <extensions>true</extensions>
>>> <configuration>
>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>> </configuration>
>>> </plugin>
>>> </plugins>
>>> </build>
>>> </project>
>>>
>>> Regards,
>>> Rodrigo
>>>
>>> El 24/09/2014, a las 09:22, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>>>
>>>> Hi Rodrigo,
>>>>
>>>> unfortunately, I can't fully test your pom as it depends to other artifacts (sgc-features or osgi-derby-feature).
>>>>
>>>> Anyway, it looks good to me (I tested something similar with camel and it works fine).
>>>> So maybe you have some artifacts resolution issue (at bundle level).
>>>>
>>>> If you can send to me (private) the output of mvn -X clean install of your assembly, I can take a look.
>>>>
>>>> Thanks,
>>>> Regards
>>>> JB
>>>>
>>>> On 09/24/2014 11:38 AM, Rodrigo Serra wrote:
>>>>> <?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>
>>>>> <parent>
>>>>> <artifactId>sgc</artifactId>
>>>>> <groupId>ar.com.jlab</groupId>
>>>>> <version>1.1.13-SNAPSHOT</version>
>>>>> </parent>
>>>>>
>>>>> <groupId>ar.com.jlab.sgc.sgc-assembly</groupId>
>>>>> <artifactId>sgc</artifactId>
>>>>> <packaging>karaf-assembly</packaging>
>>>>>
>>>>> <name>SGC :: Assembly</name>
>>>>> <dependencies>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <artifactId>framework</artifactId>
>>>>> <version>${karaf.version}</version>
>>>>> <type>kar</type>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <version>${karaf.version}</version>
>>>>> <artifactId>standard</artifactId>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>org.apache.karaf.features</groupId>
>>>>> <version>${karaf.version}</version>
>>>>> <artifactId>enterprise</artifactId>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>ar.com.jlab.sgc.sgc-features</groupId>
>>>>> <artifactId>sgc</artifactId>
>>>>> <version>1.1.13-SNAPSHOT</version>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> <dependency>
>>>>> <groupId>ar.com.jlab.osgi.derby</groupId>
>>>>> <artifactId>osgi-derby-feature</artifactId>
>>>>> <version>${osgi-derby.version}</version>
>>>>> <classifier>features</classifier>
>>>>> <type>xml</type>
>>>>> <scope>runtime</scope>
>>>>> </dependency>
>>>>> </dependencies>
>>>>> <build>
>>>>> <resources>
>>>>> <resource>
>>>>> <directory>${pom.basedir}/src/main</directory>
>>>>> <filtering>true</filtering>
>>>>> <includes>
>>>>> <include>**/*</include>
>>>>> </includes>
>>>>> </resource>
>>>>> </resources>
>>>>> <plugins>
>>>>> <plugin>
>>>>> <artifactId>maven-antrun-plugin</artifactId>
>>>>> <version>1.7</version>
>>>>> <executions>
>>>>> <execution>
>>>>> <phase>validate</phase>
>>>>> <goals>
>>>>> <goal>run</goal>
>>>>> </goals>
>>>>> <configuration>
>>>>> <tasks>
>>>>> <property name="versionNumerica" value="${project.version}" />
>>>>> <script language="javascript">
>>>>> var versionNumerica = project.getProperty("versionNumerica");
>>>>> project.setProperty("versionNumerica", versionNumerica.replaceAll("-", "."));
>>>>> </script>
>>>>> </tasks>
>>>>> <exportAntProperties>true</exportAntProperties>
>>>>> </configuration>
>>>>> </execution>
>>>>> </executions>
>>>>> </plugin>
>>>>> <plugin>
>>>>> <groupId>org.apache.maven.plugins</groupId>
>>>>> <artifactId>maven-resources-plugin</artifactId>
>>>>> <version>2.6</version>
>>>>> <executions>
>>>>> <execution>
>>>>> <id>resource</id>
>>>>> <phase>prepare-package</phase>
>>>>> <goals>
>>>>> <goal>copy-resources</goal>
>>>>> </goals>
>>>>> <configuration>
>>>>> <resources>
>>>>> <resource>
>>>>> <filtering>true</filtering>
>>>>> <directory>src/main/resources/</directory>
>>>>> </resource>
>>>>> </resources>
>>>>> <outputDirectory>target/assembly</outputDirectory>
>>>>> </configuration>
>>>>> </execution>
>>>>> </executions>
>>>>> </plugin>
>>>>>
>>>>> <plugin>
>>>>> <groupId>org.apache.karaf.tooling</groupId>
>>>>> <artifactId>karaf-maven-plugin</artifactId>
>>>>> <version>${karaf.version}</version>
>>>>> <extensions>true</extensions>
>>>>> <configuration>
>>>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>>>> <bootFeatures>
>>>>> <feature>wrapper</feature>
>>>>> <feature>derby-server</feature>
>>>>> <feature>sgc</feature>
>>>>> </bootFeatures>
>>>>> </configuration>
>>>>> </plugin>
>>>>> </plugins>
>>>>> </build>
>>>>> </project>
>>>>
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Rodrigo Serra <ro...@jlab.com.ar>.
Hi JB, the resulting distribution. Regards, Rodrigo
El 24/09/2014, a las 09:52, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
> Hi Rodrigo,
>
> you mean you launch mvn without Internet ?
> or the resulting distribution on a vm without Internet ?
>
> Regards
> JB
>
> On 09/24/2014 02:41 PM, Rodrigo Serra wrote:
>> Hello JB,
>>
>> I try with a reduced version of my pom and i can reproduce problem. The only catch is running the assembly in VM a isolated from internet. This 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>test</groupId>
>> <artifactId>assembly</artifactId>
>> <packaging>karaf-assembly</packaging>
>> <version>1.0.0-SNAPSHOT</version>
>>
>> <properties>
>> <karaf.version>3.0.2-SNAPSHOT</karaf.version>
>> </properties>
>>
>> <name>Test :: Assembly</name>
>> <dependencies>
>> <dependency>
>> <groupId>org.apache.karaf.features</groupId>
>> <artifactId>framework</artifactId>
>> <version>${karaf.version}</version>
>> <type>kar</type>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.karaf.features</groupId>
>> <version>${karaf.version}</version>
>> <artifactId>standard</artifactId>
>> <classifier>features</classifier>
>> <type>xml</type>
>> <scope>runtime</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.karaf.features</groupId>
>> <version>${karaf.version}</version>
>> <artifactId>enterprise</artifactId>
>> <classifier>features</classifier>
>> <type>xml</type>
>> <scope>runtime</scope>
>> </dependency>
>> </dependencies>
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.karaf.tooling</groupId>
>> <artifactId>karaf-maven-plugin</artifactId>
>> <version>${karaf.version}</version>
>> <extensions>true</extensions>
>> <configuration>
>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>> </project>
>>
>> Regards,
>> Rodrigo
>>
>> El 24/09/2014, a las 09:22, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>>
>>> Hi Rodrigo,
>>>
>>> unfortunately, I can't fully test your pom as it depends to other artifacts (sgc-features or osgi-derby-feature).
>>>
>>> Anyway, it looks good to me (I tested something similar with camel and it works fine).
>>> So maybe you have some artifacts resolution issue (at bundle level).
>>>
>>> If you can send to me (private) the output of mvn -X clean install of your assembly, I can take a look.
>>>
>>> Thanks,
>>> Regards
>>> JB
>>>
>>> On 09/24/2014 11:38 AM, Rodrigo Serra wrote:
>>>> <?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>
>>>> <parent>
>>>> <artifactId>sgc</artifactId>
>>>> <groupId>ar.com.jlab</groupId>
>>>> <version>1.1.13-SNAPSHOT</version>
>>>> </parent>
>>>>
>>>> <groupId>ar.com.jlab.sgc.sgc-assembly</groupId>
>>>> <artifactId>sgc</artifactId>
>>>> <packaging>karaf-assembly</packaging>
>>>>
>>>> <name>SGC :: Assembly</name>
>>>> <dependencies>
>>>> <dependency>
>>>> <groupId>org.apache.karaf.features</groupId>
>>>> <artifactId>framework</artifactId>
>>>> <version>${karaf.version}</version>
>>>> <type>kar</type>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>org.apache.karaf.features</groupId>
>>>> <version>${karaf.version}</version>
>>>> <artifactId>standard</artifactId>
>>>> <classifier>features</classifier>
>>>> <type>xml</type>
>>>> <scope>runtime</scope>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>org.apache.karaf.features</groupId>
>>>> <version>${karaf.version}</version>
>>>> <artifactId>enterprise</artifactId>
>>>> <classifier>features</classifier>
>>>> <type>xml</type>
>>>> <scope>runtime</scope>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>ar.com.jlab.sgc.sgc-features</groupId>
>>>> <artifactId>sgc</artifactId>
>>>> <version>1.1.13-SNAPSHOT</version>
>>>> <classifier>features</classifier>
>>>> <type>xml</type>
>>>> <scope>runtime</scope>
>>>> </dependency>
>>>> <dependency>
>>>> <groupId>ar.com.jlab.osgi.derby</groupId>
>>>> <artifactId>osgi-derby-feature</artifactId>
>>>> <version>${osgi-derby.version}</version>
>>>> <classifier>features</classifier>
>>>> <type>xml</type>
>>>> <scope>runtime</scope>
>>>> </dependency>
>>>> </dependencies>
>>>> <build>
>>>> <resources>
>>>> <resource>
>>>> <directory>${pom.basedir}/src/main</directory>
>>>> <filtering>true</filtering>
>>>> <includes>
>>>> <include>**/*</include>
>>>> </includes>
>>>> </resource>
>>>> </resources>
>>>> <plugins>
>>>> <plugin>
>>>> <artifactId>maven-antrun-plugin</artifactId>
>>>> <version>1.7</version>
>>>> <executions>
>>>> <execution>
>>>> <phase>validate</phase>
>>>> <goals>
>>>> <goal>run</goal>
>>>> </goals>
>>>> <configuration>
>>>> <tasks>
>>>> <property name="versionNumerica" value="${project.version}" />
>>>> <script language="javascript">
>>>> var versionNumerica = project.getProperty("versionNumerica");
>>>> project.setProperty("versionNumerica", versionNumerica.replaceAll("-", "."));
>>>> </script>
>>>> </tasks>
>>>> <exportAntProperties>true</exportAntProperties>
>>>> </configuration>
>>>> </execution>
>>>> </executions>
>>>> </plugin>
>>>> <plugin>
>>>> <groupId>org.apache.maven.plugins</groupId>
>>>> <artifactId>maven-resources-plugin</artifactId>
>>>> <version>2.6</version>
>>>> <executions>
>>>> <execution>
>>>> <id>resource</id>
>>>> <phase>prepare-package</phase>
>>>> <goals>
>>>> <goal>copy-resources</goal>
>>>> </goals>
>>>> <configuration>
>>>> <resources>
>>>> <resource>
>>>> <filtering>true</filtering>
>>>> <directory>src/main/resources/</directory>
>>>> </resource>
>>>> </resources>
>>>> <outputDirectory>target/assembly</outputDirectory>
>>>> </configuration>
>>>> </execution>
>>>> </executions>
>>>> </plugin>
>>>>
>>>> <plugin>
>>>> <groupId>org.apache.karaf.tooling</groupId>
>>>> <artifactId>karaf-maven-plugin</artifactId>
>>>> <version>${karaf.version}</version>
>>>> <extensions>true</extensions>
>>>> <configuration>
>>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>>> <bootFeatures>
>>>> <feature>wrapper</feature>
>>>> <feature>derby-server</feature>
>>>> <feature>sgc</feature>
>>>> </bootFeatures>
>>>> </configuration>
>>>> </plugin>
>>>> </plugins>
>>>> </build>
>>>> </project>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Rodrigo,
you mean you launch mvn without Internet ?
or the resulting distribution on a vm without Internet ?
Regards
JB
On 09/24/2014 02:41 PM, Rodrigo Serra wrote:
> Hello JB,
>
> I try with a reduced version of my pom and i can reproduce problem. The only catch is running the assembly in VM a isolated from internet. This 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>test</groupId>
> <artifactId>assembly</artifactId>
> <packaging>karaf-assembly</packaging>
> <version>1.0.0-SNAPSHOT</version>
>
> <properties>
> <karaf.version>3.0.2-SNAPSHOT</karaf.version>
> </properties>
>
> <name>Test :: Assembly</name>
> <dependencies>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <artifactId>framework</artifactId>
> <version>${karaf.version}</version>
> <type>kar</type>
> </dependency>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <version>${karaf.version}</version>
> <artifactId>standard</artifactId>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <version>${karaf.version}</version>
> <artifactId>enterprise</artifactId>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.karaf.tooling</groupId>
> <artifactId>karaf-maven-plugin</artifactId>
> <version>${karaf.version}</version>
> <extensions>true</extensions>
> <configuration>
> <resourcesDir>${basedir}/target/resources</resourcesDir>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
>
> Regards,
> Rodrigo
>
> El 24/09/2014, a las 09:22, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>
>> Hi Rodrigo,
>>
>> unfortunately, I can't fully test your pom as it depends to other artifacts (sgc-features or osgi-derby-feature).
>>
>> Anyway, it looks good to me (I tested something similar with camel and it works fine).
>> So maybe you have some artifacts resolution issue (at bundle level).
>>
>> If you can send to me (private) the output of mvn -X clean install of your assembly, I can take a look.
>>
>> Thanks,
>> Regards
>> JB
>>
>> On 09/24/2014 11:38 AM, Rodrigo Serra wrote:
>>> <?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>
>>> <parent>
>>> <artifactId>sgc</artifactId>
>>> <groupId>ar.com.jlab</groupId>
>>> <version>1.1.13-SNAPSHOT</version>
>>> </parent>
>>>
>>> <groupId>ar.com.jlab.sgc.sgc-assembly</groupId>
>>> <artifactId>sgc</artifactId>
>>> <packaging>karaf-assembly</packaging>
>>>
>>> <name>SGC :: Assembly</name>
>>> <dependencies>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <artifactId>framework</artifactId>
>>> <version>${karaf.version}</version>
>>> <type>kar</type>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <version>${karaf.version}</version>
>>> <artifactId>standard</artifactId>
>>> <classifier>features</classifier>
>>> <type>xml</type>
>>> <scope>runtime</scope>
>>> </dependency>
>>> <dependency>
>>> <groupId>org.apache.karaf.features</groupId>
>>> <version>${karaf.version}</version>
>>> <artifactId>enterprise</artifactId>
>>> <classifier>features</classifier>
>>> <type>xml</type>
>>> <scope>runtime</scope>
>>> </dependency>
>>> <dependency>
>>> <groupId>ar.com.jlab.sgc.sgc-features</groupId>
>>> <artifactId>sgc</artifactId>
>>> <version>1.1.13-SNAPSHOT</version>
>>> <classifier>features</classifier>
>>> <type>xml</type>
>>> <scope>runtime</scope>
>>> </dependency>
>>> <dependency>
>>> <groupId>ar.com.jlab.osgi.derby</groupId>
>>> <artifactId>osgi-derby-feature</artifactId>
>>> <version>${osgi-derby.version}</version>
>>> <classifier>features</classifier>
>>> <type>xml</type>
>>> <scope>runtime</scope>
>>> </dependency>
>>> </dependencies>
>>> <build>
>>> <resources>
>>> <resource>
>>> <directory>${pom.basedir}/src/main</directory>
>>> <filtering>true</filtering>
>>> <includes>
>>> <include>**/*</include>
>>> </includes>
>>> </resource>
>>> </resources>
>>> <plugins>
>>> <plugin>
>>> <artifactId>maven-antrun-plugin</artifactId>
>>> <version>1.7</version>
>>> <executions>
>>> <execution>
>>> <phase>validate</phase>
>>> <goals>
>>> <goal>run</goal>
>>> </goals>
>>> <configuration>
>>> <tasks>
>>> <property name="versionNumerica" value="${project.version}" />
>>> <script language="javascript">
>>> var versionNumerica = project.getProperty("versionNumerica");
>>> project.setProperty("versionNumerica", versionNumerica.replaceAll("-", "."));
>>> </script>
>>> </tasks>
>>> <exportAntProperties>true</exportAntProperties>
>>> </configuration>
>>> </execution>
>>> </executions>
>>> </plugin>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-resources-plugin</artifactId>
>>> <version>2.6</version>
>>> <executions>
>>> <execution>
>>> <id>resource</id>
>>> <phase>prepare-package</phase>
>>> <goals>
>>> <goal>copy-resources</goal>
>>> </goals>
>>> <configuration>
>>> <resources>
>>> <resource>
>>> <filtering>true</filtering>
>>> <directory>src/main/resources/</directory>
>>> </resource>
>>> </resources>
>>> <outputDirectory>target/assembly</outputDirectory>
>>> </configuration>
>>> </execution>
>>> </executions>
>>> </plugin>
>>>
>>> <plugin>
>>> <groupId>org.apache.karaf.tooling</groupId>
>>> <artifactId>karaf-maven-plugin</artifactId>
>>> <version>${karaf.version}</version>
>>> <extensions>true</extensions>
>>> <configuration>
>>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>>> <bootFeatures>
>>> <feature>wrapper</feature>
>>> <feature>derby-server</feature>
>>> <feature>sgc</feature>
>>> </bootFeatures>
>>> </configuration>
>>> </plugin>
>>> </plugins>
>>> </build>
>>> </project>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Rodrigo Serra <ro...@jlab.com.ar>.
Hello JB,
I try with a reduced version of my pom and i can reproduce problem. The only catch is running the assembly in VM a isolated from internet. This 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>test</groupId>
<artifactId>assembly</artifactId>
<packaging>karaf-assembly</packaging>
<version>1.0.0-SNAPSHOT</version>
<properties>
<karaf.version>3.0.2-SNAPSHOT</karaf.version>
</properties>
<name>Test :: Assembly</name>
<dependencies>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>framework</artifactId>
<version>${karaf.version}</version>
<type>kar</type>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<version>${karaf.version}</version>
<artifactId>standard</artifactId>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<version>${karaf.version}</version>
<artifactId>enterprise</artifactId>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${karaf.version}</version>
<extensions>true</extensions>
<configuration>
<resourcesDir>${basedir}/target/resources</resourcesDir>
</configuration>
</plugin>
</plugins>
</build>
</project>
Regards,
Rodrigo
El 24/09/2014, a las 09:22, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
> Hi Rodrigo,
>
> unfortunately, I can't fully test your pom as it depends to other artifacts (sgc-features or osgi-derby-feature).
>
> Anyway, it looks good to me (I tested something similar with camel and it works fine).
> So maybe you have some artifacts resolution issue (at bundle level).
>
> If you can send to me (private) the output of mvn -X clean install of your assembly, I can take a look.
>
> Thanks,
> Regards
> JB
>
> On 09/24/2014 11:38 AM, Rodrigo Serra wrote:
>> <?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>
>> <parent>
>> <artifactId>sgc</artifactId>
>> <groupId>ar.com.jlab</groupId>
>> <version>1.1.13-SNAPSHOT</version>
>> </parent>
>>
>> <groupId>ar.com.jlab.sgc.sgc-assembly</groupId>
>> <artifactId>sgc</artifactId>
>> <packaging>karaf-assembly</packaging>
>>
>> <name>SGC :: Assembly</name>
>> <dependencies>
>> <dependency>
>> <groupId>org.apache.karaf.features</groupId>
>> <artifactId>framework</artifactId>
>> <version>${karaf.version}</version>
>> <type>kar</type>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.karaf.features</groupId>
>> <version>${karaf.version}</version>
>> <artifactId>standard</artifactId>
>> <classifier>features</classifier>
>> <type>xml</type>
>> <scope>runtime</scope>
>> </dependency>
>> <dependency>
>> <groupId>org.apache.karaf.features</groupId>
>> <version>${karaf.version}</version>
>> <artifactId>enterprise</artifactId>
>> <classifier>features</classifier>
>> <type>xml</type>
>> <scope>runtime</scope>
>> </dependency>
>> <dependency>
>> <groupId>ar.com.jlab.sgc.sgc-features</groupId>
>> <artifactId>sgc</artifactId>
>> <version>1.1.13-SNAPSHOT</version>
>> <classifier>features</classifier>
>> <type>xml</type>
>> <scope>runtime</scope>
>> </dependency>
>> <dependency>
>> <groupId>ar.com.jlab.osgi.derby</groupId>
>> <artifactId>osgi-derby-feature</artifactId>
>> <version>${osgi-derby.version}</version>
>> <classifier>features</classifier>
>> <type>xml</type>
>> <scope>runtime</scope>
>> </dependency>
>> </dependencies>
>> <build>
>> <resources>
>> <resource>
>> <directory>${pom.basedir}/src/main</directory>
>> <filtering>true</filtering>
>> <includes>
>> <include>**/*</include>
>> </includes>
>> </resource>
>> </resources>
>> <plugins>
>> <plugin>
>> <artifactId>maven-antrun-plugin</artifactId>
>> <version>1.7</version>
>> <executions>
>> <execution>
>> <phase>validate</phase>
>> <goals>
>> <goal>run</goal>
>> </goals>
>> <configuration>
>> <tasks>
>> <property name="versionNumerica" value="${project.version}" />
>> <script language="javascript">
>> var versionNumerica = project.getProperty("versionNumerica");
>> project.setProperty("versionNumerica", versionNumerica.replaceAll("-", "."));
>> </script>
>> </tasks>
>> <exportAntProperties>true</exportAntProperties>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-resources-plugin</artifactId>
>> <version>2.6</version>
>> <executions>
>> <execution>
>> <id>resource</id>
>> <phase>prepare-package</phase>
>> <goals>
>> <goal>copy-resources</goal>
>> </goals>
>> <configuration>
>> <resources>
>> <resource>
>> <filtering>true</filtering>
>> <directory>src/main/resources/</directory>
>> </resource>
>> </resources>
>> <outputDirectory>target/assembly</outputDirectory>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>>
>> <plugin>
>> <groupId>org.apache.karaf.tooling</groupId>
>> <artifactId>karaf-maven-plugin</artifactId>
>> <version>${karaf.version}</version>
>> <extensions>true</extensions>
>> <configuration>
>> <resourcesDir>${basedir}/target/resources</resourcesDir>
>> <bootFeatures>
>> <feature>wrapper</feature>
>> <feature>derby-server</feature>
>> <feature>sgc</feature>
>> </bootFeatures>
>> </configuration>
>> </plugin>
>> </plugins>
>> </build>
>> </project>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Rodrigo,
unfortunately, I can't fully test your pom as it depends to other
artifacts (sgc-features or osgi-derby-feature).
Anyway, it looks good to me (I tested something similar with camel and
it works fine).
So maybe you have some artifacts resolution issue (at bundle level).
If you can send to me (private) the output of mvn -X clean install of
your assembly, I can take a look.
Thanks,
Regards
JB
On 09/24/2014 11:38 AM, Rodrigo Serra wrote:
> <?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>
> <parent>
> <artifactId>sgc</artifactId>
> <groupId>ar.com.jlab</groupId>
> <version>1.1.13-SNAPSHOT</version>
> </parent>
>
> <groupId>ar.com.jlab.sgc.sgc-assembly</groupId>
> <artifactId>sgc</artifactId>
> <packaging>karaf-assembly</packaging>
>
> <name>SGC :: Assembly</name>
> <dependencies>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <artifactId>framework</artifactId>
> <version>${karaf.version}</version>
> <type>kar</type>
> </dependency>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <version>${karaf.version}</version>
> <artifactId>standard</artifactId>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>org.apache.karaf.features</groupId>
> <version>${karaf.version}</version>
> <artifactId>enterprise</artifactId>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>ar.com.jlab.sgc.sgc-features</groupId>
> <artifactId>sgc</artifactId>
> <version>1.1.13-SNAPSHOT</version>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
> <dependency>
> <groupId>ar.com.jlab.osgi.derby</groupId>
> <artifactId>osgi-derby-feature</artifactId>
> <version>${osgi-derby.version}</version>
> <classifier>features</classifier>
> <type>xml</type>
> <scope>runtime</scope>
> </dependency>
> </dependencies>
> <build>
> <resources>
> <resource>
> <directory>${pom.basedir}/src/main</directory>
> <filtering>true</filtering>
> <includes>
> <include>**/*</include>
> </includes>
> </resource>
> </resources>
> <plugins>
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <version>1.7</version>
> <executions>
> <execution>
> <phase>validate</phase>
> <goals>
> <goal>run</goal>
> </goals>
> <configuration>
> <tasks>
> <property name="versionNumerica" value="${project.version}" />
> <script language="javascript">
> var versionNumerica = project.getProperty("versionNumerica");
> project.setProperty("versionNumerica", versionNumerica.replaceAll("-", "."));
> </script>
> </tasks>
> <exportAntProperties>true</exportAntProperties>
> </configuration>
> </execution>
> </executions>
> </plugin>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <version>2.6</version>
> <executions>
> <execution>
> <id>resource</id>
> <phase>prepare-package</phase>
> <goals>
> <goal>copy-resources</goal>
> </goals>
> <configuration>
> <resources>
> <resource>
> <filtering>true</filtering>
> <directory>src/main/resources/</directory>
> </resource>
> </resources>
> <outputDirectory>target/assembly</outputDirectory>
> </configuration>
> </execution>
> </executions>
> </plugin>
>
> <plugin>
> <groupId>org.apache.karaf.tooling</groupId>
> <artifactId>karaf-maven-plugin</artifactId>
> <version>${karaf.version}</version>
> <extensions>true</extensions>
> <configuration>
> <resourcesDir>${basedir}/target/resources</resourcesDir>
> <bootFeatures>
> <feature>wrapper</feature>
> <feature>derby-server</feature>
> <feature>sgc</feature>
> </bootFeatures>
> </configuration>
> </plugin>
> </plugins>
> </build>
> </project>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Rodrigo Serra <ro...@jlab.com.ar>.
Hi JB,
I test again and NPE is gone and no more references to my working directory :)
I Have a new problem, I thinks this is related to my project configuration. When start karaf i see errors related to unresolved bundles. Maybe some kars o features dependencies are missing. This is the list of bundles extracted from the log:
org.apache.karaf.features:spring:xml:features:3.0.2-SNAPSHOT
org.apache.karaf.management:org.apache.karaf.management.server
org.apache.karaf.package:org.apache.karaf.package.core:jar:3.0.2-SNAPSHOT
org.apache.mina:mina-core:jar:2.0.7
org.apache.karaf.config:org.apache.karaf.config.core:jar:3.0.2-SNAPSHOT
org.apache.karaf.kar:org.apache.karaf.kar.core:jar:3.0.2-SNAPSHOT
org.apache.karaf.instance:org.apache.karaf.instance.core:jar:3.0.2-SNAPSHOT
org.eclipse.equinox:region:jar:1.0.0.v20110506
This is my pom file:
<?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>
<parent>
<artifactId>sgc</artifactId>
<groupId>ar.com.jlab</groupId>
<version>1.1.13-SNAPSHOT</version>
</parent>
<groupId>ar.com.jlab.sgc.sgc-assembly</groupId>
<artifactId>sgc</artifactId>
<packaging>karaf-assembly</packaging>
<name>SGC :: Assembly</name>
<dependencies>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<artifactId>framework</artifactId>
<version>${karaf.version}</version>
<type>kar</type>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<version>${karaf.version}</version>
<artifactId>standard</artifactId>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.karaf.features</groupId>
<version>${karaf.version}</version>
<artifactId>enterprise</artifactId>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>ar.com.jlab.sgc.sgc-features</groupId>
<artifactId>sgc</artifactId>
<version>1.1.13-SNAPSHOT</version>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>ar.com.jlab.osgi.derby</groupId>
<artifactId>osgi-derby-feature</artifactId>
<version>${osgi-derby.version}</version>
<classifier>features</classifier>
<type>xml</type>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>${pom.basedir}/src/main</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<property name="versionNumerica" value="${project.version}" />
<script language="javascript">
var versionNumerica = project.getProperty("versionNumerica");
project.setProperty("versionNumerica", versionNumerica.replaceAll("-", "."));
</script>
</tasks>
<exportAntProperties>true</exportAntProperties>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>resource</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources/</directory>
</resource>
</resources>
<outputDirectory>target/assembly</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.karaf.tooling</groupId>
<artifactId>karaf-maven-plugin</artifactId>
<version>${karaf.version}</version>
<extensions>true</extensions>
<configuration>
<resourcesDir>${basedir}/target/resources</resourcesDir>
<bootFeatures>
<feature>wrapper</feature>
<feature>derby-server</feature>
<feature>sgc</feature>
</bootFeatures>
</configuration>
</plugin>
</plugins>
</build>
</project>
El 24/09/2014, a las 03:46, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
> I fixed it.
>
> I'm preparing some tests.
>
> Regards
> JB
>
> On 09/24/2014 07:08 AM, Jean-Baptiste Onofré wrote:
>> OK, I see a small mistake in the update of
>> etc/org.apache.karaf.features.cfg file.
>>
>> I gonna fix that.
>>
>> Regards
>> JB
>>
>> On 09/23/2014 10:55 PM, Rodrigo Serra wrote:
>>> Hi JB,
>>>
>>> I compile and run the generated assembly in a VM without internet
>>> access. The resulting assembly has reference to directories of my
>>> development environment. This is can be see in the karaf log:
>>>
>>> 2014-09-23 17:45:33,573 | WARN | FelixStartLevel |
>>> FeaturesServiceImpl | 20 - org.apache.karaf.features.core
>>> - 3.0.2.SNAPSHOT | Unable to add features repository
>>> /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml
>>> at startup
>>> java.lang.IllegalArgumentException: invalid URI:
>>> /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml
>>>
>>>
>>> "/Users/rserra/NetBeansProjects/Lecici/sgc" is the project root on my
>>> machine.
>>>
>>> Another problem was a generation of NPE if a regular jar is on
>>> dependencies: (is not necessary for my project, I included this
>>> dependencies in my last intent to generate a completed assembly)
>>>
>>> [ERROR] Failed to execute goal
>>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars)
>>> on project sgc: Execution default-install-kars of goal
>>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
>>> NullPointerException -> [Help 1]
>>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
>>> execute goal
>>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars)
>>> on project sgc: Execution default-install-kars of goal
>>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
>>>
>>> at
>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
>>>
>>> at
>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>>>
>>> at
>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>>>
>>> at
>>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
>>>
>>> at
>>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
>>>
>>> at
>>> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>>>
>>> at
>>> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
>>>
>>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
>>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
>>> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
>>> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
>>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
>>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>> at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>
>>> at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>
>>> at java.lang.reflect.Method.invoke(Method.java:606)
>>> at
>>> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>>>
>>> at
>>> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>>>
>>> at
>>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>>>
>>> at
>>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
>>> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
>>> default-install-kars of goal
>>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
>>>
>>> at
>>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
>>>
>>> at
>>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>>>
>>> ... 19 more
>>> Caused by: java.lang.NullPointerException
>>> at
>>> org.apache.karaf.tooling.features.InstallKarsMojo.execute(InstallKarsMojo.java:178)
>>>
>>> at
>>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
>>>
>>> ... 20 more
>>>
>>>
>>> Regards,
>>> Rodrigo
>>>
>>> El 23/09/2014, a las 16:28, Jean-Baptiste Onofré <jb...@nanthrax.net>
>>> escribió:
>>>
>>>> Hi guys,
>>>>
>>>> as discussed with some of you on IRC, I pushed my refactoring of the
>>>> karaf-maven-plugin. For now, I only pushed the install-kar goal (I
>>>> will push the feature-generate-descriptor goal tomorrow).
>>>>
>>>> This "new" install-kar goal now work recursively to resolve
>>>> transitive features repositories and features.
>>>>
>>>> It simplifies the custom distribution creation and avoid Karaf to
>>>> download some "core" artifacts from Internet at startup.
>>>>
>>>> If you have some time to test it, it would be helpful.
>>>>
>>>> I keep you posted for the other goals.
>>>>
>>>> Thanks,
>>>> Regards
>>>> JB
>>>> --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
I fixed it.
I'm preparing some tests.
Regards
JB
On 09/24/2014 07:08 AM, Jean-Baptiste Onofré wrote:
> OK, I see a small mistake in the update of
> etc/org.apache.karaf.features.cfg file.
>
> I gonna fix that.
>
> Regards
> JB
>
> On 09/23/2014 10:55 PM, Rodrigo Serra wrote:
>> Hi JB,
>>
>> I compile and run the generated assembly in a VM without internet
>> access. The resulting assembly has reference to directories of my
>> development environment. This is can be see in the karaf log:
>>
>> 2014-09-23 17:45:33,573 | WARN | FelixStartLevel |
>> FeaturesServiceImpl | 20 - org.apache.karaf.features.core
>> - 3.0.2.SNAPSHOT | Unable to add features repository
>> /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml
>> at startup
>> java.lang.IllegalArgumentException: invalid URI:
>> /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml
>>
>>
>> "/Users/rserra/NetBeansProjects/Lecici/sgc" is the project root on my
>> machine.
>>
>> Another problem was a generation of NPE if a regular jar is on
>> dependencies: (is not necessary for my project, I included this
>> dependencies in my last intent to generate a completed assembly)
>>
>> [ERROR] Failed to execute goal
>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars)
>> on project sgc: Execution default-install-kars of goal
>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
>> NullPointerException -> [Help 1]
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
>> execute goal
>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars)
>> on project sgc: Execution default-install-kars of goal
>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
>>
>> at
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
>>
>> at
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
>>
>> at
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
>>
>> at
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
>>
>> at
>> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
>>
>> at
>> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
>>
>> at
>> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
>>
>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
>> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
>> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>
>> at java.lang.reflect.Method.invoke(Method.java:606)
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
>>
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
>>
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
>>
>> at
>> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
>> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
>> default-install-kars of goal
>> org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
>>
>> at
>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
>>
>> at
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
>>
>> ... 19 more
>> Caused by: java.lang.NullPointerException
>> at
>> org.apache.karaf.tooling.features.InstallKarsMojo.execute(InstallKarsMojo.java:178)
>>
>> at
>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
>>
>> ... 20 more
>>
>>
>> Regards,
>> Rodrigo
>>
>> El 23/09/2014, a las 16:28, Jean-Baptiste Onofré <jb...@nanthrax.net>
>> escribió:
>>
>>> Hi guys,
>>>
>>> as discussed with some of you on IRC, I pushed my refactoring of the
>>> karaf-maven-plugin. For now, I only pushed the install-kar goal (I
>>> will push the feature-generate-descriptor goal tomorrow).
>>>
>>> This "new" install-kar goal now work recursively to resolve
>>> transitive features repositories and features.
>>>
>>> It simplifies the custom distribution creation and avoid Karaf to
>>> download some "core" artifacts from Internet at startup.
>>>
>>> If you have some time to test it, it would be helpful.
>>>
>>> I keep you posted for the other goals.
>>>
>>> Thanks,
>>> Regards
>>> JB
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
OK, I see a small mistake in the update of
etc/org.apache.karaf.features.cfg file.
I gonna fix that.
Regards
JB
On 09/23/2014 10:55 PM, Rodrigo Serra wrote:
> Hi JB,
>
> I compile and run the generated assembly in a VM without internet access. The resulting assembly has reference to directories of my development environment. This is can be see in the karaf log:
>
> 2014-09-23 17:45:33,573 | WARN | FelixStartLevel | FeaturesServiceImpl | 20 - org.apache.karaf.features.core - 3.0.2.SNAPSHOT | Unable to add features repository /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml at startup
> java.lang.IllegalArgumentException: invalid URI: /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml
>
> "/Users/rserra/NetBeansProjects/Lecici/sgc" is the project root on my machine.
>
> Another problem was a generation of NPE if a regular jar is on dependencies: (is not necessary for my project, I included this dependencies in my last intent to generate a completed assembly)
>
> [ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars) on project sgc: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed. NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars) on project sgc: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> ... 19 more
> Caused by: java.lang.NullPointerException
> at org.apache.karaf.tooling.features.InstallKarsMojo.execute(InstallKarsMojo.java:178)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
> ... 20 more
>
>
> Regards,
> Rodrigo
>
> El 23/09/2014, a las 16:28, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
>
>> Hi guys,
>>
>> as discussed with some of you on IRC, I pushed my refactoring of the karaf-maven-plugin. For now, I only pushed the install-kar goal (I will push the feature-generate-descriptor goal tomorrow).
>>
>> This "new" install-kar goal now work recursively to resolve transitive features repositories and features.
>>
>> It simplifies the custom distribution creation and avoid Karaf to download some "core" artifacts from Internet at startup.
>>
>> If you have some time to test it, it would be helpful.
>>
>> I keep you posted for the other goals.
>>
>> Thanks,
>> Regards
>> JB
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: [UPDATE] New install-kar goal of karaf-maven-plugin
Posted by Rodrigo Serra <ro...@jlab.com.ar>.
Hi JB,
I compile and run the generated assembly in a VM without internet access. The resulting assembly has reference to directories of my development environment. This is can be see in the karaf log:
2014-09-23 17:45:33,573 | WARN | FelixStartLevel | FeaturesServiceImpl | 20 - org.apache.karaf.features.core - 3.0.2.SNAPSHOT | Unable to add features repository /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml at startup
java.lang.IllegalArgumentException: invalid URI: /Users/rserra/NetBeansProjects/Lecici/sgc/assembly/target/assembly/system/org/apache/karaf/features/framework/3.0.2-SNAPSHOT/framework-3.0.2-SNAPSHOT-features.xml
"/Users/rserra/NetBeansProjects/Lecici/sgc" is the project root on my machine.
Another problem was a generation of NPE if a regular jar is on dependencies: (is not necessary for my project, I included this dependencies in my last intent to generate a completed assembly)
[ERROR] Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars) on project sgc: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars (default-install-kars) on project sgc: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-install-kars of goal org.apache.karaf.tooling:karaf-maven-plugin:3.0.2-SNAPSHOT:install-kars failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: java.lang.NullPointerException
at org.apache.karaf.tooling.features.InstallKarsMojo.execute(InstallKarsMojo.java:178)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
... 20 more
Regards,
Rodrigo
El 23/09/2014, a las 16:28, Jean-Baptiste Onofré <jb...@nanthrax.net> escribió:
> Hi guys,
>
> as discussed with some of you on IRC, I pushed my refactoring of the karaf-maven-plugin. For now, I only pushed the install-kar goal (I will push the feature-generate-descriptor goal tomorrow).
>
> This "new" install-kar goal now work recursively to resolve transitive features repositories and features.
>
> It simplifies the custom distribution creation and avoid Karaf to download some "core" artifacts from Internet at startup.
>
> If you have some time to test it, it would be helpful.
>
> I keep you posted for the other goals.
>
> Thanks,
> Regards
> JB
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com