[antlr-interest] using the antlr maven repository

Pete Siemsen siemsen at ucar.edu
Tue Mar 31 12:33:14 PDT 2009


Jim,

I did 'mvn clean'.  I moved my .g file to /src/main/antlr3.  It's a v3  
grammar.  I modified my pom.xml file as described at http://antlr.org/antlr3-maven-plugin/index.html 
.  Now I get

$ mvn package
[INFO] Scanning for projects...
[INFO]  
------------------------------------------------------------------------
[INFO] Building TranslateCIM
[INFO]    task-segment: [clean]
[INFO]  
------------------------------------------------------------------------
Downloading: http://download.java.net/maven/2/org/antlr/antlr3-maven-plugin/3.1.3-SNAPSHOT/antlr3-maven-plugin-3.1.3-SNAPSHOT.pom
[INFO]  
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]  
------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.antlr:antlr3-maven-plugin

Reason: POM 'org.antlr:antlr3-maven-plugin' not found in repository:  
Unable to download the artifact from any repository

   org.antlr:antlr3-maven-plugin:pom:3.1.3-SNAPSHOT

from the specified remote repositories:
   java.net (http://download.java.net/maven/2),
   central (http://repo1.maven.org/maven2)

  for project org.antlr:antlr3-maven-plugin


[INFO]  
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]  
------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Tue Mar 31 13:29:25 MDT 2009
[INFO] Final Memory: 3M/8M
[INFO]  
------------------------------------------------------------------------
$

For what it's worth, here's the pom.xml:



Thanks for your help!

-- Pete


On Mar 30, 2009, at 8:59 AM, Jim Idle wrote:

> Pete Siemsen wrote:
>> I have had ANTLR working with maven for a while.  I'm interested in
>> using a newer ANTLR.  The one in my repository is 2.7.7.  I'd like to
>> use newer version of ANTLR if possible.  I have the repository
>> definition suggested by the web page at http://www.antlr.org/wiki/display/ANTLR3/2008/11/20/Maven+and+Hudson+continuous+build+server+now+running
>>
>> If I change my (working) pom.xml from
>>
>>                 <dependency>
>>                         <groupId>org.antlr</groupId>
>>                         <artifactId>antlr-runtime</artifactId>
>>                         <version>3.0.1</version>
>>                 </dependency>
>>
>> to
>>
>>                 <dependency>
>>                         <groupId>org.antlr</groupId>
>>                         <artifactId>antlr-runtime</artifactId>
>>                         <version>3.1.3</version>
>>                 </dependency>
>>
>> I get the 3.1.3, and I get lots of "cannot find symbol _fsp" and
>> "cannot find symbol errorRecovery".  I've tried deleting my ~/.m2/
>> reposinory/antlr/antlr/2.7.7, aonly to watch it get downloaded again.
>>
> v3 is dependent on 2.7.7 but it does not use it to compile the  
> grammars.
> You will need to do the following:
>
> 1) mvn clean
> 2) Move your .g files under src/main/antlr3 (unless you specify a
> different location but it is better to use the Maven defaults as it
> reduces pom complexity). The v2 plugin unfortunately used the  
> directory
> antlr instead of antlr2, so the v3 plugin now defaults to anltr3 to
> avoid confusion.
> 3) Of course your v2 grammars will not work with v3 out of the box,  
> you
> must convert them, which is generally fairly simple but in some cases
> can be involved.
>
> Documentation for plugin is at:
>
> http://antlr.org/antlr3-maven-plugin/index.html
>
> Finally, you do not need a different repository as ANTLR is now part  
> of
> the Maven central repository and synced directly from our own release
> repository.
>
> Hope that helps,
>
> Jim

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090331/7a541685/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pom.xml
Type: text/xml
Size: 3249 bytes
Desc: not available
Url : http://www.antlr.org/pipermail/antlr-interest/attachments/20090331/7a541685/attachment.xml 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090331/7a541685/attachment-0001.html 


More information about the antlr-interest mailing list