[antlr-interest] Problems with maven build (was: Question about building code generation target)

Rick Mann rmann at latencyzero.com
Fri Jan 16 16:04:46 PST 2009


On Jan 16, 2009, at 13:51:20, Jim Idle wrote:

> When you change your template or codegen target java file, you just  
> type:
>
> mvn
>
> And it rebuilds just what has changed in a second or two (depends on  
> your machine speed of course).
>
> All you need do is download and install Maven 2.0.9 on your system  
> and make sure that the mvn command is in your path. Then download  
> the source for ANTLR from the Fisheye system (just get the tar of  
> the antlr tool directory) and cd to the directory containing pom.xml.
>
> Type:
>
> mvn -Dmaven.test.skip=true
>
> And watch the output to see where it puts the jar-with-dependencies.  
> Create your self a small script that invokes this jar and you are  
> all set.


Jim, Ter gave me p4 access, and I checked out the sources. I then  
tried to build antlr but ran into problems. Any idea what I left out?  
Note that I fetched the latest, not knowing the right revision number  
for 3.1.1.

$ pwd
/Developer/Java/ANTLR/depot/code/antlr/main
$ ls
CHANGES.txt		build.properties	pom.xml			target/
LICENSE.txt		build.xml		runtime/		test/
README.txt		lib/			src/
Eclipse:main rmann$ mvn
[INFO] Scanning for projects...
[INFO]  
------------------------------------------------------------------------
[INFO] Building antlr
[INFO]    task-segment: [install]
[INFO]  
------------------------------------------------------------------------
[INFO] [antlr3:antlr {execution: default}]
[INFO] Processing grammar /Developer/Java/ANTLR/depot/code/antlr/main/ 
src/org/antlr/grammar/v3/ActionAnalysis.g
[INFO] Processing grammar /Developer/Java/ANTLR/depot/code/antlr/main/ 
src/org/antlr/grammar/v3/ActionTranslator.g
[INFO] Processing grammar /Developer/Java/ANTLR/depot/code/antlr/main/ 
src/org/antlr/grammar/v3/ANTLRv3.g
warning(105): /Developer/Java/ANTLR/depot/code/antlr/main/src/org/ 
antlr/grammar/v3/ANTLRv3.g:251:6: no lexer rule corresponding to  
token: SEMPRED
warning(105): /Developer/Java/ANTLR/depot/code/antlr/main/src/org/ 
antlr/grammar/v3/ANTLRv3.g:344:22: no lexer rule corresponding to  
token: SEMPRED
warning(105): /Developer/Java/ANTLR/depot/code/antlr/main/src/org/ 
antlr/grammar/v3/ANTLRv3.g:157:4: no lexer rule corresponding to  
token: DOC_COMMENT
warning(105): /Developer/Java/ANTLR/depot/code/antlr/main/src/org/ 
antlr/grammar/v3/ANTLRv3.g:93:9: no lexer rule corresponding to token:  
DOC_COMMENT
warning(200): /Developer/Java/ANTLR/depot/code/antlr/main/src/org/ 
antlr/grammar/v3/ANTLRv3.g:465:5: Decision can match input such as "'  
''$''A''N''T''L''R'' ''s''r''c'' ''"''\\''\'''"'' ''0'..'9'" using  
multiple alternatives: 1, 2
As a result, alternative(s) 2 were disabled for that input
[INFO] snapshot org.antlr:antlr-runtime:3.1.2-SNAPSHOT: checking for  
updates from antlr-snapshot
Downloading: http://antlr.org/antlr-snapshot/org/antlr/antlr-runtime/3.1.2-SNAPSHOT/antlr-runtime-3.1.2-SNAPSHOT.pom
Downloading: http://antlr.org/antlr-snapshot/org/antlr/antlr-runtime/3.1.2-SNAPSHOT/antlr-runtime-3.1.2-SNAPSHOT.jar
[INFO]  
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]  
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

Missing:
----------
1) org.antlr:antlr-runtime:jar:3.1.2-SNAPSHOT

   Try downloading the file manually from the project website.

   Then, install it using the command:
       mvn install:install-file -DgroupId=org.antlr -DartifactId=antlr- 
runtime -Dversion=3.1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file

   Alternatively, if you host your own repository you can deploy the  
file there:
       mvn deploy:deploy-file -DgroupId=org.antlr -DartifactId=antlr- 
runtime -Dversion=3.1.2-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file - 
Durl=[url] -DrepositoryId=[id]

   Path to dependency:
   	1) org.antlr:antlr:jar:3.1.2-SNAPSHOT
   	2) org.antlr:antlr-runtime:jar:3.1.2-SNAPSHOT

----------
1 required artifact is missing.

for artifact:
   org.antlr:antlr:jar:3.1.2-SNAPSHOT

from the specified remote repositories:
   antlr-snapshot (http://antlr.org/antlr-snapshot),
   central (http://repo1.maven.org/maven2)


[INFO]  
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]  
------------------------------------------------------------------------
[INFO] Total time: 16 seconds
[INFO] Finished at: Fri Jan 16 15:59:39 PST 2009
[INFO] Final Memory: 57M/80M
[INFO]  
------------------------------------------------------------------------


-- 
Rick



More information about the antlr-interest mailing list