Thanx! It seems to be the problem. I am sorry for bothering you all when I did not read all the documentation on the maven site. I have no excuse...Regards Tor Egil Jacobsenwww.hjemme.nuTlf: 932 49 109
From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: Wed, 19 Dec 2007 22:13:09 +0000Subject: RE: [mojo-user] jboss-packaging-maven-plugin repository Hi Tor,I can't say for sure without seeing your pom, but it looks like you've got the plugins element in the wrong place. It needs to be inside a build element.Eg <project> <build> <plugins> </plugins> </build></project>Here's a link to a POM reference:http://maven.apache.org/pom.htmlCheers,KevinOn Wed, 2007-12-19 at 22:29 +0100, Tor Egil Jacobsen wrote: Hi all!I am trying to the jboss-packaging... but I only get a parser error when maven tries to read the pom.It will not parse the <plugins>-tag. What might I be doing wrong?mvn jboss-packaging:sar[INFO] Scanning for projects...[INFO] ------------------------------------------------------------------------[ERROR] FATAL ERROR[INFO] ------------------------------------------------------------------------[INFO] Error building POM (may not be this project's POM).Project ID: unknownPOM Location: /Users/jactor/ws/accenture/jmx.jar/pom.xmlReason: Parse error reading POM. Reason: Unrecognised tag: 'plugins' (position: START_TAG seen ...<url>http://www.hjemme.nu/accenture</url>\n\n\t<plugins>... @17:11) [INFO] ------------------------------------------------------------------------[INFO] Traceorg.apache.maven.reactor.MavenExecutionException: Parse error reading POM. Reason: Unrecognised tag: 'plugins' (position: START_TAG seen ...<url>http://www.hjemme.nu</url>\n\n\t<plugins>... @17:11) at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:378) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:290) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) at org.apache.maven.cli.MavenCli.main(MavenCli.java:272) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375)Caused by: org.apache.maven.project.InvalidProjectModelException: Parse error reading POM. Reason: Unrecognised tag: 'plugins' (position: START_TAG seen ...<url>http://www.hjemme.nu</url>\n\n\t<plugins>... @17:11) at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1423) at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1380) at org.apache.maven.project.DefaultMavenProjectBuilder.buildFromSourceFileInternal(DefaultMavenProjectBuilder.java:477) at org.apache.maven.project.DefaultMavenProjectBuilder.build(DefaultMavenProjectBuilder.java:200) at org.apache.maven.DefaultMaven.getProject(DefaultMaven.java:537) at org.apache.maven.DefaultMaven.collectProjects(DefaultMaven.java:467) at org.apache.maven.DefaultMaven.getProjects(DefaultMaven.java:364) ... 11 moreCaused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Unrecognised tag: 'plugins' (position: START_TAG seen ...<url>http://www.hjemme.nu</url>\n\n\t<plugins>... @17:11) at org.apache.maven.model.io.xpp3.MavenXpp3Reader.parseModel(MavenXpp3Reader.java:2405) at org.apache.maven.model.io.xpp3.MavenXpp3Reader.read(MavenXpp3Reader.java:4438) at org.apache.maven.project.DefaultMavenProjectBuilder.readModel(DefaultMavenProjectBuilder.java:1419) ... 17 more[INFO] ------------------------------------------------------------------------[INFO] Total time: < 1 second[INFO] Finished at: Wed Dec 19 22:25:34 CET 2007[INFO] Final Memory: 1M/2M[INFO] ------------------------------------------------------------------------ RegardsTor Egil Jacobsenwww.hjemme.nuTlf: 932 49 109 Date: Sun, 9 Dec 2007 15:21:03 +0200From: [EMAIL PROTECTED]: [EMAIL PROTECTED]: RE: [mojo-user] jboss-packaging-maven-plugin repository After adding the tag in bold it is working: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jboss-packaging-maven-plugin</artifactId> <version>2.0-SNAPSHOT</version> <extensions>true</extensions> Yoram From: Yoram Michaeli [mailto:[EMAIL PROTECTED] Sent: Sunday, December 09, 2007 1:19 PMTo: [EMAIL PROTECTED]: RE: [mojo-user] jboss-packaging-maven-plugin repository By setting: <packaging>jboss-sar</packaging> I’m getting: [INFO] Cannot find lifecycle mapping for packaging: 'jboss-sar'.Component descriptor cannot be found in the component repository: org.apache.maven.lifecycle.mapping.LifecycleMappingjboss-sar. Yoram From: Kevin Stembridge [mailto:[EMAIL PROTECTED] Sent: Sunday, December 09, 2007 12:36 PMTo: [EMAIL PROTECTED]: RE: [mojo-user] jboss-packaging-maven-plugin repository Hi Yoram,No, I wrote jboss-sar, not sar. Have a look at this page: http://mojo.codehaus.org/jboss-packaging-maven-plugin/howto.htmlCheers,KevinOn Sun, 2007-12-09 at 12:19 +0200, Yoram Michaeli wrote: That is the main issue… There is no packaging type called sar so I've left it as the default (jar).What is happening is that in the target folder of the project the file is named with .sar extension while it is being renamed to .jar in the repository. Yoram From: Kevin Stembridge [mailto:[EMAIL PROTECTED] Sent: Sunday, December 09, 2007 12:13 PMTo:[EMAIL PROTECTED]: Re: [mojo-user] jboss-packaging-maven-plugin repository Hi,What is the packaging type of your sar project? I can't see it in the pom.xml fragments you've shown so I'm guessing it is the default, jar. What happens if you try <packaging>jboss-sar</packaging> ?On Sun, 2007-12-09 at 08:04 +0200, Yoram Michaeli wrote:Hi, I’m using jboss-packaging-maven-plugin to create a SAR and it works fine for me, but only the created JAR file is deployed in the repository so I can’t use the SAR to be included in my EAR project.How can I force it to deploy my SAR into the repository?Below is the relevant code:--- SAR pom.xml --- <groupId>com.test</groupId> <artifactId>mySar</artifactId> <name>mySar</name>… <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jboss-packaging-maven-plugin</artifactId> <version>2.0-SNAPSHOT</version> <executions> <execution> <phase>package</phase> <goals> <goal>sar</goal> </goals> <configuration> <jbossServiceFile>src/conf/jboss-service.xml</jbossServiceFile> <excludes> <exclude>jboss:jboss-system</exclude> <exclude>jboss:jboss-jmx</exclude> <exclude>jboss:jboss-common</exclude> </excludes> </configuration> </execution> </executions> </plugin> </plugins>--- EAR pom.xml --- <modules> <sarModule> <groupId>com.test</groupId> <artifactId>mySar</artifactId> </sarModule>… <dependency> <groupId> com.test </groupId> <artifactId> mySar </artifactId> <version>1.0-SNAPSHOT<version> <type>sar</type> </dependency>-------------------- Thanks, Yoram Express yourself instantly with MSN Messenger! MSN Messenger _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
