features:addurl could not be resolved

来源:互联网 发布:爱知产业大学世界排名 编辑:程序博客网 时间:2024/06/05 10:48

  
Welcome, GuestLoginGuest SettingsHelp
This question is answered. Helpful answers available: 2. Correct answers available: 1.

Reply to this ThreadReply to this ThreadSearch ForumSearch ForumBack to Thread ListBack to Thread List

PermlinkReplies: 22 Last Post: May 25, 2012 3:08 PM Last Post By: iocanel 
nicolasduminil 
Posts: 87 
Registered: 02/24/09
How to features:addUrl from maven repository ? 
Posted: May 21, 2012 11:13 AM 
Click to reply to this threadReply
Greetings,

I have a features library that I want to add as a new features URL. It is in the local maven repository. The directory .m2/repository/<group-id>/<artifact-id>/<version> contains the file <group-id>-<artifact-id>-<version>.jar which contains the file my-features.xml.

My command is:

features:addUrl mvn:<group-id>/artifacy-id>/<version>/<group-id>-<artifact-id>-<version>.jar/my-features.xml

but it returns:

Error executing command: URL mvn:<group-id>/<artficat-id>/<version>/<group-id>-<artifact-id>-<version>.jar/my-features.xml could not be resolved.

How am I supposed to do that ?

Many thanks in advance.

Nicolas
iocanel 
Posts: 150 
Registered: 03/16/10
Re: How to features:addUrl from maven repository ? 
Posted: May 21, 2012 11:34 AM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
Hi Nicolas.

The way the feature repo is added depends on the way the feature repo was installed in the maven repo.

The common practice is to install feature repositories as a separate artifact using artifact type=xml and artifact classifier=features.

Then you can use the following command:

features:addurl mvn:<groupId>/<artifactId>/<version>/xml/features

From what I understand what you are trying to do is to wrap the feature inside a jar and then install it from the jar. I am not sure if this is even possible. So I would suggest you to install the features repo as a separate artifact.

Here is a pointer on how you could achieve that using the build-helper-maven-plugin https://github.com/fusesource/fuse/blob/master/esb/fuse-esb/pom.xml line 335.
nicolasduminil 
Posts: 87 
Registered: 02/24/09
Re: How to features:addUrl from maven repository ? 
Posted: May 21, 2012 2:52 PM   in response to: iocanel in response to: iocanel 
Click to reply to this threadReply
Hi,

Many thanks for your reply. The features repo is a separate artifact and, as such, it's build with maven having a packaging type of jar. I'm not sure what the plugin you mentioned does but my understanding is that, as far as you have your features repo in the maven repository, it may only be as a jar. Is that correct ?

Kind regards,

Nicolas
iocanel 
Posts: 150 
Registered: 03/16/10
Re: How to features:addUrl from maven repository ? 
Posted: May 21, 2012 3:14 PM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
Hi Nicolas,

maven allows to use any type you wish and not only jars. 

For example using mvn deploy:deploy-file you can deploy anything (xml, zips, tar.gz or any other extension).

Of course when the artifact installation process is part of your maven build (e.g. using mvn install), maven will install the generated artifact which is usually a jar.

The plugin I proposed allows the user to install additional files and not just the generated jar. All you need to do is to use the plugin, point it to the filtered features.xml file under your target folder and specify the type and classifier.
nicolasduminil 
Posts: 87 
Registered: 02/24/09
Re: How to features:addUrl from maven repository ? 
Posted: May 21, 2012 4:39 PM   in response to: iocanel in response to: iocanel 
Click to reply to this threadReply
Hi,

My POM reads now as follows:

.............................
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<inherited>false</inherited>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>src/main/resources/test.features-1.0.SNAPSHOT-features.xml</file>
<type>xml</type>
<classifier>features</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
..............................

Executing it creates the following files in the maven repository: _maven.repositories, maven_metadata_local.xml, my-features.jar, my-features.pom.

Now how do I add my-features.xml file which is in my-features.jar ?

Kind regards,

Nicolas
iocanel 
Posts: 150 
Registered: 03/16/10
Re: How to features:addUrl from maven repository ? 
Posted: May 21, 2012 7:15 PM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
I think that in general its not a really good idea to attach the artifact directly of the source tree. It's better to pick it up from the target folder, so that you can make use of maven filtering etc (lot easier to maintain).

So if your descriptor is under src/main/resources/features.xml, you can pick it up from
target/classes/features.xml (I would also advice to keep your filenames under the source tree free of versions etc).

You might also need to specify the resources folder in your pom.

<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
nicolasduminil 
Posts: 87 
Registered: 02/24/09
Re: How to features:addUrl from maven repository ? 
Posted: May 22, 2012 10:11 AM   in response to: iocanel in response to: iocanel 
Click to reply to this threadReply
Many thanks again for your time but I'm confused as I'm reading what you're saying and I don't find in your comments any element of response to my question. Maybe I need to come back to my questions which are:

1. Since you said that packaging the feature file in a jar cannot work, what is the correct packaging for a feature repo file and how to do it ?

2. Once the feature repo packaged, what is the correct Karaf command to add its url to the list of the server's feature repositories ? Given that, besides my feature file packaged in a jar sevral XML files are created, like _maven.repository, mavel-metadata-local, etc. which 

Kind regards,

Nicolas
iocanel 
Posts: 150 
Registered: 03/16/10
Re: How to features:addUrl from maven repository ? 
Posted: May 22, 2012 11:03 AM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
Hi Nicolas,

Please find my answers below.

1. Since you said that packaging the feature file in a jar cannot work, what is the correct packaging for a feature repo file and how to do it ?

I initially mentioned that you cannot use the features:addurl command to refer to a features repo file that is inside a jar.

I then pointed you to the most common practice, which is to install the features repo file inside your maven repository as a separate maven artifact (not just wrapped inside a jar).

Please note, that this doesn't mean that you need to change the packaging of your maven project from jar to something else, but that you need to configure additional plugins for that purpose.

So let's get to detailed instructions:

1. You need a maven project with jar packaging.
2. You need to have the feature repo file under your src/main/resources (e.g. src/main/resources/features.xml).
3. You need to configure the builder helper maven plugin to install the feature repo file to the maven repository as an extra artifact (both the jar and the features xml will be installed)
4. Optionally if you need to make use of filtering in your descriptor, you can also configure your resources to be filterred.

A complete project could look like this:

<?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>org.fusesource.example</groupId>
<artifactId>custom-feature</artifactId>
<version>1.0</version>
<packaging>jar</packaging>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>target/classes/features.xml</file>
<type>xml</type>
<classifier>features</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>

2. Once the feature repo packaged, what is the correct Karaf command to add its url to the list of the server's feature repositories ?

After building the project as described in step 1, you'll be able to see inside your maven repository a new file: <artifactId>-<version>-features.xml (in the example posted above the name will be custom-feature-1.0-features.xml).

Then from inside your shell, you can add the feature repo file using the following command:

features:addurl mvn:<groupId>/<artifactId>/<version>/xml/features.

and for the exact example:

features:addurl mvn:org.fusesource.example/custom-feature/1.0/xml/features

I hope this makes things more clear for you.

nicolasduminil 
Posts: 87 
Registered: 02/24/09
Re: How to features:addUrl from maven repository ? 
Posted: May 22, 2012 12:37 PM   in response to: iocanel in response to: iocanel 
Click to reply to this threadReply
Hi,

Many thanks for these details. I don't know if you tested this but, in my case, it doesn't work at all. Once again, here is the POM:

<build>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>attach-artifacts</id>
<phase>package</phase>
<inherited>false</inherited>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>target/classes/test.features-1.0.SNAPSHOT-features.xml</file>
<type>xml</type>
<classifier>features</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

After mvn clean install the following files appear in the maven repository:

_maven.repository:

#NOTE: This is an internal implementation file, its format can be changed without prior notice.
#Tue May 22 14:21:34 CEST 2012
test.features-0.0.1-SNAPSHOT.pom>=
test.features-0.0.1-SNAPSHOT-features.xml>=
test.features-0.0.1-SNAPSHOT.jar>=

maven-data-local.xml:

<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
<groupId>com.unic.delimij.integration</groupId>
<artifactId>test.features</artifactId>
<version>0.0.1-SNAPSHOT</version>
<versioning>
<snapshot>
<localCopy>true</localCopy>
</snapshot>
<lastUpdated>20120522122134</lastUpdated>
<snapshotVersions>
<snapshotVersion>
<classifier>features</classifier>
<extension>xml</extension>
<value>0.0.1-SNAPSHOT</value>
<updated>20120522122134</updated>
</snapshotVersion>
<snapshotVersion>
<extension>jar</extension>
<value>0.0.1-SNAPSHOT</value>
<updated>20120522122134</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>0.0.1-SNAPSHOT</value>
<updated>20120522122134</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
</metadata>

test-features-0.0.1-SNAPSHOT.jar containing my features repo
test-features-0.0.1-SNAPSHOT.pom

No trace of any xml subdirectory and no trace of any features file other then the one in the jar. So I cannot features:addurl mvn:<groupId>/<artifactId>/<version>/xml/features simply because the maven plugin doesn't create, in my case, any xml/feature directory.

What am I missing here ?

Kind regards,

Nicolas
iocanel 
Posts: 150 
Registered: 03/16/10
Re: How to features:addUrl from maven repository ? 
Posted: May 22, 2012 12:52 PM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
Yes I have tested it and posted the complete content of my pom.xml.

The behavior you describe usually means is that maven can't find the file:
<file>target/classes/test.features-1.0.SNAPSHOT-features.xml</file>

To be able to help you further, I would need the complete output of your maven build, to see what is going wrong, in your case.
nicolasduminil 
Posts: 87 
Registered: 02/24/09
Re: How to features:addUrl from maven repository ? 
Posted: May 22, 2012 2:52 PM   in response to: iocanel in response to: iocanel 
Click to reply to this threadReply
Hi,

Many thanks for this update. In order to avoid naming problems and typs I did what I should have done from the beggining, ie naming the features file simply features.xml.
Here is the maven build complete output:

INFO Scanning for projects...
INFO
INFO Reactor Build Order:
INFO 
INFO test.master
INFO UNIC Product :: ActiveMQ Bundle
INFO UNIC Product :: Camel Queue Service Bundle
INFO UNIC Product : Features
INFO UNIC Product :: Model Bundle
INFO UNIC Product :: Persistance Bundle
INFO UNIC Product :: Service Bundle
INFO UNIC Product :: Web Service Bundle
INFO UNIC Product :: Routing Bundle
INFO UNIC Product :: Web layer
INFO UNIC Product :: DB Utility
INFO 
INFO
INFO Building test.master 0.0.1-SNAPSHOT
INFO
INFO 
INFO --- maven-install-plugin:2.3.1:install (default-install) @ test.master ---
INFO Installing D:\projects\workspace\fuse-esb\test.master\pom.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.master\0.0.1-SNAPSHOT\test.master-0.0.1-SNAPSHOT.pom
INFO 
INFO
INFO Building UNIC Product :: ActiveMQ Bundle 0.0.1-SNAPSHOT
INFO
INFO 
INFO --- maven-resources-plugin:2.5:resources (default-resources) @ test.activemq ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 2 resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:compile (default-compile) @ test.activemq ---
INFO Nothing to compile - all classes are up to date
INFO 
INFO --- maven-resources-plugin:2.5:testResources (default-testResources) @ test.activemq ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO skip non existing resourceDirectory D:\projects\workspace\fuse-esb\test.activemq\src\test\resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ test.activemq ---
INFO No sources to compile
INFO 
INFO --- maven-surefire-plugin:2.12:test (default-test) @ test.activemq ---
INFO No tests to run.
INFO Surefire report directory: D:\projects\workspace\fuse-esb\test.activemq\target\surefire-reports


T E S T S


Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

INFO 
INFO --- maven-bundle-plugin:2.0.1:bundle (default-bundle) @ test.activemq ---
WARNING Include-Resource: overriding log4j.properties=src/main/resources/log4j.properties,META-INF/spring/activemq-broker.xml=src/main/resources/META-INF/spring/activemq-broker.xml with src/main/resources (add {maven-resources} if you want to include the maven resources)
WARNING Warning building bundle com.unic.delimij.integration:test.activemq:bundle:0.0.1-SNAPSHOT : Neither Export-Package, Private-Package, -testpackages is set, therefore no packages will be included
WARNING Warning building bundle com.unic.delimij.integration:test.activemq:bundle:0.0.1-SNAPSHOT : Did not find matching referal for *
INFO 
INFO --- maven-install-plugin:2.3.1:install (default-install) @ test.activemq ---
INFO Installing D:\projects\workspace\fuse-esb\test.activemq\target\test.activemq-0.0.1-SNAPSHOT.jar to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.activemq\0.0.1-SNAPSHOT\test.activemq-0.0.1-SNAPSHOT.jar
INFO Installing D:\projects\workspace\fuse-esb\test.activemq\pom.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.activemq\0.0.1-SNAPSHOT\test.activemq-0.0.1-SNAPSHOT.pom
INFO 
INFO --- maven-bundle-plugin:2.0.1:install (default-install) @ test.activemq ---
INFO Parsing file:/C:/Users/nicolas/.m2/repository/repository.xml
INFO Installing com/unic/delimij/integration/test.activemq/0.0.1-SNAPSHOT/test.activemq-0.0.1-SNAPSHOT.jar
INFO Writing OBR metadata
INFO 
INFO
INFO Building UNIC Product :: Camel Queue Service Bundle 0.0.1-SNAPSHOT
INFO
INFO 
INFO --- maven-resources-plugin:2.5:resources (default-resources) @ test.camelqueueservice ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 2 resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:compile (default-compile) @ test.camelqueueservice ---
INFO Nothing to compile - all classes are up to date
INFO 
INFO --- maven-resources-plugin:2.5:testResources (default-testResources) @ test.camelqueueservice ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO skip non existing resourceDirectory D:\projects\workspace\fuse-esb\test.camelqueueservice\src\test\resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ test.camelqueueservice ---
INFO No sources to compile
INFO 
INFO --- maven-surefire-plugin:2.12:test (default-test) @ test.camelqueueservice ---
INFO No tests to run.
INFO Surefire report directory: D:\projects\workspace\fuse-esb\test.camelqueueservice\target\surefire-reports


T E S T S


Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

INFO 
INFO --- maven-bundle-plugin:2.0.1:bundle (default-bundle) @ test.camelqueueservice ---
WARNING Include-Resource: overriding log4j.properties=src/main/resources/log4j.properties,META-INF/spring/osgi-queuingservice.xml=src/main/resources/META-INF/spring/osgi-queuingservice.xml with src/main/resources (add {maven-resources} if you want to include the maven resources)
WARNING Warning building bundle com.unic.delimij.integration:test.camelqueueservice:bundle:0.0.1-SNAPSHOT : Neither Export-Package, Private-Package, -testpackages is set, therefore no packages will be included
WARNING Warning building bundle com.unic.delimij.integration:test.camelqueueservice:bundle:0.0.1-SNAPSHOT : Did not find matching referal for *
INFO 
INFO --- maven-install-plugin:2.3.1:install (default-install) @ test.camelqueueservice ---
INFO Installing D:\projects\workspace\fuse-esb\test.camelqueueservice\target\test.camelqueueservice-0.0.1-SNAPSHOT.jar to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.camelqueueservice\0.0.1-SNAPSHOT\test.camelqueueservice-0.0.1-SNAPSHOT.jar
INFO Installing D:\projects\workspace\fuse-esb\test.camelqueueservice\pom.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.camelqueueservice\0.0.1-SNAPSHOT\test.camelqueueservice-0.0.1-SNAPSHOT.pom
INFO 
INFO --- maven-bundle-plugin:2.0.1:install (default-install) @ test.camelqueueservice ---
INFO Parsing file:/C:/Users/nicolas/.m2/repository/repository.xml
INFO Installing com/unic/delimij/integration/test.camelqueueservice/0.0.1-SNAPSHOT/test.camelqueueservice-0.0.1-SNAPSHOT.jar
INFO Writing OBR metadata
INFO 
INFO
INFO Building UNIC Product : Features 0.0.1-SNAPSHOT
INFO
INFO 
INFO --- maven-resources-plugin:2.5:resources (default-resources) @ test.features ---
debug execute contextualize
WARNING File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 1 resource
INFO 
INFO --- maven-compiler-plugin:2.0.2:compile (default-compile) @ test.features ---
INFO Nothing to compile - all classes are up to date
INFO 
INFO --- maven-resources-plugin:2.5:testResources (default-testResources) @ test.features ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 0 resource
INFO 
INFO --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ test.features ---
INFO Nothing to compile - all classes are up to date
INFO 
INFO --- maven-surefire-plugin:2.10:test (default-test) @ test.features ---
INFO Surefire report directory: D:\projects\workspace\fuse-esb\test.features\target\surefire-reports


T E S T S


Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

INFO 
INFO --- maven-jar-plugin:2.3.2:jar (default-jar) @ test.features ---
INFO Building jar: D:\projects\workspace\fuse-esb\test.features\target\test.features-0.0.1-SNAPSHOT.jar
INFO 
INFO --- build-helper-maven-plugin:1.0:attach-artifact (attach-artifacts) @ test.features ---
INFO 
INFO --- maven-install-plugin:2.3.1:install (default-install) @ test.features ---
INFO Installing D:\projects\workspace\fuse-esb\test.features\target\test.features-0.0.1-SNAPSHOT.jar to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.features\0.0.1-SNAPSHOT\test.features-0.0.1-SNAPSHOT.jar
INFO Installing D:\projects\workspace\fuse-esb\test.features\pom.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.features\0.0.1-SNAPSHOT\test.features-0.0.1-SNAPSHOT.pom
INFO Installing D:\projects\workspace\fuse-esb\test.features\features.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.features\0.0.1-SNAPSHOT\test.features-0.0.1-SNAPSHOT-features.xml
INFO 
INFO
INFO Building UNIC Product :: Model Bundle 0.0.1-SNAPSHOT
INFO
INFO 
INFO --- maven-resources-plugin:2.5:resources (default-resources) @ test.model ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 2 resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:compile (default-compile) @ test.model ---
INFO Compiling 1 source file to D:\projects\workspace\fuse-esb\test.model\target\classes
INFO 
INFO --- maven-resources-plugin:2.5:testResources (default-testResources) @ test.model ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO skip non existing resourceDirectory D:\projects\workspace\fuse-esb\test.model\src\test\resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ test.model ---
INFO No sources to compile
INFO 
INFO --- maven-surefire-plugin:2.12:test (default-test) @ test.model ---
INFO No tests to run.
INFO Surefire report directory: D:\projects\workspace\fuse-esb\test.model\target\surefire-reports


T E S T S


Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

INFO 
INFO --- maven-bundle-plugin:2.0.1:bundle (default-bundle) @ test.model ---
WARNING Warning building bundle com.unic.delimij.integration:test.model:bundle:0.0.1-SNAPSHOT : Instructions in Export-Package that are never used: =META-INF\.org\.apache\.camel\.example\.reportincident\.model, org\.apache\.camel\.example\.reportincident\.model
WARNING Warning building bundle com.unic.delimij.integration:test.model:bundle:0.0.1-SNAPSHOT : Superfluous export-package instructions: http://org.apache.camel.example.reportincident.model
WARNING Warning building bundle com.unic.delimij.integration:test.model:bundle:0.0.1-SNAPSHOT : Exporting packages that are not on the Bundle-ClasspathJar:dot: http://META-INF.org.apache.camel.example.reportincident.model
INFO 
INFO --- maven-install-plugin:2.3.1:install (default-install) @ test.model ---
INFO Installing D:\projects\workspace\fuse-esb\test.model\target\test.model-0.0.1-SNAPSHOT.jar to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.model\0.0.1-SNAPSHOT\test.model-0.0.1-SNAPSHOT.jar
INFO Installing D:\projects\workspace\fuse-esb\test.model\pom.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.model\0.0.1-SNAPSHOT\test.model-0.0.1-SNAPSHOT.pom
INFO 
INFO --- maven-bundle-plugin:2.0.1:install (default-install) @ test.model ---
INFO Parsing file:/C:/Users/nicolas/.m2/repository/repository.xml
INFO Installing com/unic/delimij/integration/test.model/0.0.1-SNAPSHOT/test.model-0.0.1-SNAPSHOT.jar
INFO Writing OBR metadata
INFO 
INFO
INFO Building UNIC Product :: Persistance Bundle 0.0.1-SNAPSHOT
INFO
INFO 
INFO --- maven-resources-plugin:2.5:resources (default-resources) @ test.persistence ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 4 resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:compile (default-compile) @ test.persistence ---
INFO Compiling 2 source files to D:\projects\workspace\fuse-esb\test.persistence\target\classes
INFO 
INFO --- maven-resources-plugin:2.5:testResources (default-testResources) @ test.persistence ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO skip non existing resourceDirectory D:\projects\workspace\fuse-esb\test.persistence\src\test\resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ test.persistence ---
INFO No sources to compile
INFO 
INFO --- maven-surefire-plugin:2.12:test (default-test) @ test.persistence ---
INFO No tests to run.
INFO Surefire report directory: D:\projects\workspace\fuse-esb\test.persistence\target\surefire-reports


T E S T S


Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

INFO 
INFO --- maven-bundle-plugin:2.0.1:bundle (default-bundle) @ test.persistence ---
INFO 
INFO --- maven-install-plugin:2.3.1:install (default-install) @ test.persistence ---
INFO Installing D:\projects\workspace\fuse-esb\test.persistence\target\test.persistence-0.0.1-SNAPSHOT.jar to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.persistence\0.0.1-SNAPSHOT\test.persistence-0.0.1-SNAPSHOT.jar
INFO Installing D:\projects\workspace\fuse-esb\test.persistence\pom.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.persistence\0.0.1-SNAPSHOT\test.persistence-0.0.1-SNAPSHOT.pom
INFO 
INFO --- maven-bundle-plugin:2.0.1:install (default-install) @ test.persistence ---
INFO Parsing file:/C:/Users/nicolas/.m2/repository/repository.xml
INFO Installing com/unic/delimij/integration/test.persistence/0.0.1-SNAPSHOT/test.persistence-0.0.1-SNAPSHOT.jar
INFO Writing OBR metadata
INFO 
INFO
INFO Building UNIC Product :: Service Bundle 0.0.1-SNAPSHOT
INFO
INFO 
INFO --- maven-resources-plugin:2.5:resources (default-resources) @ test.service ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 2 resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:compile (default-compile) @ test.service ---
INFO Compiling 2 source files to D:\projects\workspace\fuse-esb\test.service\target\classes
INFO 
INFO --- maven-resources-plugin:2.5:testResources (default-testResources) @ test.service ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO skip non existing resourceDirectory D:\projects\workspace\fuse-esb\test.service\src\test\resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ test.service ---
INFO No sources to compile
INFO 
INFO --- maven-surefire-plugin:2.12:test (default-test) @ test.service ---
INFO No tests to run.
INFO Surefire report directory: D:\projects\workspace\fuse-esb\test.service\target\surefire-reports


T E S T S


Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

INFO 
INFO --- maven-bundle-plugin:2.0.1:bundle (default-bundle) @ test.service ---
WARNING Warning building bundle com.unic.delimij.integration:test.service:bundle:0.0.1-SNAPSHOT : Instructions in Private-Package, or -testpackages that are never used: com\.unic\.delimij\.integration\.service\.service\.impl
WARNING Warning building bundle com.unic.delimij.integration:test.service:bundle:0.0.1-SNAPSHOT : Instructions in Export-Package that are never used: =META-INF\.wsdl
WARNING Warning building bundle com.unic.delimij.integration:test.service:bundle:0.0.1-SNAPSHOT : Exporting packages that are not on the Bundle-ClasspathJar:dot: http://META-INF.wsdl
INFO 
INFO --- maven-install-plugin:2.3.1:install (default-install) @ test.service ---
INFO Installing D:\projects\workspace\fuse-esb\test.service\target\test.service-0.0.1-SNAPSHOT.jar to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.service\0.0.1-SNAPSHOT\test.service-0.0.1-SNAPSHOT.jar
INFO Installing D:\projects\workspace\fuse-esb\test.service\pom.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.service\0.0.1-SNAPSHOT\test.service-0.0.1-SNAPSHOT.pom
INFO 
INFO --- maven-bundle-plugin:2.0.1:install (default-install) @ test.service ---
INFO Parsing file:/C:/Users/nicolas/.m2/repository/repository.xml
INFO Installing com/unic/delimij/integration/test.service/0.0.1-SNAPSHOT/test.service-0.0.1-SNAPSHOT.jar
INFO Writing OBR metadata
INFO 
INFO
INFO Building UNIC Product :: Web Service Bundle 0.0.1-SNAPSHOT
INFO
INFO 
INFO --- cxf-codegen-plugin:2.5.0.fuse-7-061:wsdl2java (generate-sources) @ test.webservice ---
22 mai 2012 16:42:36 org.apache.cxf.tools.wsdlto.core.PluginLoader loadPlugin
INFO: Replaced default frontend jaxws
22 mai 2012 16:42:36 org.apache.cxf.tools.wsdlto.core.PluginLoader loadPlugin
INFO: Replaced default frontend jaxws21
22 mai 2012 16:42:36 org.apache.cxf.tools.wsdlto.core.PluginLoader loadPlugin
INFO: Replaced default databinding source
22 mai 2012 16:42:36 org.apache.cxf.tools.wsdlto.core.PluginLoader loadPlugin
INFO: Replaced default databinding domsource
22 mai 2012 16:42:36 org.apache.cxf.tools.wsdlto.core.PluginLoader loadPlugin
INFO: Replaced default databinding staxsource
22 mai 2012 16:42:36 org.apache.cxf.tools.wsdlto.core.PluginLoader loadPlugin
INFO: Replaced default databinding saxsource
22 mai 2012 16:42:36 org.apache.cxf.tools.wsdlto.core.PluginLoader loadPlugin
INFO: Replaced default databinding jaxb
INFO 
INFO --- maven-resources-plugin:2.5:resources (default-resources) @ test.webservice ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 2 resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:compile (default-compile) @ test.webservice ---
INFO Compiling 6 source files to D:\projects\workspace\fuse-esb\test.webservice\target\classes
INFO 
INFO --- maven-resources-plugin:2.5:testResources (default-testResources) @ test.webservice ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO skip non existing resourceDirectory D:\projects\workspace\fuse-esb\test.webservice\src\test\resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ test.webservice ---
INFO No sources to compile
INFO 
INFO --- maven-surefire-plugin:2.12:test (default-test) @ test.webservice ---
INFO No tests to run.
INFO Surefire report directory: D:\projects\workspace\fuse-esb\test.webservice\target\surefire-reports


T E S T S


Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

INFO 
INFO --- maven-bundle-plugin:2.0.1:bundle (default-bundle) @ test.webservice ---
WARNING Warning building bundle com.unic.delimij.integration:test.webservice:bundle:0.0.1-SNAPSHOT : Instructions in Export-Package that are never used: =META-INF\.wsdl
WARNING Warning building bundle com.unic.delimij.integration:test.webservice:bundle:0.0.1-SNAPSHOT : Exporting packages that are not on the Bundle-ClasspathJar:dot: http://META-INF.wsdl
INFO 
INFO --- maven-install-plugin:2.3.1:install (default-install) @ test.webservice ---
INFO Installing D:\projects\workspace\fuse-esb\test.webservice\target\test.webservice-0.0.1-SNAPSHOT.jar to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.webservice\0.0.1-SNAPSHOT\test.webservice-0.0.1-SNAPSHOT.jar
INFO Installing D:\projects\workspace\fuse-esb\test.webservice\pom.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.webservice\0.0.1-SNAPSHOT\test.webservice-0.0.1-SNAPSHOT.pom
INFO 
INFO --- maven-bundle-plugin:2.0.1:install (default-install) @ test.webservice ---
INFO Parsing file:/C:/Users/nicolas/.m2/repository/repository.xml
INFO Installing com/unic/delimij/integration/test.webservice/0.0.1-SNAPSHOT/test.webservice-0.0.1-SNAPSHOT.jar
INFO Writing OBR metadata
INFO 
INFO
INFO Building UNIC Product :: Routing Bundle 0.0.1-SNAPSHOT
INFO
INFO 
INFO --- maven-resources-plugin:2.5:resources (default-resources) @ test.routing ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 2 resources
INFO 
INFO --- maven-compiler-plugin:2.0.2:compile (default-compile) @ test.routing ---
INFO Compiling 3 source files to D:\projects\workspace\fuse-esb\test.routing\target\classes
INFO 
INFO --- maven-resources-plugin:2.5:testResources (default-testResources) @ test.routing ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 0 resource
INFO 
INFO --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ test.routing ---
INFO Nothing to compile - all classes are up to date
INFO 
INFO --- maven-surefire-plugin:2.3:test (default-test) @ test.routing ---
INFO Surefire report directory: D:\projects\workspace\fuse-esb\test.routing\target\surefire-reports
INFO 
INFO --- maven-bundle-plugin:2.0.1:bundle (default-bundle) @ test.routing ---
WARNING Warning building bundle com.unic.delimij.integration:test.routing:bundle:0.0.1-SNAPSHOT : Instructions in Private-Package, or -testpackages that are never used: org\.apache\.camel\.example\.reportincident\.internal
INFO 
INFO --- maven-install-plugin:2.3.1:install (default-install) @ test.routing ---
INFO Installing D:\projects\workspace\fuse-esb\test.routing\target\test.routing-0.0.1-SNAPSHOT.jar to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.routing\0.0.1-SNAPSHOT\test.routing-0.0.1-SNAPSHOT.jar
INFO Installing D:\projects\workspace\fuse-esb\test.routing\pom.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.routing\0.0.1-SNAPSHOT\test.routing-0.0.1-SNAPSHOT.pom
INFO 
INFO --- maven-bundle-plugin:2.0.1:install (default-install) @ test.routing ---
INFO Parsing file:/C:/Users/nicolas/.m2/repository/repository.xml
INFO Installing com/unic/delimij/integration/test.routing/0.0.1-SNAPSHOT/test.routing-0.0.1-SNAPSHOT.jar
INFO Writing OBR metadata
INFO 
INFO
INFO Building UNIC Product :: Web layer 0.0.1-SNAPSHOT
INFO
INFO 
INFO --- maven-resources-plugin:2.5:resources (default-resources) @ test.web ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 0 resource
INFO Copying 1 resource
INFO 
INFO --- maven-compiler-plugin:2.0.2:compile (default-compile) @ test.web ---
INFO Compiling 2 source files to D:\projects\workspace\fuse-esb\test.web\target\classes
INFO 
INFO --- maven-bundle-plugin:2.0.1:manifest (bundle-manifest) @ test.web ---
WARNING Warning in manifest for com.unic.delimij.integration:test.web:war:0.0.1-SNAPSHOT : No sub JAR or directory WEB-INF/classes
INFO 
INFO --- maven-resources-plugin:2.5:testResources (default-testResources) @ test.web ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 0 resource
INFO 
INFO --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ test.web ---
INFO Nothing to compile - all classes are up to date
INFO 
INFO --- maven-surefire-plugin:2.10:test (default-test) @ test.web ---
INFO Surefire report directory: D:\projects\workspace\fuse-esb\test.web\target\surefire-reports


T E S T S


Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

INFO 
INFO --- maven-war-plugin:2.1-alpha-2:war (default-war) @ test.web ---
INFO Packaging webapp
INFO Assembling webapphttp://test.web in D:\projects\workspace\fuse-esb\test.web\target\test.web-0.0.1-SNAPSHOT
INFO Processing war project
INFO Copying webapp resourcesD:\projects\workspace\fuse-esb\test.web\src\main\webapp
INFO Webapp assembled in265 msecs
INFO Building war: D:\projects\workspace\fuse-esb\test.web\target\test.web-0.0.1-SNAPSHOT.war
INFO 
INFO --- maven-install-plugin:2.3.1:install (default-install) @ test.web ---
INFO Installing D:\projects\workspace\fuse-esb\test.web\target\test.web-0.0.1-SNAPSHOT.war to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.web\0.0.1-SNAPSHOT\test.web-0.0.1-SNAPSHOT.war
INFO Installing D:\projects\workspace\fuse-esb\test.web\pom.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.web\0.0.1-SNAPSHOT\test.web-0.0.1-SNAPSHOT.pom
INFO 
INFO
INFO Building UNIC Product :: DB Utility 0.0.1-SNAPSHOT
INFO
INFO 
INFO --- maven-resources-plugin:2.5:resources (default-resources) @ test.db ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 0 resource
INFO 
INFO --- maven-compiler-plugin:2.0.2:compile (default-compile) @ test.db ---
INFO Nothing to compile - all classes are up to date
INFO 
INFO >>> hibernate3-maven-plugin:2.2:hbm2ddl (default) @ test.db >>>
INFO 
INFO --- maven-resources-plugin:2.5:resources (default-resources) @ test.db ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 0 resource
INFO 
INFO <<< hibernate3-maven-plugin:2.2:hbm2ddl (default) @ test.db <<<
INFO 
INFO --- hibernate3-maven-plugin:2.2:hbm2ddl (default) @ test.db ---
INFO Configuration XML file loaded: file:/D:/projects/workspace/fuse-esb/test.db/src/config/hibernate.cfg.xml
16:42:43,684 INFO org.hibernate.cfg.annotations.Version - Hibernate Annotations 3.4.0.GA
16:42:43,694 INFO org.hibernate.cfg.Environment - Hibernate 3.3.1.GA
16:42:43,698 INFO org.hibernate.cfg.Environment - hibernate.properties not found
16:42:43,701 INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
16:42:43,704 INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
16:42:43,747 INFO org.hibernate.annotations.common.Version - Hibernate Commons Annotations 3.1.0.GA
INFO Configuration XML file loaded: file:/D:/projects/workspace/fuse-esb/test.db/src/config/hibernate.cfg.xml
16:42:43,750 INFO org.hibernate.cfg.Configuration - configuring from url: file:/D:/projects/workspace/fuse-esb/test.db/src/config/hibernate.cfg.xml
16:42:44,132 INFO org.hibernate.cfg.Configuration - Reading mappings from resource : META-INF/com/unic/delimij/integration/model/Product.hbm.xml
INFO No hibernate properties file loaded.
16:42:44,256 INFO org.hibernate.cfg.Configuration - Configured SessionFactory: product
16:42:44,301 INFO org.hibernate.cfg.HbmBinder - Mapping class: com.unic.delimij.integration.model.Product -> PRODUCT
16:42:44,315 INFO org.hibernate.cfg.AnnotationConfiguration - Hibernate Validator not found: ignoring
16:42:44,327 INFO org.hibernate.dialect.Dialect - Using dialect: org.hibernate.dialect.MySQL5Dialect
16:42:44,432 INFO org.hibernate.tool.hbm2ddl.SchemaExport - Running hbm2ddl schema export
16:42:44,433 INFO org.hibernate.tool.hbm2ddl.SchemaExport - writing generated schema to file: D:\projects\workspace\fuse-esb\test.db\target\hibernate3\sql\create_product.sql
16:42:44,433 INFO org.hibernate.tool.hbm2ddl.SchemaExport - exporting generated schema to database
16:42:44,435 INFO org.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!)
16:42:44,435 INFO org.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 20
16:42:44,436 INFO org.hibernate.connection.DriverManagerConnectionProvider - autocommit mode: false
16:42:44,441 INFO org.hibernate.connection.DriverManagerConnectionProvider - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql:///test
16:42:44,442 INFO org.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=root, password=****}

drop table if exists TEST.PRODUCT;

create table TEST.PRODUCT (
PRODUCT_ID bigint not null auto_increment,
PRODUCT_CODE varchar(80),
PRODUCT_NAME varchar(80),
DETAILS varchar(200),
CREATION_DATE datetime,
primary key (PRODUCT_ID)
);
16:42:45,324 INFO org.hibernate.tool.hbm2ddl.SchemaExport - schema export complete
16:42:45,325 INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:mysql:///test
INFO 
INFO --- maven-resources-plugin:2.5:testResources (default-testResources) @ test.db ---
debug execute contextualize
WARNING Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build is platform dependent!
INFO Copying 0 resource
INFO 
INFO --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ test.db ---
INFO Nothing to compile - all classes are up to date
INFO 
INFO --- maven-surefire-plugin:2.10:test (default-test) @ test.db ---
INFO Surefire report directory: D:\projects\workspace\fuse-esb\test.db\target\surefire-reports


T E S T S


Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

INFO 
INFO --- maven-jar-plugin:2.3.2:jar (default-jar) @ test.db ---
INFO Building jar: D:\projects\workspace\fuse-esb\test.db\target\test.db-0.0.1-SNAPSHOT.jar
INFO 
INFO --- maven-install-plugin:2.3.1:install (default-install) @ test.db ---
INFO Installing D:\projects\workspace\fuse-esb\test.db\target\test.db-0.0.1-SNAPSHOT.jar to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.db\0.0.1-SNAPSHOT\test.db-0.0.1-SNAPSHOT.jar
INFO Installing D:\projects\workspace\fuse-esb\test.db\pom.xml to C:\Users\nicolas\.m2\repository\com\unic\delimij\integration\test.db\0.0.1-SNAPSHOT\test.db-0.0.1-SNAPSHOT.pom
INFO
INFO Reactor Summary:
INFO 
INFO test.master ....................................... SUCCESS http://0.161s
INFO UNIC Product :: ActiveMQ Bundle ................... SUCCESS http://2.237s
INFO UNIC Product :: Camel Queue Service Bundle ........ SUCCESS http://0.644s
INFO UNIC Product : Features ........................... SUCCESS http://0.863s
INFO UNIC Product :: Model Bundle ...................... SUCCESS http://1.166s
INFO UNIC Product :: Persistance Bundle ................ SUCCESS http://1.272s
INFO UNIC Product :: Service Bundle .................... SUCCESS http://0.970s
INFO UNIC Product :: Web Service Bundle ................ SUCCESS http://3.961s
INFO UNIC Product :: Routing Bundle .................... SUCCESS http://1.068s
INFO UNIC Product :: Web layer ......................... SUCCESS http://3.102s
INFO UNIC Product :: DB Utility ........................ SUCCESS http://2.167s
INFO
INFO BUILD SUCCESS
INFO
INFO Total time: 18.093s
INFO Finished at: Tue May 22 16:42:45 CEST 2012
INFO Final Memory: 46M/121M
INFO
16:42:45,888 INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:mysql:///test

Many thanks again for you help.

Kind regards,

Nicolas
iocanel 
Posts: 150 
Registered: 03/16/10
Re: How to features:addUrl from maven repository ? 
Posted: May 22, 2012 3:02 PM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
From the output, I see that the features.xml is being installed in your repo now. Do you still have issues?
nicolasduminil 
Posts: 87 
Registered: 02/24/09
Re: How to features:addUrl from maven repository ? 
Posted: May 24, 2012 2:52 PM   in response to: iocanel in response to: iocanel 
Click to reply to this threadReply
The features.xml is not installed in my repo. And yes, I have issues, this is the issue I have: I don't know what to do in order to add a features repo URL to the server.
nicolasduminil 
Posts: 87 
Registered: 02/24/09
Re: How to features:addUrl from maven repository ? 
Posted: May 24, 2012 3:11 PM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
Please don't notice the previous remark, by keeping modifying the POM file I made a typo and the features file wasn't found without even if the plugin was saying it has deployed it. I came this way at my initial version, which works now, and I won't ever know why it didn't work, probably a typo as well.

Many thanks for your help.

Kind regards,

Nicolas
iocanel 
Posts: 150 
Registered: 03/16/10
Re: How to features:addUrl from maven repository ? 
Posted: May 24, 2012 3:17 PM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
I am glad that its now fixed :-)
nicolasduminil 
Posts: 87 
Registered: 02/24/09
Re: How to features:addUrl from maven repository ? 
Posted: May 24, 2012 5:15 PM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
Hi,

I'm sorry to have spokeb too early. Now that the features file gets correctly deployed into the maven repository, I try to features:addUrl but I get "URL could not be resolved". If I'm using file: it works but not with mvn:. What could be the problem here. I've read that mvn: doesn't work with maven 3. Could it be true ?

Kind regards,

Nicolas
iocanel 
Posts: 150 
Registered: 03/16/10
Re: How to features:addUrl from maven repository ? 
Posted: May 24, 2012 5:31 PM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
Hi Nicolas,

Since the features file is now inside your maven repository, it should work as long as you provide the correct syntax.

Can you please provide the exact command that you used (features:addUrl ...). Also can you please paste the full path of the file that did worked for you?
nicolasduminil 
Posts: 87 
Registered: 02/24/09
Re: How to features:addUrl from maven repository ? 
Posted: May 25, 2012 10:26 AM   in response to: iocanel in response to: iocanel 
Click to reply to this threadReply
Hi,

Many thanks for your suport and your patience.

The following command works:

features:addUrl file:C:/Users/nicolas/.m2/repository/com/unic/delimij/integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT-features.xml

The following doesn't:

features:addUrl mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT-features.xml

and displays the following message:

Could not add Feature Repository:
java.lang.RuntimeException: URL mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT-features.xml could not be resolved

Many thanks in advance for your help.

Nicolas
iocanel 
Posts: 150 
Registered: 03/16/10
Re: How to features:addUrl from maven repository ? 
Posted: May 25, 2012 2:25 PM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
The mvn url that you are using is wrong. The correct one should be:

features:addUrl mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT/xml/features

When using the mvn url protocol handler you don't specify the artifact file name itself. You just specify the artifact properties separated by /. As I posted in my original response the format should be:

features:addUrl mvn:<groupId>/<artifactId>/<version>/<type>/<classifier>

nicolasduminil 
Posts: 87 
Registered: 02/24/09
Re: How to features:addUrl from maven repository ? 
Posted: May 25, 2012 2:43 PM   in response to: iocanel in response to: iocanel 
Click to reply to this threadReply
Hi,

Thanks for this update. Yes, I didn't understand that. However, typing the following command:

karaf@root> features:addUrl mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT/xml/features
Could not add Feature Repository:
java.lang.RuntimeException: URL mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/test.features-0.0.1-SNAPSHOT/xml/features could not be resolved.
karaf@root>

Please notice that I don't have any xml subdirectory in the repository. But this is probably normal since, as you explained, xml is not the name of a directory but of the classifier.

I really don't understand what happens.

Kind regards,

Nicolas
iocanel 
Posts: 150 
Registered: 03/16/10
Re: How to features:addUrl from maven repository ? 
Posted: May 25, 2012 2:56 PM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
I think that I didn't followed my own advice about the syntax.

This should work:

features:addUrl mvn:com.unic.delimij.integration/test.features/0.0.1-SNAPSHOT/xml/features

Edited by: iocanel on May 25, 2012 5:56 PM
nicolasduminil 
Posts: 87 
Registered: 02/24/09
Re: How to features:addUrl from maven repository ? 
Posted: May 25, 2012 3:02 PM   in response to: iocanel in response to: iocanel 
Click to reply to this threadReply
Yes, this one has worked. Sorry for not having read carrefully enough, I was pretty sure one has to specify a path into the maven repository. And thanks again for your patience. However, I find all this stuff pretty complex, maybe too complex and very relying on syntax things.

This time is really workinbg and I hope I understood it.

Kind regards,

Nicolas
iocanel 
Posts: 150 
Registered: 03/16/10
Re: How to features:addUrl from maven repository ? 
Posted: May 25, 2012 3:08 PM   in response to: nicolasduminil in response to: nicolasduminil 
Click to reply to this threadReply
Yay! 

As long as you go with the format: 
features:addUrl mvn:<groupId>/<artifactId>/<version>/<type>/<classifier> 
it won't cause you any future problems.

Besides that, its all about being careful and avoid typos :-)
 


原创粉丝点击