ServiceMix 3.1.1 is being voted currently and this should be fixed.
You can even try it using:

mvn archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling \
  -DarchetypeArtifactId=servicemix-jsr181-annotated-service-unit \
  -DarchetypeVersion=3.1.1-incubating -DgroupId=com.company \
  -DartifactId=wstest-SU \
  -DremoteRepositories=
http://people.apache.org/~gnodet/servicemix-3.1.1-incubating

Then, just edit the generated pom.xml to change back to ServiceMix
3.1instead of
3.1.1.

On 5/22/07, J.Gustafsson <[EMAIL PROTECTED]> wrote:


Hi,

I followed a former post on creating on deploying on a servicemix-jsr181
component.
bsnyder  distributed some instructions that unfortunately did not work
(for
me et least).

1.
mvn archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling
-DarchetypeArtifactId=servicemix-jsr181-annotated-service-unit
-DarchetypeVersion=3.1-incubating -DgroupId=com.company
-DartifactId=wstest-SU
-DremoteRepositories=
http://people.apache.org/repo/m2-incubating-repository

This creates a maven project skeleton and a sample java file
ExampleService.java.

2. When I run mvn install on this generated pom.xml, I recieve:
Missing:
----------
1) org.codehaus.xfire:xfire-jaxws:jar:${xfire-version}

  Try downloading the file manually from the project website.

  Then, install it using the command:
      mvn install:install-file -DgroupId=org.codehaus.xfire
-DartifactId=xfire-jaxws \
          -Dversion=${xfire-version} -Dpackaging=jar -Dfile=/path/to/file

  Path to dependency:
        1) com.company:wstest-SU:jbi-service-unit:1.0-SNAPSHOT
        2) org.codehaus.xfire:xfire-jaxws:jar:${xfire-version}

4. Now I changed the pom.xml and added <properties>
<xfire-version>1.2.4</xfire-version> </properties>.
After running mvn install, I get:
...
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to generate jbi.xml
...

5. Then I added <configuration>
<generateJbiDescriptor>false</generateJbiDescriptor> </configuration> to
the
org.apache.servicemix.tooling configuration in the pom.xml (read from
another post..)

The mvn install gives:

]
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error:
org.springframework.beans.factory.BeanDefinitionStoreException:
IOException
parsing
XML document from class path resource
[T:/Test/src/main/resources/services.xml]; nested exception is
java.io.FileNotFoundException: class path resource
[T:/Test/src/main/resources/services.xml] cannot
be opened because it does not exist

It seems like the mv create has created wrong paths in the pom.xml

6. I changed the <pathelement path="T:\Test/target/classes" /> to
<pathelement path="T:\Test/wstest-SU/target/classes" /> and
<pathelement path="T:\Test/src/main/java" /> to
<pathelement path="T:\Test/wstest-SU/src/main/java" /> as well as
configUrl="T:\Test/src/main/resources/services.xml" to
configUrl="T:\Test/wstest-SU/src/main/resources/services.xml"

Now when I run mvn install, I get:

[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error executing ant tasks

Embedded error: org.springframework.beans.factory.BeanCreationException:
Error creating bean with na
me 'org.codehaus.xfire.spring.ServiceBean' defined in file
[T:\Test\wstest-SU\src\main\resources\ser
vices.xml]: Error setting property values; nested exception is
org.springframework.beans.PropertyAcc
essExceptionsException: PropertyAccessExceptionsException (1 errors);
nested
propertyAccessException
s are: [org.springframework.beans.TypeMismatchException: Failed to convert
property value of type [j
ava.lang.String] to required type [java.lang.Class] for property
'serviceClass'; nested exception is
java.lang.IllegalArgumentException: Class not found:
com.company.ExampleService]

I'm afraid I'm stuck here. Could any body please help me?

regards,

/j



--
View this message in context:
http://www.nabble.com/Maven-archetype-for-jsr181-component-etc...-tf3795230s12049.html#a10734513
Sent from the ServiceMix - User mailing list archive at Nabble.com.




--
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/

Reply via email to