You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Yu Ishikawa <yu...@gmail.com> on 2015/07/23 08:34:19 UTC
How do I generate java classes from the antlr grammar file?
Hi all,
I am tackling the first issue of Apache NiFi. I had checked out the project
from Github with IntelliJ. And then, I tried to run a junit test suite on
IntelliJ. But, I couldn't run it because the classes which seems to be
generated by antlr, such as below, didn't exist.
org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionLexer
Even though I executed `mvn clean install` and `mcn clean compile` under the
`./nifi-parent` directory, those classes weren't generated. How do I
generate those classes?
Thanks,
Yu
--
View this message in context: http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/How-do-I-generate-java-classes-from-the-antlr-grammar-file-tp2221.html
Sent from the Apache NiFi (incubating) Developer List mailing list archive at Nabble.com.
Re: How do I generate java classes from the antlr grammar file?
Posted by Yu Ishikawa <yu...@gmail.com>.
Hi Bryan,
Thank you for the thorough explanation. I did it!
Thanks,
Yu
--
View this message in context: http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/How-do-I-generate-java-classes-from-the-antlr-grammar-file-tp2221p2225.html
Sent from the Apache NiFi (incubating) Developer List mailing list archive at Nabble.com.
Re: How do I generate java classes from the antlr grammar file?
Posted by Bryan Bende <bb...@gmail.com>.
In addition to what Joe suggested, since you mentioned running the test
suite in IntelliJ, you might also want to consider the J-Unit working
directory.
When you import a multi-module Maven project, the J-Unit working directory
will default to the top level directory, in this case 'nifi'.
If you click Run -> Edit Configurations -> Defaults -> J-Unit you can
change 'Working Directory' to $MODULE_DIRS and this will become the new
default for any tests you run, you'll also want to delete any existing
J-Unit configurations in the same window (outside the Defaults section)
because they are likely set with the wrong working directory.
-Bryan
On Thu, Jul 23, 2015 at 5:33 AM, Joe Witt <jo...@gmail.com> wrote:
> Yu
>
> Did you run 'mvn clean install' under each of the following
> directories in the following order:
>
> ./nifi-parent
> ./nifi-nar-maven-plugin
> ./nifi
>
> Also, was this on the 'develop' branch? 'git checkout develop'
>
> Thanks
> Joe
>
> On Wed, Jul 22, 2015 at 11:34 PM, Yu Ishikawa
> <yu...@gmail.com> wrote:
> > Hi all,
> >
> > I am tackling the first issue of Apache NiFi. I had checked out the
> project
> > from Github with IntelliJ. And then, I tried to run a junit test suite on
> > IntelliJ. But, I couldn't run it because the classes which seems to be
> > generated by antlr, such as below, didn't exist.
> >
> >
> org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionLexer
> >
> > Even though I executed `mvn clean install` and `mcn clean compile` under
> the
> > `./nifi-parent` directory, those classes weren't generated. How do I
> > generate those classes?
> >
> > Thanks,
> > Yu
> >
> >
> >
> > --
> > View this message in context:
> http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/How-do-I-generate-java-classes-from-the-antlr-grammar-file-tp2221.html
> > Sent from the Apache NiFi (incubating) Developer List mailing list
> archive at Nabble.com.
>
Re: How do I generate java classes from the antlr grammar file?
Posted by Yu Ishikawa <yu...@gmail.com>.
Hi Joe,
After I run the maven command under all of three directories with the
develop branch, I could generate those Java classes. And I could run a JUnit
test on IntelliJ. Finally, it seems that I will be able to develop NiFi!
Thanks,
Yu
--
View this message in context: http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/How-do-I-generate-java-classes-from-the-antlr-grammar-file-tp2221p2224.html
Sent from the Apache NiFi (incubating) Developer List mailing list archive at Nabble.com.
Re: How do I generate java classes from the antlr grammar file?
Posted by Yu Ishikawa <yu...@gmail.com>.
BTW, it would be better to build this project by one command from the
beginner's point of view. And testing it with `mvn clean test` would be also
better, instead of `mvn clean install`. Since contributors must pay
attention to the installed maven packages under development. Just an idea.
Thanks,
Yu
--
View this message in context: http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/How-do-I-generate-java-classes-from-the-antlr-grammar-file-tp2221p2233.html
Sent from the Apache NiFi (incubating) Developer List mailing list archive at Nabble.com.
Re: How do I generate java classes from the antlr grammar file?
Posted by Joe Witt <jo...@gmail.com>.
Yu
Did you run 'mvn clean install' under each of the following
directories in the following order:
./nifi-parent
./nifi-nar-maven-plugin
./nifi
Also, was this on the 'develop' branch? 'git checkout develop'
Thanks
Joe
On Wed, Jul 22, 2015 at 11:34 PM, Yu Ishikawa
<yu...@gmail.com> wrote:
> Hi all,
>
> I am tackling the first issue of Apache NiFi. I had checked out the project
> from Github with IntelliJ. And then, I tried to run a junit test suite on
> IntelliJ. But, I couldn't run it because the classes which seems to be
> generated by antlr, such as below, didn't exist.
>
> org.apache.nifi.attribute.expression.language.antlr.AttributeExpressionLexer
>
> Even though I executed `mvn clean install` and `mcn clean compile` under the
> `./nifi-parent` directory, those classes weren't generated. How do I
> generate those classes?
>
> Thanks,
> Yu
>
>
>
> --
> View this message in context: http://apache-nifi-incubating-developer-list.39713.n7.nabble.com/How-do-I-generate-java-classes-from-the-antlr-grammar-file-tp2221.html
> Sent from the Apache NiFi (incubating) Developer List mailing list archive at Nabble.com.