[antlr-interest] ANTLR building and Maven 2

Michael Richter ttmrichter at gmail.com
Tue Feb 16 20:34:53 PST 2010


I think I'm being as thick as a whale sandwich here, but I can't get ANTLR
to work nicely with Maven 2 at all.  The instructions for this in a variety
of places are ... inconsistent and in most cases also not terribly well
written.  Not having any way to generate a functioning skeleton (that I can
see) doesn't help much.

I had the brilliant idea of using the ANTLR build process itself to solve
the problem by looking at a known-good pom.xml file that does the trick.
That's when I got hit by this:

michael at isolde:~/Development/antlr-3.2$ mvn
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO]   ANTLR Master build control POM
[INFO]   Antlr 3 Runtime
[INFO]   ANTLR Grammar Tool
[INFO]   Maven plugin for ANTLR V3
[INFO]   ANTLR gUnit
[INFO]   Maven plugin for gUnit ANTLR V3
[INFO]
------------------------------------------------------------------------
[INFO] Building ANTLR Master build control POM
[INFO]    task-segment: [install]
[INFO]
------------------------------------------------------------------------
[INFO] [buildnumber:create {execution: default}]
[INFO] Storing buildNumber: Feb 17, 2010 12:28:04 at timestamp:
1266380884520
[INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] The scm url cannot be null.
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException: The scm url cannot be null.
    at
org.apache.maven.scm.manager.AbstractScmManager.makeScmRepository(AbstractScmManager.java:181)
    at
org.codehaus.mojo.build.CreateMojo.getScmRepository(CreateMojo.java:722)
    at org.codehaus.mojo.build.CreateMojo.getScmBranch(CreateMojo.java:593)
    at org.codehaus.mojo.build.CreateMojo.execute(CreateMojo.java:452)
    at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at
org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    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:597)
    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)
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 3 seconds
[INFO] Finished at: Wed Feb 17 12:28:04 CST 2010
[INFO] Final Memory: 15M/176M
[INFO]
------------------------------------------------------------------------

This bothers me a bit, not being able to build the package from the provided
source.  What bothers me even more is the reference to the "scm URL".  A
quick grep of the pom.xml files finds one of them (runtime/Java/pom.xml)
that has an <scm>...</scm> tag -- and it's not empty.

I'm now at a complete loss for how to progress.  I can't use Maven on the
project I'm working on because I don't know how to get it working and I
can't find out how to make it work by looking at ANTLR's source because the
build is broken for me.  What's the next step?

-- 
"Perhaps people don't believe this, but throughout all of the discussions of
entering China our focus has really been what's best for the Chinese people.
It's not been about our revenue or profit or whatnot."
--Sergey Brin, demonstrating the emptiness of the "don't be evil" mantra.


More information about the antlr-interest mailing list