Hi, I do not use windows, but are not you supposed to write
bin\opennlp.bat TokenNameFinder ? In any case, without setting the opennlp path, you need to be in the opennlp-tools directory to execute the CLI. Furthermore, if you plan to use often the CLI, I would follow these instructions to set the path: http://opennlp.apache.org/documentation/1.5.3/manual/opennlp.html#intro.cli Rodrigo On Tue, Oct 14, 2014 at 11:24 AM, Mohammad Ghufran <[email protected]> wrote: > Hello, > > I don't think that is the problem. Here is what I get when I do what you > suggested. > > C:\code\opennlp\opennlp-tools>ls > bin lang pom.xml src target > > C:\code\opennlp\opennlp-tools>bin/opennlp TokenNameFinder > 'bin' is not recognized as an internal or external command, > operable program or batch file. > > C:\code\opennlp\opennlp-tools>bin/opennlp.bat TokenNameFinder > 'bin' is not recognized as an internal or external command, > operable program or batch file. > > Cheers, > > Mohammad Ghufran > > On Tue, Oct 14, 2014 at 12:07 PM, Rodrigo Agerri <[email protected]> wrote: > >> Hi, >> >> You need to be in the opennlp-tools directory and call it like this: >> >> bin/opennlp TokenNameFinder >> >> .... for example. That is what the maven error told you: >> >> [ERROR] Failed to execute goal >> org.codehaus.mojo:exec-maven-plugin:1.3.2:java (default-cli): Goal requires >> a project to execute but there is no POM in this directory >> (C:\code\opennlp\opennlp-tools\bin). Pl >> ease verify you invoked Maven from the correct directory. -> [Help 1] >> >> HTH, >> >> Rodrigo >> >> On Tue, Oct 14, 2014 at 10:50 AM, Mohammad Ghufran <[email protected]> >> wrote: >> > Hello, >> > >> > I was able to complete the install without any errors using Java 7 but >> now, >> > I wanted to try the commandline tool so i executed "opennlp" in >> > opennlp/opennlp-tools/bin but I still get errors (the same happens for >> > "opennlp.bat"): >> > >> > C:\code\opennlp\opennlp>mvn clean install -Dskip.maven.tests=true >> > . >> > . >> > . >> > [INFO] >> > ------------------------------------------------------------------------ >> > [INFO] Reactor Summary: >> > [INFO] >> > [INFO] Apache OpenNLP Reactor ............................. SUCCESS [ >> > 3.574 s] >> > [INFO] Apache OpenNLP Tools ............................... SUCCESS >> [01:47 >> > min] >> > [INFO] Apache OpenNLP UIMA Annotators ..................... SUCCESS [ >> > 6.795 s] >> > [INFO] Apache OpenNLP Documentation ....................... SUCCESS [ >> > 7.290 s] >> > [INFO] Apache OpenNLP Distribution ........................ SUCCESS [ >> > 10.948 s] >> > [INFO] >> > ------------------------------------------------------------------------ >> > [INFO] BUILD SUCCESS >> > [INFO] >> > ------------------------------------------------------------------------ >> > [INFO] Total time: 02:16 min >> > [INFO] Finished at: 2014-10-14T11:46:51+02:00 >> > [INFO] Final Memory: 51M/355M >> > [INFO] >> > ------------------------------------------------------------------------ >> > C:\code\opennlp\opennlp>ls >> > pom.xml target >> > >> > C:\code\opennlp\opennlp>cd ../opennlp-tools/bin >> > >> > C:\code\opennlp\opennlp-tools\bin>ls >> > opennlp opennlp.bat >> > >> > C:\code\opennlp\opennlp-tools\bin>opennlp >> > [ERROR] Failed to execute goal >> > org.codehaus.mojo:exec-maven-plugin:1.3.2:java (default-cli): Goal >> requires >> > a project to execute but there is no POM in this directory >> > (C:\code\opennlp\opennlp-tools\bin). Pl >> > ease verify you invoked Maven from the correct directory. -> [Help 1] >> > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute >> > goal org.codehaus.mojo:exec-maven-plugin:1.3.2:java (default-cli): Goal >> > requires a project to execute but there is no POM in this d >> > irectory (C:\code\opennlp\opennlp-tools\bin). Please verify you invoked >> > Maven from the correct directory. >> > at >> > >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:178) >> > at >> > >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) >> > at >> > >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) >> > at >> > >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) >> > at >> > >> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) >> > at >> > >> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) >> > at >> > >> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120) >> > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347) >> > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154) >> > at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584) >> > at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213) >> > at org.apache.maven.cli.MavenCli.main(MavenCli.java:157) >> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> > at >> > >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> > at >> > >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> > at java.lang.reflect.Method.invoke(Method.java:606) >> > at >> > >> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) >> > at >> > >> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) >> > at >> > >> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) >> > at >> > org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) >> > Caused by: org.apache.maven.lifecycle.MissingProjectException: Goal >> > requires a project to execute but there is no POM in this directory >> > (C:\code\opennlp\opennlp-tools\bin). Please verify you invoked Maven >> > from the correct directory. >> > at >> > >> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:174) >> > ... 19 more >> > [ERROR] >> > [ERROR] Re-run Maven using the -X switch to enable full debug logging. >> > [ERROR] >> > [ERROR] For more information about the errors and possible solutions, >> > please read the following articles: >> > [ERROR] [Help 1] >> > http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException >> > >> > Mohammad Ghufran >> > >> > On Mon, Oct 13, 2014 at 10:32 PM, Jörn Kottmann <[email protected]> >> wrote: >> > >> >> On Mon, 2014-10-13 at 15:58 +0200, Rodrigo Agerri wrote: >> >> > Hello, >> >> > >> >> > The paste has been removed. Anyway, are you doing this? >> >> > >> >> > svn co https://svn.apache.org/repos/asf/opennlp/trunk/ opennlp >> >> > cd opennlp/opennlp >> >> > mvn clean install >> >> >> >> This should built everything. >> >> >> >> Are there issues with that on your machine? >> >> >> >> Jörn >> >> >> >> >> >> >> >> >>
