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.html
Cheers,
Kevin
On 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: unknown
> POM Location: /Users/jactor/ws/accenture/jmx.jar/pom.xml
>
> Reason: 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] Trace
> org.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 more
> Caused 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]
> ------------------------------------------------------------------------
>
>
>
>
> Regards
> Tor Egil Jacobsen
> www.hjemme.nu
> Tlf: 932 49 109
>
>
>
>
> ______________________________________________________________
> Date: Sun, 9 Dec 2007 15:21:03 +0200
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: 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 PM
> To: [email protected]
> Subject: 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 PM
> To: [email protected]
> Subject: 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.html
>
>
>
> Cheers,
> Kevin
>
>
>
> On 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 PM
> To:[email protected]
> Subject: 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