You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by RockRider <ni...@gmail.com> on 2008/05/02 15:31:16 UTC

*** Parse error reading POM ***

Hi
 
I am trying to use this plugin in my pom
http://mojo.codehaus.org/buildnumber-maven-plugin/index.html
 
My pom is as follows:
<plugin>

<groupId>org.codehaus.mojo</groupId>

<artifactId>maven-buildnumber-plugin</artifactId>

<executions>

<execution>

<phase>validate</phase> 

<goals>

<goal>create</goal> 

</goals>

</execution>

</executions>

<configuration>

<doCheck>false</doCheck>

<doUpdate>false</doUpdate>

<format>{0,date,yyyy-MM-dd HH:mm:ss}</format>

<items>

<item>timestamp</item>

</items>

</configuration>

</plugin>

...

...

<build>

<finalName>${project.artifactId}-${project.version}-r${buildNumber}</finalName>

... 
</build>
 
But I am getting this error:
org.apache.maven.reactor.MavenExecutionException: Parse error reading POM.
Reason: Unrecognised tag: 'executions' (position: START_TAG seen
...</artifactId>\n\t\t <executions>... @652:16)  for project unknown at
/home/mig/cruisecontrol/cduweb/checkout/xxxWeb/pom.xml

-- 
View this message in context: http://www.nabble.com/***-Parse-error-reading-POM-***-tp17019499s177p17019499.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: *** Parse error reading POM ***

Posted by Julien CARSIQUE <jc...@nuxeo.com>.
RockRider a écrit :
> Hi Julien,
> 
> Well, I got that by accident :). The plugin's working now. :). But it runs
> only if i run this command:
> mvn buildnumber:create install (adding the create goal explicitly in the
> command line)
> 
> logically, the plugin should run on it's own, if its bound to the install
> phase as i did:
> ..........
> ......
> <phase>validate</phase>
>                  <goals>
>                    <goal>create</goal>
>                  </goals>
>                </execution>
> ........
> .........
> 
Yes it should.
Is your configuration in a <build><plugins><plugin> section, and not in <pluginManagement> section ?
Check if you run by default some specific profiles : "mvn help:active-profiles"
and what's in your effective pom.xml : "mvn help:effective-pom"
Look for this line when running install : [INFO] [buildnumber:create {execution: default}]


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: *** Parse error reading POM ***

Posted by RockRider <ni...@gmail.com>.
Hi Julien,

Well, I got that by accident :). The plugin's working now. :). But it runs
only if i run this command:
mvn buildnumber:create install (adding the create goal explicitly in the
command line)

logically, the plugin should run on it's own, if its bound to the install
phase as i did:
..........
......
<phase>validate</phase>
                 <goals>
                   <goal>create</goal>
                 </goals>
               </execution>
........
.........

Julien CARSIQUE wrote:
> 
> Hi,
> 
> The variable is "buildNumber" not "timestamp" which the value you gave to
> buildNumber.
> 
> I use this :
>            <plugin>
>              <groupId>org.codehaus.mojo</groupId>
>              <artifactId>buildnumber-maven-plugin</artifactId>
>              <version>1.0-beta-1</version>
>              <executions>
>                <execution>
>                  <phase>validate</phase>
>                  <goals>
>                    <goal>create</goal>
>                  </goals>
>                </execution>
>              </executions>
>              <configuration>
>                <format>{0,date,yyyyMMdd-HHmmss}</format>
>                <items>
>                  <item>timestamp</item>
>                </items>
>                <doCheck>false</doCheck>
>                <doUpdate>false</doUpdate>
>              </configuration>
>            </plugin>
> 
> Then, I use ${buildNumber} in manifest files only, not to change the
> artifact name but you can use 
> something like this :
>     
> <finalName>${pom.artifactId}-${pom.version}-r${buildNumber}</finalName>
> 
> Cheers,
> Julien
> 
> RockRider a écrit :
>> Hi Julien ,
>> 
>> I have installed the plugin's jar file using the maven install install
>> file
>> command
>> the plugin xml fragment, i have added to pom, under the
>> <pluginManagement>
>> tag.
>> I am trying to access the timestaamp property as:
>> 
>> <version>${timestamp}</version>, this is at the top of the xml, where in
>> we
>> give projects group id, artifact id, description.
>> 
>> but the build generated is generated as applicationName-${timestamp}.
>> 
>> so the pom is not resolving the refernce to the timestamp variable
>> generated
>> by the plugin.
>> 
>> As per this link
>> http://mojo.codehaus.org/buildnumber-maven-plugin/plugin-info.html
>> the ${timstamp} should work.
>> 
>> How may I debug this?
>> May I know how you are using the timstamp variable in ur pom?
>> 
>> Please let me know.
>> 
>> 
>> Julien CARSIQUE wrote:
>>> RockRider a écrit :
>>>> As per my understanding, the artifactId is nothing but a directory
>>>> name.
>>>> correct?
>>>> I am using the same name for the artifactid as well as directory where
>>>> the
>>>> plugin classes are present
>>>>
>>>> makes snese??
>>>>
>>> No. Module is a directory name. ArtifactId is the artifactId given to
>>> the
>>> artifact in its pom.xml 
>>> (in your case, the plugin's artifactId).
>>>
>>> Directory where plugin classes are present? You do not need to manually
>>> download the plugin, it's 
>>> done by maven (with the correct groupId, artifactId, etc.).
>>>
>>>
>>> -- 
>>> Julien CARSIQUE, Nuxeo (Paris, France)
>>> www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
>>> Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform
>>> jcarsique@nuxeo.com | Tel: +33 1 40 33 79 87
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>> 
> 
> 
> -- 
> Julien CARSIQUE, Nuxeo (Paris, France)
> www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
> Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform
> jcarsique@nuxeo.com | Tel: +33 1 40 33 79 87
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/***-Parse-error-reading-POM-***-tp17019499p17111002.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: *** Parse error reading POM ***

Posted by Julien CARSIQUE <jc...@nuxeo.com>.
Hi,

The variable is "buildNumber" not "timestamp" which the value you gave to buildNumber.

I use this :
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>buildnumber-maven-plugin</artifactId>
             <version>1.0-beta-1</version>
             <executions>
               <execution>
                 <phase>validate</phase>
                 <goals>
                   <goal>create</goal>
                 </goals>
               </execution>
             </executions>
             <configuration>
               <format>{0,date,yyyyMMdd-HHmmss}</format>
               <items>
                 <item>timestamp</item>
               </items>
               <doCheck>false</doCheck>
               <doUpdate>false</doUpdate>
             </configuration>
           </plugin>

Then, I use ${buildNumber} in manifest files only, not to change the artifact name but you can use 
something like this :
     <finalName>${pom.artifactId}-${pom.version}-r${buildNumber}</finalName>

Cheers,
Julien

RockRider a écrit :
> Hi Julien ,
> 
> I have installed the plugin's jar file using the maven install install file
> command
> the plugin xml fragment, i have added to pom, under the <pluginManagement>
> tag.
> I am trying to access the timestaamp property as:
> 
> <version>${timestamp}</version>, this is at the top of the xml, where in we
> give projects group id, artifact id, description.
> 
> but the build generated is generated as applicationName-${timestamp}.
> 
> so the pom is not resolving the refernce to the timestamp variable generated
> by the plugin.
> 
> As per this link
> http://mojo.codehaus.org/buildnumber-maven-plugin/plugin-info.html
> the ${timstamp} should work.
> 
> How may I debug this?
> May I know how you are using the timstamp variable in ur pom?
> 
> Please let me know.
> 
> 
> Julien CARSIQUE wrote:
>> RockRider a écrit :
>>> As per my understanding, the artifactId is nothing but a directory name.
>>> correct?
>>> I am using the same name for the artifactid as well as directory where
>>> the
>>> plugin classes are present
>>>
>>> makes snese??
>>>
>> No. Module is a directory name. ArtifactId is the artifactId given to the
>> artifact in its pom.xml 
>> (in your case, the plugin's artifactId).
>>
>> Directory where plugin classes are present? You do not need to manually
>> download the plugin, it's 
>> done by maven (with the correct groupId, artifactId, etc.).
>>
>>
>> -- 
>> Julien CARSIQUE, Nuxeo (Paris, France)
>> www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
>> Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform
>> jcarsique@nuxeo.com | Tel: +33 1 40 33 79 87
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
> 


-- 
Julien CARSIQUE, Nuxeo (Paris, France)
www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform
jcarsique@nuxeo.com | Tel: +33 1 40 33 79 87


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: *** Parse error reading POM ***

Posted by RockRider <ni...@gmail.com>.
Hi Julien ,

I have installed the plugin's jar file using the maven install install file
command
the plugin xml fragment, i have added to pom, under the <pluginManagement>
tag.
I am trying to access the timestaamp property as:

<version>${timestamp}</version>, this is at the top of the xml, where in we
give projects group id, artifact id, description.

but the build generated is generated as applicationName-${timestamp}.

so the pom is not resolving the refernce to the timestamp variable generated
by the plugin.

As per this link
http://mojo.codehaus.org/buildnumber-maven-plugin/plugin-info.html
the ${timstamp} should work.

How may I debug this?
May I know how you are using the timstamp variable in ur pom?

Please let me know.


Julien CARSIQUE wrote:
> 
> RockRider a écrit :
>> As per my understanding, the artifactId is nothing but a directory name.
>> correct?
>> I am using the same name for the artifactid as well as directory where
>> the
>> plugin classes are present
>> 
>> makes snese??
>> 
> No. Module is a directory name. ArtifactId is the artifactId given to the
> artifact in its pom.xml 
> (in your case, the plugin's artifactId).
> 
> Directory where plugin classes are present? You do not need to manually
> download the plugin, it's 
> done by maven (with the correct groupId, artifactId, etc.).
> 
> 
> -- 
> Julien CARSIQUE, Nuxeo (Paris, France)
> www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
> Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform
> jcarsique@nuxeo.com | Tel: +33 1 40 33 79 87
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/***-Parse-error-reading-POM-***-tp17019499s177p17053964.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: *** Parse error reading POM ***

Posted by RockRider <ni...@gmail.com>.
Anyway, I hav downloaded the jar, but i do not have the pom xml for this
plugin. :(


Julien CARSIQUE wrote:
> 
> RockRider a écrit :
>> As per my understanding, the artifactId is nothing but a directory name.
>> correct?
>> I am using the same name for the artifactid as well as directory where
>> the
>> plugin classes are present
>> 
>> makes snese??
>> 
> No. Module is a directory name. ArtifactId is the artifactId given to the
> artifact in its pom.xml 
> (in your case, the plugin's artifactId).
> 
> Directory where plugin classes are present? You do not need to manually
> download the plugin, it's 
> done by maven (with the correct groupId, artifactId, etc.).
> 
> 
> -- 
> Julien CARSIQUE, Nuxeo (Paris, France)
> www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
> Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform
> jcarsique@nuxeo.com | Tel: +33 1 40 33 79 87
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/***-Parse-error-reading-POM-***-tp17019499s177p17019958.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: *** Parse error reading POM ***

Posted by Julien CARSIQUE <jc...@nuxeo.com>.
RockRider a écrit :
> As per my understanding, the artifactId is nothing but a directory name.
> correct?
> I am using the same name for the artifactid as well as directory where the
> plugin classes are present
> 
> makes snese??
> 
No. Module is a directory name. ArtifactId is the artifactId given to the artifact in its pom.xml 
(in your case, the plugin's artifactId).

Directory where plugin classes are present? You do not need to manually download the plugin, it's 
done by maven (with the correct groupId, artifactId, etc.).


-- 
Julien CARSIQUE, Nuxeo (Paris, France)
www.nuxeo.com - The Open Source ECM Platform - www.nuxeo.org
Nuxeo ECM Stack - The Java EE, scalable, standard-based ECM Platform
jcarsique@nuxeo.com | Tel: +33 1 40 33 79 87


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: *** Parse error reading POM ***

Posted by RockRider <ni...@gmail.com>.
As per my understanding, the artifactId is nothing but a directory name.
correct?
I am using the same name for the artifactid as well as directory where the
plugin classes are present

makes snese??


Julien CARSIQUE wrote:
> 
> Hello,
> 
> Are you sure that the artifactId is maven-buildnumber-plugin ?
> I use buildnumber-maven-plugin
> 
> Cheers,
> Julien
> 
> RockRider a écrit :
>> Hi
>>  
>> I am trying to use this plugin in my pom
>> http://mojo.codehaus.org/buildnumber-maven-plugin/index.html
>>  
>> My pom is as follows:
>> <plugin>
>> 
>> <groupId>org.codehaus.mojo</groupId>
>> 
>> <artifactId>maven-buildnumber-plugin</artifactId>
>> 
>> <executions>
>> 
>> <execution>
>> 
>> <phase>validate</phase> 
>> 
>> <goals>
>> 
>> <goal>create</goal> 
>> 
>> </goals>
>> 
>> </execution>
>> 
>> </executions>
>> 
>> <configuration>
>> 
>> <doCheck>false</doCheck>
>> 
>> <doUpdate>false</doUpdate>
>> 
>> <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
>> 
>> <items>
>> 
>> <item>timestamp</item>
>> 
>> </items>
>> 
>> </configuration>
>> 
>> </plugin>
>> 
>> ...
>> 
>> ...
>> 
>> <build>
>> 
>> <finalName>${project.artifactId}-${project.version}-r${buildNumber}</finalName>
>> 
>> ... 
>> </build>
>>  
>> But I am getting this error:
>> org.apache.maven.reactor.MavenExecutionException: Parse error reading
>> POM.
>> Reason: Unrecognised tag: 'executions' (position: START_TAG seen
>> ...</artifactId>\n\t\t <executions>... @652:16)  for project unknown at
>> /home/mig/cruisecontrol/cduweb/checkout/xxxWeb/pom.xml
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/***-Parse-error-reading-POM-***-tp17019499s177p17019689.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: *** Parse error reading POM ***

Posted by RockRider <ni...@gmail.com>.
The unrecognized tag 'exception' problem is solved, i am using the plugin
under
<pluginManagement>
	<plugins>

section of my pom.

but still the build that is generated is as appName-${timestamp}, instead of
appName-20080502

Julien CARSIQUE wrote:
> 
> Hello,
> 
> Are you sure that the artifactId is maven-buildnumber-plugin ?
> I use buildnumber-maven-plugin
> 
> Cheers,
> Julien
> 
> RockRider a écrit :
>> Hi
>>  
>> I am trying to use this plugin in my pom
>> http://mojo.codehaus.org/buildnumber-maven-plugin/index.html
>>  
>> My pom is as follows:
>> <plugin>
>> 
>> <groupId>org.codehaus.mojo</groupId>
>> 
>> <artifactId>maven-buildnumber-plugin</artifactId>
>> 
>> <executions>
>> 
>> <execution>
>> 
>> <phase>validate</phase> 
>> 
>> <goals>
>> 
>> <goal>create</goal> 
>> 
>> </goals>
>> 
>> </execution>
>> 
>> </executions>
>> 
>> <configuration>
>> 
>> <doCheck>false</doCheck>
>> 
>> <doUpdate>false</doUpdate>
>> 
>> <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
>> 
>> <items>
>> 
>> <item>timestamp</item>
>> 
>> </items>
>> 
>> </configuration>
>> 
>> </plugin>
>> 
>> ...
>> 
>> ...
>> 
>> <build>
>> 
>> <finalName>${project.artifactId}-${project.version}-r${buildNumber}</finalName>
>> 
>> ... 
>> </build>
>>  
>> But I am getting this error:
>> org.apache.maven.reactor.MavenExecutionException: Parse error reading
>> POM.
>> Reason: Unrecognised tag: 'executions' (position: START_TAG seen
>> ...</artifactId>\n\t\t <executions>... @652:16)  for project unknown at
>> /home/mig/cruisecontrol/cduweb/checkout/xxxWeb/pom.xml
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/***-Parse-error-reading-POM-***-tp17019499s177p17019773.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: *** Parse error reading POM ***

Posted by Julien CARSIQUE <jc...@nuxeo.com>.
Hello,

Are you sure that the artifactId is maven-buildnumber-plugin ?
I use buildnumber-maven-plugin

Cheers,
Julien

RockRider a écrit :
> Hi
>  
> I am trying to use this plugin in my pom
> http://mojo.codehaus.org/buildnumber-maven-plugin/index.html
>  
> My pom is as follows:
> <plugin>
> 
> <groupId>org.codehaus.mojo</groupId>
> 
> <artifactId>maven-buildnumber-plugin</artifactId>
> 
> <executions>
> 
> <execution>
> 
> <phase>validate</phase> 
> 
> <goals>
> 
> <goal>create</goal> 
> 
> </goals>
> 
> </execution>
> 
> </executions>
> 
> <configuration>
> 
> <doCheck>false</doCheck>
> 
> <doUpdate>false</doUpdate>
> 
> <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
> 
> <items>
> 
> <item>timestamp</item>
> 
> </items>
> 
> </configuration>
> 
> </plugin>
> 
> ...
> 
> ...
> 
> <build>
> 
> <finalName>${project.artifactId}-${project.version}-r${buildNumber}</finalName>
> 
> ... 
> </build>
>  
> But I am getting this error:
> org.apache.maven.reactor.MavenExecutionException: Parse error reading POM.
> Reason: Unrecognised tag: 'executions' (position: START_TAG seen
> ...</artifactId>\n\t\t <executions>... @652:16)  for project unknown at
> /home/mig/cruisecontrol/cduweb/checkout/xxxWeb/pom.xml
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: *** Parse error reading POM ***

Posted by RockRider <ni...@gmail.com>.
Also I am not able to access the timestamp of the build, using the
${timestamp} as in
http://mojo.codehaus.org/buildnumber-maven-plugin/create-mojo.html



RockRider wrote:
> 
> Hi
>  
> I am trying to use this plugin in my pom
> http://mojo.codehaus.org/buildnumber-maven-plugin/index.html
>  
> My pom is as follows:
> <plugin>
> 
> <groupId>org.codehaus.mojo</groupId>
> 
> <artifactId>maven-buildnumber-plugin</artifactId>
> 
> <executions>
> 
> <execution>
> 
> <phase>validate</phase> 
> 
> <goals>
> 
> <goal>create</goal> 
> 
> </goals>
> 
> </execution>
> 
> </executions>
> 
> <configuration>
> 
> <doCheck>false</doCheck>
> 
> <doUpdate>false</doUpdate>
> 
> <format>{0,date,yyyy-MM-dd HH:mm:ss}</format>
> 
> <items>
> 
> <item>timestamp</item>
> 
> </items>
> 
> </configuration>
> 
> </plugin>
> 
> ...
> 
> ...
> 
> <build>
> 
> <finalName>${project.artifactId}-${project.version}-r${buildNumber}</finalName>
> 
> ... 
> </build>
>  
> But I am getting this error:
> org.apache.maven.reactor.MavenExecutionException: Parse error reading POM.
> Reason: Unrecognised tag: 'executions' (position: START_TAG seen
> ...</artifactId>\n\t\t <executions>... @652:16)  for project unknown at
> /home/mig/cruisecontrol/cduweb/checkout/xxxWeb/pom.xml
> 
> 

-- 
View this message in context: http://www.nabble.com/***-Parse-error-reading-POM-***-tp17019499s177p17019599.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org