You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Stefano Fornari <st...@gmail.com> on 2006/05/23 11:55:40 UTC
NPE using JavaCC
Hi All,
still struggling with JavaCC and Maven. I have the following pom:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>funambol-framework</artifactId>
<groupId>com.funambol</groupId>
<version>3.0-SNAPSHOT</version>
<name>Funambol Framework</name>
<dependencies>
<!--
External dependencies
-->
<dependency>
<artifactId>commons-lang</artifactId>
<groupId>commons-lang</groupId>
<version>2.0</version>
</dependency>
<dependency>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
<version>2.4</version>
</dependency>
<dependency>
<artifactId>p6spy</artifactId>
<groupId>p6spy</groupId>
<version>1.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>net.java.dev.javacc</groupId>
<artifactId>javacc</artifactId>
<version>4.0</version>
<configuration>
</configuration>
</plugin>
</plugins>
</build>
</project>
And when I run mvn compile, I get a Null Pointer Exception:
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Funambol Framework
[INFO] task-segment: [compile]
[INFO] ----------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/net/java/dev/javacc/javacc/4.0/javacc-4.0.pom
897b downloaded
Downloading: http://repo1.maven.org/maven2/net/java/dev/javacc/javacc/4.0/javacc-4.0.jar
267K downloaded
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] null
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NullPointerException
at org.apache.maven.plugin.DefaultPluginManager.addPlugin(DefaultPluginManager.java:292)
at org.apache.maven.plugin.DefaultPluginManager.verifyVersionedPlugin(DefaultPluginManager.java:198)
at org.apache.maven.plugin.DefaultPluginManager.verifyPlugin(DefaultPluginManager.java:163)
[...]
Has anyone a clue?
Thanks in advance.
Stefano
--
Stefano Fornari - Funambol Chief Architect / Funambol CTO
=======================================================
Home:
http://www.funambol.org
Documents:
http://www.funambol.org/documentation/documents.html
FAQ:
http://www.funambol.org/support/faq.html
WIKI:
https://wiki.objectweb.org/sync4j/
Mailinglist archives:
http://groups.yahoo.com/group/Sync4j (login required)
http://sourceforge.net/mailarchive/forum.php?forum_id=215
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: NPE using JavaCC
Posted by Stefano Fornari <st...@gmail.com>.
Hey Tim!
you are great! Thanks a lot for your help, it worked. I hope I'll have
the opportunity to pay the bill in some way ;)
Ste
On 5/23/06, Tim Kettler <ti...@udo.edu> wrote:
> (Almost) all plugins have a groupId of either 'org.apache.maven.plugins' or
> 'org.codehaus.mojo' so everything else looks suspicious until proved otherwise :-)
>
> Have you tried the links from my first mail? I have checked them before posting and they
> did work for me.
>
> Just to be sure: In case the links don't work for you I paste this sample configuration
> snippet from the first link:
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>javacc-maven-plugin</artifactId>
> <executions>
> <execution>
> <goals>
> <goal>javacc</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
>
> -Tim
>
>
--
Stefano Fornari - Funambol Chief Architect / Funambol CTO
=======================================================
Home:
http://www.funambol.org
Documents:
http://www.funambol.org/documentation/documents.html
FAQ:
http://www.funambol.org/support/faq.html
WIKI:
https://wiki.objectweb.org/sync4j/
Mailinglist archives:
http://groups.yahoo.com/group/Sync4j (login required)
http://sourceforge.net/mailarchive/forum.php?forum_id=215
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: NPE using JavaCC
Posted by Tim Kettler <ti...@udo.edu>.
(Almost) all plugins have a groupId of either 'org.apache.maven.plugins' or
'org.codehaus.mojo' so everything else looks suspicious until proved otherwise :-)
Have you tried the links from my first mail? I have checked them before posting and they
did work for me.
Just to be sure: In case the links don't work for you I paste this sample configuration
snippet from the first link:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>javacc-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>javacc</goal>
</goals>
</execution>
</executions>
</plugin>
-Tim
Stefano Fornari schrieb:
> That's a great catch!
> I actually assumed I could use it as plugin, because when I ran mvn
> javacc:javacc, I get:
>
> INFO] Scanning for projects...
> [INFO] Searching repository for plugin with prefix: 'javacc'.
> [INFO]
> ----------------------------------------------------------------------------
>
> [INFO] Building Funambol Framework
> [INFO] task-segment: [javacc:javacc]
> [INFO]
> ----------------------------------------------------------------------------
>
> Downloading: http://repo1.maven.org/maven2/javacc/javacc/3.2/javacc-3.2.pom
> 281b downloaded
> [WARNING] While downloading javacc:javacc:3.2
> This artifact has been relocated to net.java.dev.javacc:javacc:3.2.
>
>
> Downloading:
> http://repo1.maven.org/maven2/net/java/dev/javacc/javacc/3.2/javacc-3.2.pom
> 162b downloaded
> Downloading:
> http://repo1.maven.org/maven2/net/java/dev/javacc/javacc/3.2/javacc-3.2.jar
> 369K downloaded
>
> so I assumed it downloaded the plug-in as well. It looks like it was a
> wrong assumption.
>
> Now I would like that maven would invoke the javacc source generation
> without calling javacc:javacc. I guess I have to specify some plug in
> or something, because now it does not work. Sorry to bother you, but
> the codehous site is down and I could not find any information
> googleling....
>
> Stefano
>
> On 5/23/06, Tim Kettler <ti...@udo.edu> wrote:
>>
>> The pom of the artifact you are referencing in your plugin definition
>> (http://repo.mergere.com/maven2/net/java/dev/javacc/javacc/4.0/javacc-4.0.pom)
>> has a
>> packaging of type 'jar' and not 'maven-plugin' as it should if it
>> really is a plugin. I
>> think this is just javacc itself.
>>
>> Or does your javacc-plugin come from an other repository?
>>
>> -Tim
>>
>> Stefano Fornari schrieb:
>> > Hi Tim,
>> > I am sure it exists, otherwise I get an error that the plugin cannot
>> > be found. The weird thing is that the NPE is in the maven code, not
>> > int the plug-in code.... but I am pretty sure it is a configuration
>> > problem (actually, the fact I get a NPE is probably a maven bug, but
>> > due to a not correct pom).
>> >
>> > Thanks for your reply.
>> >
>> > Stefano
>> >
>> > On 5/23/06, Tim Kettler <ti...@udo.edu> wrote:
>> >> Stefano Fornari schrieb:
>> >> > Hi All,
>> >> > still struggling with JavaCC and Maven. I have the following pom:
>> >> >
>> >> > <project xmlns="http://maven.apache.org/POM/4.0.0"
>> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> >> > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> >> > http://maven.apache.org/maven-v4_0_0.xsd">
>> >> > <modelVersion>4.0.0</modelVersion>
>> >> > <artifactId>funambol-framework</artifactId>
>> >> > <groupId>com.funambol</groupId>
>> >> > <version>3.0-SNAPSHOT</version>
>> >> > <name>Funambol Framework</name>
>> >> > <dependencies>
>> >>
>> >> [...]
>> >>
>> >> > <build>
>> >> > <plugins>
>> >> > <plugin>
>> >> > <groupId>net.java.dev.javacc</groupId>
>> >> > <artifactId>javacc</artifactId>
>> >> > <version>4.0</version>
>> >> > <configuration>
>> >> > </configuration>
>> >> > </plugin>
>> >> > </plugins>
>> >> > </build>
>> >> >
>> >> > </project>
>> >>
>> >> Are your sure the plugin with the artifact id 'javacc' with the
>> >> groupid 'net.java.dev'
>> >> exists? I only know the javacc plugin from the mojo project over at
>> >> codehaus.org.
>> >>
>> >> The mojo homepage is currently down due to the codehaus outage but you
>> >> can have a look at
>> >> the apt sources of the javacc-plugin site here:
>> >>
>> http://svn.codehaus.org/mojo/trunk/mojo/javacc-maven-plugin/src/site/apt/index.apt.
>>
>> >> It's
>> >> quite readable.
>> >>
>> >> Or you can checkout the plugin sources via svn from here:
>> >> http://svn.codehaus.org/mojo/trunk/mojo/javacc-maven-plugin/. and
>> >> build the site locally
>> >> with 'mvn site:site'.
>> >>
>> >> >
>> >> >
>> >> > [...]
>> >> >
>> >> > Has anyone a clue?
>> >> >
>> >> > Thanks in advance.
>> >> >
>> >> > Stefano
>> >> >
>> >> >
>> >>
>> >> Hope this help
>> >> -Tim
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> For additional commands, e-mail: users-help@maven.apache.org
>> >>
>> >>
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: NPE using JavaCC
Posted by Stefano Fornari <st...@gmail.com>.
That's a great catch!
I actually assumed I could use it as plugin, because when I ran mvn
javacc:javacc, I get:
INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'javacc'.
[INFO] ----------------------------------------------------------------------------
[INFO] Building Funambol Framework
[INFO] task-segment: [javacc:javacc]
[INFO] ----------------------------------------------------------------------------
Downloading: http://repo1.maven.org/maven2/javacc/javacc/3.2/javacc-3.2.pom
281b downloaded
[WARNING] While downloading javacc:javacc:3.2
This artifact has been relocated to net.java.dev.javacc:javacc:3.2.
Downloading: http://repo1.maven.org/maven2/net/java/dev/javacc/javacc/3.2/javacc-3.2.pom
162b downloaded
Downloading: http://repo1.maven.org/maven2/net/java/dev/javacc/javacc/3.2/javacc-3.2.jar
369K downloaded
so I assumed it downloaded the plug-in as well. It looks like it was a
wrong assumption.
Now I would like that maven would invoke the javacc source generation
without calling javacc:javacc. I guess I have to specify some plug in
or something, because now it does not work. Sorry to bother you, but
the codehous site is down and I could not find any information
googleling....
Stefano
On 5/23/06, Tim Kettler <ti...@udo.edu> wrote:
>
> The pom of the artifact you are referencing in your plugin definition
> (http://repo.mergere.com/maven2/net/java/dev/javacc/javacc/4.0/javacc-4.0.pom) has a
> packaging of type 'jar' and not 'maven-plugin' as it should if it really is a plugin. I
> think this is just javacc itself.
>
> Or does your javacc-plugin come from an other repository?
>
> -Tim
>
> Stefano Fornari schrieb:
> > Hi Tim,
> > I am sure it exists, otherwise I get an error that the plugin cannot
> > be found. The weird thing is that the NPE is in the maven code, not
> > int the plug-in code.... but I am pretty sure it is a configuration
> > problem (actually, the fact I get a NPE is probably a maven bug, but
> > due to a not correct pom).
> >
> > Thanks for your reply.
> >
> > Stefano
> >
> > On 5/23/06, Tim Kettler <ti...@udo.edu> wrote:
> >> Stefano Fornari schrieb:
> >> > Hi All,
> >> > still struggling with JavaCC and Maven. I have the following pom:
> >> >
> >> > <project xmlns="http://maven.apache.org/POM/4.0.0"
> >> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> >> > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> >> > http://maven.apache.org/maven-v4_0_0.xsd">
> >> > <modelVersion>4.0.0</modelVersion>
> >> > <artifactId>funambol-framework</artifactId>
> >> > <groupId>com.funambol</groupId>
> >> > <version>3.0-SNAPSHOT</version>
> >> > <name>Funambol Framework</name>
> >> > <dependencies>
> >>
> >> [...]
> >>
> >> > <build>
> >> > <plugins>
> >> > <plugin>
> >> > <groupId>net.java.dev.javacc</groupId>
> >> > <artifactId>javacc</artifactId>
> >> > <version>4.0</version>
> >> > <configuration>
> >> > </configuration>
> >> > </plugin>
> >> > </plugins>
> >> > </build>
> >> >
> >> > </project>
> >>
> >> Are your sure the plugin with the artifact id 'javacc' with the
> >> groupid 'net.java.dev'
> >> exists? I only know the javacc plugin from the mojo project over at
> >> codehaus.org.
> >>
> >> The mojo homepage is currently down due to the codehaus outage but you
> >> can have a look at
> >> the apt sources of the javacc-plugin site here:
> >> http://svn.codehaus.org/mojo/trunk/mojo/javacc-maven-plugin/src/site/apt/index.apt.
> >> It's
> >> quite readable.
> >>
> >> Or you can checkout the plugin sources via svn from here:
> >> http://svn.codehaus.org/mojo/trunk/mojo/javacc-maven-plugin/. and
> >> build the site locally
> >> with 'mvn site:site'.
> >>
> >> >
> >> >
> >> > [...]
> >> >
> >> > Has anyone a clue?
> >> >
> >> > Thanks in advance.
> >> >
> >> > Stefano
> >> >
> >> >
> >>
> >> Hope this help
> >> -Tim
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Stefano Fornari - Funambol Chief Architect / Funambol CTO
=======================================================
Home:
http://www.funambol.org
Documents:
http://www.funambol.org/documentation/documents.html
FAQ:
http://www.funambol.org/support/faq.html
WIKI:
https://wiki.objectweb.org/sync4j/
Mailinglist archives:
http://groups.yahoo.com/group/Sync4j (login required)
http://sourceforge.net/mailarchive/forum.php?forum_id=215
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: NPE using JavaCC
Posted by Tim Kettler <ti...@udo.edu>.
The pom of the artifact you are referencing in your plugin definition
(http://repo.mergere.com/maven2/net/java/dev/javacc/javacc/4.0/javacc-4.0.pom) has a
packaging of type 'jar' and not 'maven-plugin' as it should if it really is a plugin. I
think this is just javacc itself.
Or does your javacc-plugin come from an other repository?
-Tim
Stefano Fornari schrieb:
> Hi Tim,
> I am sure it exists, otherwise I get an error that the plugin cannot
> be found. The weird thing is that the NPE is in the maven code, not
> int the plug-in code.... but I am pretty sure it is a configuration
> problem (actually, the fact I get a NPE is probably a maven bug, but
> due to a not correct pom).
>
> Thanks for your reply.
>
> Stefano
>
> On 5/23/06, Tim Kettler <ti...@udo.edu> wrote:
>> Stefano Fornari schrieb:
>> > Hi All,
>> > still struggling with JavaCC and Maven. I have the following pom:
>> >
>> > <project xmlns="http://maven.apache.org/POM/4.0.0"
>> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
>> > http://maven.apache.org/maven-v4_0_0.xsd">
>> > <modelVersion>4.0.0</modelVersion>
>> > <artifactId>funambol-framework</artifactId>
>> > <groupId>com.funambol</groupId>
>> > <version>3.0-SNAPSHOT</version>
>> > <name>Funambol Framework</name>
>> > <dependencies>
>>
>> [...]
>>
>> > <build>
>> > <plugins>
>> > <plugin>
>> > <groupId>net.java.dev.javacc</groupId>
>> > <artifactId>javacc</artifactId>
>> > <version>4.0</version>
>> > <configuration>
>> > </configuration>
>> > </plugin>
>> > </plugins>
>> > </build>
>> >
>> > </project>
>>
>> Are your sure the plugin with the artifact id 'javacc' with the
>> groupid 'net.java.dev'
>> exists? I only know the javacc plugin from the mojo project over at
>> codehaus.org.
>>
>> The mojo homepage is currently down due to the codehaus outage but you
>> can have a look at
>> the apt sources of the javacc-plugin site here:
>> http://svn.codehaus.org/mojo/trunk/mojo/javacc-maven-plugin/src/site/apt/index.apt.
>> It's
>> quite readable.
>>
>> Or you can checkout the plugin sources via svn from here:
>> http://svn.codehaus.org/mojo/trunk/mojo/javacc-maven-plugin/. and
>> build the site locally
>> with 'mvn site:site'.
>>
>> >
>> >
>> > [...]
>> >
>> > Has anyone a clue?
>> >
>> > Thanks in advance.
>> >
>> > Stefano
>> >
>> >
>>
>> Hope this help
>> -Tim
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: NPE using JavaCC
Posted by Stefano Fornari <st...@gmail.com>.
Hi Tim,
I am sure it exists, otherwise I get an error that the plugin cannot
be found. The weird thing is that the NPE is in the maven code, not
int the plug-in code.... but I am pretty sure it is a configuration
problem (actually, the fact I get a NPE is probably a maven bug, but
due to a not correct pom).
Thanks for your reply.
Stefano
On 5/23/06, Tim Kettler <ti...@udo.edu> wrote:
> Stefano Fornari schrieb:
> > Hi All,
> > still struggling with JavaCC and Maven. I have the following pom:
> >
> > <project xmlns="http://maven.apache.org/POM/4.0.0"
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> > http://maven.apache.org/maven-v4_0_0.xsd">
> > <modelVersion>4.0.0</modelVersion>
> > <artifactId>funambol-framework</artifactId>
> > <groupId>com.funambol</groupId>
> > <version>3.0-SNAPSHOT</version>
> > <name>Funambol Framework</name>
> > <dependencies>
>
> [...]
>
> > <build>
> > <plugins>
> > <plugin>
> > <groupId>net.java.dev.javacc</groupId>
> > <artifactId>javacc</artifactId>
> > <version>4.0</version>
> > <configuration>
> > </configuration>
> > </plugin>
> > </plugins>
> > </build>
> >
> > </project>
>
> Are your sure the plugin with the artifact id 'javacc' with the groupid 'net.java.dev'
> exists? I only know the javacc plugin from the mojo project over at codehaus.org.
>
> The mojo homepage is currently down due to the codehaus outage but you can have a look at
> the apt sources of the javacc-plugin site here:
> http://svn.codehaus.org/mojo/trunk/mojo/javacc-maven-plugin/src/site/apt/index.apt. It's
> quite readable.
>
> Or you can checkout the plugin sources via svn from here:
> http://svn.codehaus.org/mojo/trunk/mojo/javacc-maven-plugin/. and build the site locally
> with 'mvn site:site'.
>
> >
> >
> > [...]
> >
> > Has anyone a clue?
> >
> > Thanks in advance.
> >
> > Stefano
> >
> >
>
> Hope this help
> -Tim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
Stefano Fornari - Funambol Chief Architect / Funambol CTO
=======================================================
Home:
http://www.funambol.org
Documents:
http://www.funambol.org/documentation/documents.html
FAQ:
http://www.funambol.org/support/faq.html
WIKI:
https://wiki.objectweb.org/sync4j/
Mailinglist archives:
http://groups.yahoo.com/group/Sync4j (login required)
http://sourceforge.net/mailarchive/forum.php?forum_id=215
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: NPE using JavaCC
Posted by Tim Kettler <ti...@udo.edu>.
Stefano Fornari schrieb:
> Hi All,
> still struggling with JavaCC and Maven. I have the following pom:
>
> <project xmlns="http://maven.apache.org/POM/4.0.0"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/maven-v4_0_0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <artifactId>funambol-framework</artifactId>
> <groupId>com.funambol</groupId>
> <version>3.0-SNAPSHOT</version>
> <name>Funambol Framework</name>
> <dependencies>
[...]
> <build>
> <plugins>
> <plugin>
> <groupId>net.java.dev.javacc</groupId>
> <artifactId>javacc</artifactId>
> <version>4.0</version>
> <configuration>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> </project>
Are your sure the plugin with the artifact id 'javacc' with the groupid 'net.java.dev'
exists? I only know the javacc plugin from the mojo project over at codehaus.org.
The mojo homepage is currently down due to the codehaus outage but you can have a look at
the apt sources of the javacc-plugin site here:
http://svn.codehaus.org/mojo/trunk/mojo/javacc-maven-plugin/src/site/apt/index.apt. It's
quite readable.
Or you can checkout the plugin sources via svn from here:
http://svn.codehaus.org/mojo/trunk/mojo/javacc-maven-plugin/. and build the site locally
with 'mvn site:site'.
>
>
> [...]
>
> Has anyone a clue?
>
> Thanks in advance.
>
> Stefano
>
>
Hope this help
-Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org