mvn install: Failure executing javac, but could not parse error - maven

It's the first time I try using mavan and I got the following error when I issued "mvn install" (running on vista):
[ERROR] Failure executing javac, but could not parse the error:
C:\Users\Kaze Kun\.m2\respository\org\jboss\resteasy\resteasy-jaxrs\2.2.1.GA\resteasy-jaxrs-2.2.1.GA.jar. error in opening zip file
I googled and found some threads about needing to set the JAVA_HOME environment variable. However, this seems not the case for me since I've already set my JAVA_HOME variable at C:\Java\jdk1.6.0_24. Just wondering what can be the cause of the problem?
Below is the more detail capture of the error messages from maven:
[WARNING] File encoding has not been set, using platform encoding MS932, i.e. bu
ild is platform dependent!
[INFO] Compiling 3 source files to C:\resteasy-jaxrs-2.2.1.GA\examples\oreilly-w
orkbook\ex03_1\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
エラー:C:\Users\Kaze Kun\.m2\repository\org\jboss\resteasy\resteasy-jaxrs\2.2.1.
GA\resteasy-jaxrs-2.2.1.GA.jar の読み込みエラーです。error in opening zip file
エラー 1 個
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:22.828s
[INFO] Finished at: Sat Jul 09 11:11:17 CST 2011
[INFO] Final Memory: 3M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.
3.2:compile (default-compile) on project workbook-ex03_1: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] エラー:C:\Users\Kaze Kun\.m2\repository\org\jboss\resteasy\resteasy-jaxr
s\2.2.1.GA\resteasy-jaxrs-2.2.1.GA.jar の読み込みエラーです。error in opening zi
p file
[ERROR] エラー 1 個
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
C:\resteasy-jaxrs-2.2.1.GA\examples\oreilly-workbook\ex03_1>

The error seems to indicate that the resteasy-jaxrs-2.2.1.GA.jar is corrupt.
You should try deleting this file
C:\Users\Kaze Kun\.m2\repository\org\jboss\resteasy\resteasy-jaxr
s\2.2.1.GA\resteasy-jaxrs-2.2.1.GA.jar
and retrying.

Related

I can't create .war with maven

I created a .war with maven clean install, now I need create other .war, but I get this error ->
- maven-clean-plugin:2.6.1:clean (default-clean) # tutorial---
[INFO] Deleting C:\Users\yo\eclipse-workspace\tutorial\target
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.843 s
[INFO] Finished at: 2018-09-24T15:46:51+02:00
[INFO] Final Memory: 17M/228M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.6.1:clean (default-clean) on project tutorial: Failed to clean project: Failed to delete C:\Users\yo\eclipse-workspace\tutorial\target -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/MojoExecutionException
Now My field \target is empty and I can't create .war
Some other application has opened the target folder. Due to this maven-clean-plugin is not able to delete the target folder and fails.

protobuf java runtime installation

I'm trying to build the Java runtime library for Protocol Buffers on Windows. I have downloaded and installed the binary distribution of protoc: protoc-3.3.0-win32 . I have downloaded the protobuf-master from https://github.com/google/protobuf. and tried to build Java runtime library using Maven. I ran mvn test from D:\protobuf-master\java
These errors occured when I ran mvn test.
`[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] MapTest.testPut:1248 ╗ IllegalArgument
[ERROR] MapTest.testPutForUnknownEnumValues:494 ╗ IllegalArgument
[INFO]
[ERROR] Tests run: 908, Failures: 0, Errors: 2, Skipped: 0
[INFO]
[INFO] --------------------------------------------------------------------
----
[INFO] Reactor Summary:
[INFO]
[INFO] Protocol Buffers [Parent] .......................... SUCCESS [
0.000 s]
[INFO] Protocol Buffers [Core] ............................ FAILURE [01:23
min]
[INFO] Protocol Buffers [Util] ............................ SKIPPED
[INFO] --------------------------------------------------------------------
----
[INFO] BUILD FAILURE
[INFO] --------------------------------------------------------------------
----
[INFO] Total time: 01:24 min
[INFO] Finished at: 2017-06-27T20:40:21+02:00
[INFO] Final Memory: 32M/720M
[INFO] --------------------------------------------------------------------
----
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-
plugin:2.20:test (default-test) on project protobuf-java: There are test
failures.
[ERROR]
[ERROR] Please refer to D:\protobuf-master\java\core\target\surefire-
reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump,
[date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
switch.
[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/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the
command
[ERROR] mvn <goals> -rf :protobuf-java`
The behavior was changed after 3.3.0 so either checkout v3.3.0 or compile newer version of protoc.
Commit

I am using ,maven for the first time, it is failing to build by showing some compiler error

[INFO] Scanning for projects...
[INFO] Compiling 1 source file to D:\madhav\cluster_projects\firstmaven\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Unable to locate the Javac Compiler in:
C:\Program Files\Java\jre1.8.0_92\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.314 s
[INFO] Finished at: 2016-08-02T05:32:33-07:00
[INFO] Final Memory: 7M/113M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project firstmaven: Compilation failure
[ERROR] Unable to locate the Javac Compiler in:
[ERROR] C:\Program Files\Java\jre1.8.0_92\..\lib\tools.jar
[ERROR] Please ensure you are using JDK 1.4 or above and
[ERROR] not a JRE (the com.sun.tools.javac.Main class is required).
[ERROR] In most cases you can change the location of your Java
[ERROR] installation by setting the JAVA_HOME environment variable.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] `enter code here`
[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/MojoFailureException
Hi,
I am using java 8, 64 bit and apache maven3.3.9.
I am getting this error message while running maven clean install, please help me to resolve this issue.
Have you set java home properly ??
see this link to know how to set https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html
you can check if the java home is set by typing java in console if properly set it will list the options

Error when deploy github site with maven

With this maven pom file : https://gist.github.com/PhilippeGeek/44f62827bf73bc7d9368, I can't create a blob, the output is:
[INFO] ------------------------------------------------------------------------
[INFO] Building SpeleoGraph 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- site-maven-plugin:0.6:site (default-cli) # SpeleoGraph ---
[INFO] Creating 102 blobs
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.270s
[INFO] Finished at: Sat Jul 13 23:48:01 CEST 2013
[INFO] Final Memory: 9M/152M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.github:site-maven-plugin:0.6:site (default-cli) on project SpeleoGraph: Error creating blob: Unexpected end of file from server -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/MojoExecutionException
This problem come form an out-dated version of site-maven-plugin, you should use version 0.8 or more recent.
This may happen with version 0.8 and 0.9 also, when the binary to be deployed to github is over about 30MB.
Issue on github (see comments)
Reference to a work-around for reducing the size of the binary

Allow Maven to automatically create directories in Ubuntu

I am running Maven 3.0.4 in Ubuntu 12.04. I have Java version 1.7.0_25. I am trying to use the mvn package command, but am continually running into errors, which are always along the lines of:
Failure executing javac, but could not parse the error:
javac: directory not found: /......../target/[some folder]
I couldn't figure out what this was originally but now understand from some basic googling that this is because the destination directory has to exist. The generally suggested way to handle this problem is to create an ant script which does it for you (I think).
However, I have no idea what folders actually need to be created. This is not my project I'm compiling, just something I've downloaded. Can an Ant script still be used and, if so, could anybody point me in the right direction as I have never used an ant script before, much less created one, and could quite accurately be called a Ubuntu "noob"!
Full Maven output as requested
Directory is:
flume-sources - containing
flume.conf
pom.xml
src
main
java
com
cloudera
flume
source
TwitterSource.java
TwitterSourceConstants.java
Maven error is:
andrew#andrew-VirtualBox:~/flume-sources$ mvn package
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building flume-sources 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.3:resources (default-resources) # flume-sources ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/andrew/flume-sources/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # flume-sources ---
[INFO] Compiling 2 source files to /home/andrew/flume-sources/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
javac: directory not found: /home/andrew/flume-sources/target/classes
Usage: javac <options> <source files>
use -help for a list of possible options
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.470s
[INFO] Finished at: Mon Jul 08 12:35:58 BST 2013
[INFO] Final Memory: 9M/59M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project flume-sources: Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR] javac: directory not found: /home/andrew/flume-sources/target/classes
[ERROR] Usage: javac <options> <source files>
[ERROR] use -help for a list of possible options
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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/MojoFailureException
andrew#andrew-VirtualBox:~/flume-sources$
No, you don't need to create the folder by hand or with an ant script.
If the target folder doesn't exist when you run mvn, it will create it
So my guess is that you have a permissions issue
The user running maven can't create folders in /home/andrew/flume-sources
just as a test, run mvn as root
sudo mvn package
if that works then it is what I said and you will need to 1) chown the folder so that the user running maven can create folders in it (rw) or 2) run mvn from the same user that owns the folder (which i'm guessing is andrew)

Resources