Okay... I'm getting a little frustrated in that every time I try to use Maven for something that I think is remotely simple, Maven appears to make it complicated and I get caught up in the minutiae of working out how maven works so that I can do something I thought was bloody simple!
Am I overreacting? All this crap that I quoted below was quoted as a natural progression from a problem I was having with NetBeans not picking up some package names. I found that I had to select the item "Reload Project" from the project's context menu. I found this out earlier this morning. My original problem is thus solved. Can I ignore the stuff below? Will it figure itself out when I create the service assembly? Jesus wept! Owen. -----Original Message----- From: Owen Thomas [mailto:[EMAIL PROTECTED] Sent: Thursday, March 22, 2007 10:53 AM To: [email protected] Subject: RE: Maven archetype for jsr181 component. Hi Guillaume. Thanks for replying. Parent project... Wassat? If you are alluding to an impression you have that this project is part of a multi-project, hmmm.... it could in the future be part of a service assembly, but not yet. CurrentProjects is just a directory from which all my development work is located. This LNS Web Service project was created as a simple project intended to customise the function of a jsr-181 container. What is further interesting is the following snippet of my POM, which I tried to format so it would be good to the eye, and would exclude any information I didn't think necessary to the problem. It looks as though if all the paths were correct, they would be absolute, which in and of itself, is not a nice thing: <project> ... <build> ... <plugins> ... <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> ... <configuration> <tasks> <taskdef classname="org.codehaus.xfire.gen.WsdlGenTask" name="wsdlgen"> <classpath> <pathelement path="H:\CurrentProjects/target/classes" /> <pathelement path="H:\CurrentProjects/src/main/java" /> <path refid="maven.test.classpath" /> </classpath> </taskdef> <wsdlgen configUrl="H:\CurrentProjects/src/main/resources/services.xml" outputDirectory="H:\CurrentProjects/src/main/resources" /> </tasks> <sourceRoot>H:\CurrentProjects/src/main/java</sourceRoot> </configuration> ... </execution> ... </executions> ... </plugin> ... </plugins> ... </build> ... </project> I'll regenerate another project using the servicemix-jsr181 archetype, see if it happens again, and get back to you... I won't raise an issue on it unless, by following the same procedure Bruce showed me earlier - the procedure that yielded the POM for which the above snippet is an extraction of, it happens again. Owen. -----Original Message----- From: Guillaume Nodet [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 21, 2007 5:35 PM To: [email protected] Subject: Re: Maven archetype for jsr181 component. Do you have a parent project in CurrentProjects ? Is the problem reproducible ? If yes, please raise a JIRA. On 3/21/07, Owen Thomas <[EMAIL PROTECTED]> wrote: > > Hmmm... > > I've removed the @WebMethod annotation, and get the following result: > > * > ******** Start of output > [ERROR]BUILD ERROR > [INFO]------------------------------------------------------------------ > ------ > [INFO]Error executing ant tasks > > Embedded error: > org.springframework.beans.factory.BeanDefinitionStoreException: > IOException parsing XML document from class path resource > [H:/CurrentProjects/src/main/resources/services.xml]; nested exception > is java.io.FileNotFoundException: class path resource > [H:/CurrentProjects/src/main/resources/services.xml] cannot be opened > because it does not exist > ******** End of output > * > > This is interesting in that it almost certainly points to a bug in > either Maven or (more probably perhaps) in the servicemix-jsr181 > archetype. > > I believe the file H:/CurrentProjects/src/main/resources/services.xml > should actually be > H:/CurrentProjects/LNSWebService/src/main/resources/services.xml > As this file exists, and LNSWebService is the directory name of the > project I created using the servicemix-jsr181 archetype. > > This is probably a problem with the archetype. > > Owen. > > -----Original Message----- > From: Owen Thomas [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 20, 2007 9:57 AM > To: [email protected] > Subject: RE: Maven archetype for jsr181 component. > > Hello. > > Thanks Guillaume for your reply. > > I appologise if this is in fact an "annotation-related error". I've only > been using annotations since I started working with EJB3 and web > services about two months ago. I've been working as more of an architect > over that period, and haven't really had a time to explore these > features just yet. > > I did as you said, and now Maven issues the following error: > > [INFO]------------------------------------------------------------------ > ------ > [ERROR]BUILD FAILURE > [INFO]------------------------------------------------------------------ > ------ > [INFO]Compilation failure > [INFO]H:\CurrentProjects\LNSWebService\src\main\java\au\net\wcg\webservi > ce\jsr181\lns\ExampleService.java:[25,20] cannot find symbol > [INFO]symbol : method name() > [INFO]location: @interface javax.jws.WebMethod > [INFO] > > I was also working on two separate tasks yesterday. It was about midday > when I came across the problem, and I was about to switch to the second > of the two tasks. If the error in the Maven build I am now getting > relates to a malformed annotation, then your help, if you can offer any, > would certainly be appreciated. > > However, the problem that prompted me to continue this thread yesterday > was that NetBeans isn't finding the package javax.jws. I have attached a > screen shot with this message that shows the problem I am trying to > resolve: namely that the editor isn't finding the package javax.jws - > indicated by the red wavy lines under the package imports and the > annotations. > > It is interesting to note that the error above appears to indicate that > Maven knows about javax.jws. Might the error in the NetBeans editor then > be a problem with NetBeans or more specifically Mavenide, the Maven > NetBeans plugin? > > Owen. > > -----Original Message----- > From: Guillaume Nodet [mailto:[EMAIL PROTECTED] > Sent: Monday, March 19, 2007 7:06 PM > To: [email protected] > Subject: Re: Maven archetype for jsr181 component. > > What does your bean looks like ? > It sounds like the name found for one of its method is empty, not sure > why. > You should be able to work around the problem by using the > @WebMethod(name = "myMethodName") > annotation. > > On 3/19/07, Owen Thomas <[EMAIL PROTECTED]> wrote: > > <cut/> > > > ... I received the following error: > > > > * > > ****** Start of output > > > [INFO]------------------------------------------------------------------ > > ------ > > [ERROR]BUILD ERROR > > > [INFO]------------------------------------------------------------------ > > ------ > > [INFO]Failed to generate jbi.xml > > > > Embedded error: Unable to generate service unit descriptor! > > <component-task-result > > xmlns="http://java.sun.com/xml/ns/jbi/management-message"> > > <component-name>null</component-name> > > <component-task-result-details> > > <task-result-details> > > <task-id>deploy</task-id> > > <task-result>FAILED</task-result> > > <message-type>ERROR</message-type> > > > > > <task-status-msg><msg-loc-info><loc-token/><loc-message>java.lang.Illega > > lArgumentException: Invalid name > > []</loc-message></msg-loc-info></task-status-msg> > > <exception-info> > > <nesting-level>1</nesting-level> > > <msg-loc-info> > > <loc-token /> > > <loc-message>Invalid name > > []</loc-message> > > > > <stack-trace><![CDATA[java.lang.IllegalArgumentException: Invalid name > > [] > > [INFO] at > > > org.codehaus.xfire.service.ServiceInfo.addOperation(ServiceInfo.java:73) > > > <cut/> > -- Cheers, Guillaume Nodet ------------------------ Architect, LogicBlaze (http://www.logicblaze.com/) Blog: http://gnodet.blogspot.com/
