I've been trying to figure out how to install OpenNLP by myself for a while now.
I have installed Maven, added it to PATH and am able to run mvn -v with the expected result.
Now I found this question, tried the same command and got the same error. As the accepted answer on it states the Command should be used in the /Users/[my_name]/apache-opennlp-1.5.2/opennlp folder, I went to look for that folder but it's not there. This is how my apache-opennlp-1.8.3 folder looks from a fresh Download:
Running mvn clean install in this folder yields the following result:
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.055 s
[INFO] Finished at: 2017-11-05T14:32:56+01:00
[INFO] Final Memory: 6M/245M
[INFO] ------------------------------------------------------------------------
[ERROR] The goal you specified requires a project to execute but there is no POM in this directory. Please verify you invoked Maven from the correct directory. -> [Help 1]
If someone could help installing OpenNLP on Windows 10 I'd be insanely happy as everything I was looking for on Google didn't help me out. I also took a look at this question which also didn't help clearing it up for me.
you downloaded the pre-compiled version of OpenNLP 1.8.3. If you look in the bin directory, you will see a file "opennlp.bat" and "opennlp". On windows, you want to run opennlp.bat, almost everyone else should run opennlp.
Related
I'm getting this error when trying to compile a java project.
[INFO] Failed to parse a schema.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:46 min
[INFO] Finished at: 2020-10-10T11:37:54+10:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:1.6:xjc (demo) on project demo-server: Could not process schema files in directory C:\Users\jake\Desktop\Demos\ec\server\src\main\xsd\demo -> [Help 1]
[ERROR]
I'm not too sure what's going wrong here, or how to fix it in order to make it successfully build.
The error messages are from the "xjc" task of "jaxb2-maven-plugin". It is trying to generate Java source code from XSD files in the "src\main\xsd\demo" directory.
Apparently, there is a syntax problem in one or more of the XSD files.
To get more information about those syntax problems, try running Maven in debug mode; e.g. include the -X option on the mvn command line.
I was testing evosuite (automation tool to generate junit test) using Maven plugin in Eclipse Luna, using JDK 1.8
I have followed the tutorial given in evosuite tutorial: http://www.evosuite.org/documentation/tutorial-part-2/
Able to generate test using the tutorial file provided by evosuite but when I tried it on one of the projects that I am working on, it couldn't generate test when I initiate mvn evosuite:generate in cmd.
understand that I first need to do a mvn compile and it actually generate all the .class files in the folder "target\classes", I actually checked that the physical files are indeed present in the folder "Classes". the folder structure is exactly the same as in the folder "src\main\java".
when I initiate "mvn evosuite:generate" ,
it actually started generating,
it is showing:
[INFO] Registered remote process from /127.0.0.1:58449
[INFO] Going to execute 139 jobs
[INFO] Estimated completion time: 278 minutes, by 2018-04-22T05:33:27.051
[INFO] Going to start job for: "Java file". Expected to end in 1158 seconds,
by 2018-04-22T01:14:45.848
and it continues until the very last java file,
showing this:
[INFO] * Updating database to "java file name"
then it came to this:
=== CTG run results ===
[INFO] Removed test suites: 0
[INFO] New test suites: 0
[INFO] Missing classes:
[INFO] "Java file name"
and ended with this statement
[INFO] WARN: failed to generate tests for 139 classes out of 139
[INFO] Stopping spawn process manager
[INFO] ---------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ---------------------------------------------------------------------
[INFO] Total time: 52:44 min
[INFO] Finished at: 2018-04-22T01:47:02+08:00
[INFO] ---------------------------------------------------------------------
I am wondering if i miss out any steps? Because using the same steps I am able to generate the test cases using the tutorial_maven provided by evosuite.
Or is this due to the complexity of the project and java files that evosuite is unable to process and generate the unit test?
Please advise! Thank you! i have tried many many different methods, mvn clean install repeatedly, but to no avail.
edit: tried eclipse plugin for evosuite as well: got the same error saying cannot find test.java file which is weird. Isn't the plugin supposed to generate the test file?
I am trying to build and run a Spring MVC beginner lesson project using IntelliJ. I imported the existing project from GitHub. But when I try to build the project I keep getting:
Error:(3, 38) java: package org.springframework.stereotype does not exist
Error:(4, 47) java: package org.springframework.web.bind.annotation does not exist
These external dependencies jars are under my Maven local repositories (C:\Users\sudi.m2)and I can see in IntelliJ under Maven->Repositories that repo location is indeed there. I also tried "Invalidate Cache and restart" but that does not help. My M2_HOME is set correctly to C:\apache-maven-3.2.2. If I try to run mvn install from command line, I get:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40.845 s
[INFO] Finished at: 2014-09-25T19:03:21+05:30
[INFO] Final Memory: 9M/93M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on project basic-web-app: Error assembling WAR: webxml attribute is required (or preexisting WEB-INF/web.xml if executing in update mode) -> [Help 1]
Any suggestions are appreciated.
If the project doesn't have a web.xml file (IE: Entirely java config based). The build war plugin will fail unless you specify the "failOnMissingWebXml" attribute to false.
Delete you local .m2 repository and let it re-download all needed jars. Maybe, there were issues while downloading one of the dependencies.
Im trying to install this maven plugin, but i have several questions which i cant do trial & error because of my slow internet speed :
The documentation said :
For the default usage of the deployer install all platforms and add-on apis, ensure that all folder in the platforms folder have names like android-3, android-4 and so on.
Do i really need to download ALL of the platforms and extras, even i dont want to use it?
And then, it said :
If you find names using the platform version (e.g. 15) in the folder name reinstall that platform from the android tool.
This is my platforms folder :
It seems all of my platform's name is using the version, do i really need to re-install ALL of those installed platforms?
Do you have any other way how to make this maven plugin work more easily?
Or do you have any better idea? (different plugin maybe, or anything). Im very new to Maven.
Thanks very much for your help.
No need to reinstall, but make sure you have all the platform levels.When you run the SDK deployer POM, the build will go looking each and every one of the platform level folders and if you have one missing the build will fail. So make sure you have all even if you don't require them. That's why they insist on the folder naming.
This is how missing platform errors look like:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:32 min
[INFO] Finished at: 2014-05-29T18:11:29-06:00
[INFO] Final Memory: 19M/246M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:properties-maven-plugin:1.0-alpha-2:read-project-properties (default) on project android-10: Properties file not found: $ANDROID_HOME/platforms/android-10/source.properties -> [Help 1]
What on earth does this mean? Cant find any help via google.
> mvn release:prepare
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Base 1.0.5
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-release-plugin:2.3.2:prepare (default-cli) # base ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.386s
[INFO] Finished at: Tue Oct 08 08:22:46 EST 2013
[INFO] Final Memory: 9M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare (default-cli) on project base: You don't have a SNAPSHOT project in the reactor projects list. -> [Help 1]
release:prepare command is supposed to prepare your snapshot project for the release. It sounds like you don't have such a snapshot project.
Here's the full details what it'll do: http://maven.apache.org/maven-release/maven-release-plugin/examples/prepare-release.html
If you're sure you should be releasing, you should be working on a maven module that has version ending with -SNAPSHOT.
Update: like noted by #khmarbaise in the comments, if your release has failed, you should do release:rollback to go back to previous state. Note though that it is not supported if you release through jenkins (jenkins issue), and it won't rollback the tags.
Don't needed manually edit pom.xml.
You can use "mvn versions:set" for batch update, something like this:
mvn versions:set -DnewVersion=1.0.3-SNAPSHOT
I've had the same error with Jenkins. In a previous release, Jenkins updated the version of the POM to a non-snapshot version, but the build failed before Jenkins could set the version to a -SNAPSHOT version again. Afterwards, making a release resulted in the error described above.
Fixing this is easy: just manually change the version of your app in pom.xml to a -SNAPSHOT version.
I know this is an old question but I had this issue recently and I found 2 solutions that others may find useful. I am using bamboo as my CI tool. The issue was that there was an error in the bamboo build leaving bamboo in an incorrect state. It had locally updated my project pom.xml with the new release version but had not checked this into SVN. The two solution that worked for me were:
Either
Delete the bamboo build-dir directory for the project and run the release again: rm -rf /opt/bamboo-home/xml-data/build-dir/PROJECT_NAME-RELEASE-JOB1
OR
Run the maven release from the command line using the following commands:
mvn release:prepare -DignoreSnapshots -Dresume=false
mvn release:perform
No need to update versions manually as that is time consuming, if version change is all you need, there is a different command that only updates the pom versions, just like updating them manually:
mvn versions:set -DgenerateBackupPoms=false -DnewVersion=1.0.XX-SNAPSHOT