I am trying to get gwt validation working using the hibernate validator. I have followed the steps from http://code.google.com/p/google-web-toolkit/wiki/BeanValidation and configured my project according to the sample validation project at http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/validation/
My .gwt.xml file contains:
<inherits name="org.hibernate.validator.HibernateValidator" />
and my custom validation factory:
<replace-with class="my.package.here.client.validation.ValidatorFactory">
<when-type-is class="javax.validation.ValidatorFactory" />
</replace-with>
Validation works perfect both on client and server side in dev mode, but when trying to gwt compile I get:
gwtc-production:
[java] Compiling module my.package.MyModule
[java] Validating newly compiled units
[java] [ERROR] Errors in 'jar:file:/hibernate-validator-4.2.0.Final-sources.jar!/org/hibernate/validator/constraints/impl/FutureValidatorForReadableInstant.java'
[java] [ERROR] Line 32: No source code is available for type org.joda.time.ReadableInstant; did you forget to inherit a required module?
[java] [ERROR] Errors in 'jar:file:/hibernate-validator-4.2.0.Final-sources.jar!/org/hibernate/validator/constraints/impl/FutureValidatorForReadablePartial.java'
[java] [ERROR] Line 32: No source code is available for type org.joda.time.ReadablePartial; did you forget to inherit a required module?
[java] [ERROR] Errors in 'jar:file:/hibernate-validator-4.2.0.Final-sources.jar!/org/hibernate/validator/constraints/impl/PastValidatorForReadableInstant.java'
[java] [ERROR] Errors in 'jar:file:/hibernate-validator-4.2.0.Final-sources.jar!/org/hibernate/validator/constraints/impl/SafeHtmlValidator.java'
[java] [ERROR] Line 22: The import org.jsoup cannot be resolved
[java] [ERROR] Line 23: The import org.jsoup cannot be resolved
[java] [ERROR] Line 35: Whitelist cannot be resolved to a type
[java] [ERROR] Line 40: Whitelist cannot be resolved to a type
[java] [ERROR] Line 40: Whitelist cannot be resolved
[java] [ERROR] Line 43: Whitelist cannot be resolved to a type
[java] [ERROR] Line 43: Whitelist cannot be resolved
[java] [ERROR] Line 46: Whitelist cannot be resolved to a type
[java] [ERROR] Line 46: Whitelist cannot be resolved
[java] [ERROR] Line 49: Whitelist cannot be resolved to a type
[java] [ERROR] Line 49: Whitelist cannot be resolved
[java] [ERROR] Line 52: Whitelist cannot be resolved to a type
[java] [ERROR] Line 52: Whitelist cannot be resolved
[java] [ERROR] Line 55: Whitelist cannot be resolved to a type
[java] [ERROR] Line 62: Jsoup cannot be resolved
[java] [ERROR] Line 62: Whitelist cannot be resolved to a type
[java] [ERROR] Errors in 'jar:file:gwt-user.jar!/org/hibernate/validator/super/org/hibernate/validator/engine/PathImpl.java'
[java] [ERROR] Line 72: The constructor NodeImpl(String) is undefined
[java] [ERROR] Line 84: The constructor NodeImpl(Path.Node) is undefined
[java] [ERROR] Line 95: The constructor NodeImpl(Path.Node) is undefined
[java] [ERROR] Line 202: The constructor NodeImpl(String) is undefined
[java] [ERROR] Line 204: The method setInIterable(boolean) is undefined for the type NodeImpl
[java] [ERROR] Line 209: The method setIndex(Integer) is undefined for the type NodeImpl
[java] [ERROR] Line 212: The method setKey(String) is undefined for the type NodeImpl
[java] [ERROR] Aborting compile due to errors in some input files
There is obviously some source jar I'm missing. I have (among others) on my classpath:
hibernate-validator-4.2.0.Final.jar
hibernate-validator-4.2.0.Final-sources.jar
I have also tried adding joda-time-2.1.jar, joda-time-2.1-sources.jar, jsoup-1.6.3.jar and jsoup-1.6.3-sources.jar.
Shouldn't inheriting the org.hibernate.validator.HibernateValidator take care of the super sources so I don't need to provide the sources? Can anyone see what I'm missing?
GWT is built against Hibernate Validator 4.1.0-Final and relies on some of its internals (PathImpl, NodeImpl), and apparently those have changed in Hibernate Validator 4.2.0.
Use 4.1.0-Final (or possibly 4.0.2.GA as in the sample) instead of 4.2.0.
Issue can be tracked in the GWT Tracker, we should probably at least document the incompatibility explicitly.
I didn't knew the GWT implementation of Hibernate validation. But why is GWT trying to understand code from your very Hibernate source jar? If it's GWT's own code it should come from it's gwt-user.jar or something like that.
If you agree with me, then don't include any real Hibernate jar in GWT compilation classpath. It won't need it / know it, anyway.
4.1.0 also worked for me, after some time I found out that there are a few problems with higher versions. Therefore use same versions as recommaned within the tutorial from gwt (http://www.gwtproject.org/doc/latest/DevGuideValidation.html) also I had a compile WARNING:
detected warnings related to 'javax.validation.constraint'. is validation- version .jar on the classpath
Which i fixed with:
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<scope>compile</scope>
</dependency>
Related
Great fan of Scala, but SBT keeps giving me tooth aches in places without teeth.
Usually I manage, but this one has me somewhat baffled.
Can anyone help me with the following:
TL/DR
While re-importing my sbt-project, I encountered the following error.
[error] (update) java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\5.7.0\cucumber-junit-5.7.0.pom.lock
It seems that the import encountered some corrupt path including a tab character while resolving the cucumber dependency. The weird thing is, that this was a re-import; it imported fine before. Also, the actual path C:\Users\\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\5.7.0\ cannot be found, neither via the explorer or the shell.
The error first occurred while importing the project into Intellij, but using SBT via the shell yielded the same.
Details below.
Does anyone know how to:
- solve this?
- prevent it from happening again?
Project can be found here
Full SBT log:
[info] Loading global plugins from C:\Users\-username-\.sbt\1.0\plugins
[info] Loading settings for project sandbox-build from plugins.sbt ...
[info] Loading project definition from C:\coding\modules\scala\sandbox\project
[info] Loading settings for project sandbox from build.sbt ...
[info] Set current project to sandbox (in build file:/C:/coding/modules/scala/sandbox/)
[error] java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\6.0.0-RC2\cucumber-junit-6.0.0-RC2.pom.lock
[error] at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
[error] at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
[error] at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
[error] at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
[error] at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
[error] at java.base/java.io.File.toPath(File.java:2311)
[error] at lmcoursier.internal.shaded.coursier.cache.CacheLocks$.withLockOr(CacheLocks.scala:35)
[error] at lmcoursier.internal.shaded.coursier.cache.FileCache.$anonfun$download$32(FileCache.scala:508)
[error] at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
[error] at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error] at scala.util.Success.map(Try.scala:213)
[error] at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error] at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error] at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[error] at java.base/java.lang.Thread.run(Thread.java:832)
[error] (update) java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\6.0.0-RC2\cucumber-junit-6.0.0-RC2.pom.lock
[error] Total time: 1 s, completed 4 jun. 2020 13:57:57```
Already tried to
clear the Coursier cache by deleting the C:\Users\-username-\AppData\Local\Coursier\cache\ directory
clear the project by deleting the ./target and ./project/target directories
update the offending Cucumber dependencies to 6.0.0-RC2
It seems that the lock file still exists somewhere and SBT can't re-download itself?
As the exception reports there are 6 spaces or a tab to many. Exactly the ones in your build.sbt file on line 52: "io.cucumbe\t r". Happy programming!
Currently I am working on customization of Open Source Jitsi. And Somehow, I want to add 3rd party jar for customization.
I tried a lot to include 3rd party jar but I am facing this error.
So please help me to get rid of this error or provide some guidance to add 3rd party jar .
Auto-properties install: reference:file:sc-bundles/commons-vfs2-2.0.jar (org.osgi.framework.BundleException: Unable to cache bundle: reference:file:sc-bundles/commons-vfs2-2.0.jar - java.io.IOException: Referenced file does not exist: sc-bundles\commons-vfs2-2.0.jar)
[java] org.osgi.framework.BundleException: Unable to cache bundle: reference:file:sc-bundles/commons-vfs2-2.0.jar
[java] at org.apache.felix.framework.Felix.installBundle(Felix.java:2876)
[java] at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:165)
[java] at org.apache.felix.main.AutoProcessor.processAutoProperties(AutoProcessor.java:296)
[java] at org.apache.felix.main.AutoProcessor.process(AutoProcessor.java:79)
[java] at org.apache.felix.main.Main.main(Main.java:292)
[java] at net.java.sip.communicator.launcher.SIPCommunicator.main(SIPCommunicator.java:219)
[java] Caused by: java.io.IOException: Referenced file does not exist: sc-bundles\commons-vfs2-2.0.jar
[java] at org.apache.felix.framework.cache.BundleArchive.createRevisionFromLocation(BundleArchive.java:852)
[java] at org.apache.felix.framework.cache.BundleArchive.reviseInternal(BundleArchive.java:550)
[java] at org.apache.felix.framework.cache.BundleArchive.<init>(BundleArchive.java:153)
[java] at org.apache.felix.framework.cache.BundleCache.create(BundleCache.java:277)
[java] at org.apache.felix.framework.Felix.installBundle(Felix.java:2872)
[java] ... 5 more
Add your JAR file (custom.jar) to the lib/ directory. Then edit the two files as indicated below:
jitsi.eml - Add the following entry to the file :
<lib name="custom.jar" scope="COMPILE">
<relative-module-cls project-related="jar://$PROJECT_DIR$/lib/custom.jar!/"/>
</lib>
nbproject/project.xml - Search for <classpath mode="compile"> (there are two such occurences) and enlist your jar file as
<classpath mode="compile">lib/custom.jar:lib/felix.jar:[MORE JARS HERE]</classpath>
and
<classpath mode="compile">classes:lib/custom.jar:lib/felix.jar:[MORE JARS HERE]</classpath>
After editing the files, run ant clean; ant clean-bundles; ant make
And you are good to go.
I try to compile apk using Appcelerator but i get this error and i using module ti.cloudpush. How to solve it.
Currently I'm using Titanium sdk: 5.2.0.GA
[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/LifecycleDelegate;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GoogleAuthUtil;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/UserRecoverableAuthException;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GoogleAuthException;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GooglePlayServicesAvailabilityException;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/UserRecoverableNotifiedException;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GooglePlayServicesUtil;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/UserRecoverableException;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/AccountPicker;
[ERROR] :
[ERROR] : UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] : java.lang.RuntimeException: Translation has been interrupted
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608)
[ERROR] : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
[ERROR] : at com.android.dx.command.dexer.Main.run(Main.java:277)
[ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:245)
[ERROR] : at com.android.dx.command.Main.main(Main.java:106)
[ERROR] : Caused by: java.lang.InterruptedException: Too many errors
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600)
[ERROR] : ... 4 more
Here all the module that I used i the project
<modules>
<module platform="commonjs">ti.cloud</module>
<module platform="android">dk.napp.drawer</module>
<module platform="android">ti.admob</module>
<module platform="android">ti.ga</module>
<module platform="android">ti.cloudpush</module>
</modules>
Thanks
Google play services is included in ti.cloudpush, ti.admob, and ti.ga. You have conflicting versions of the library.
My recommendation is to select one version of google-play-services.jar and forcibly replace the jar files in all the modules with this one version.
I actually copied the ti.cloudpush module into my project directory so that I can maintain it directly (and keep the proper version of google-play-services.jar checked into my source code repository).
I have not had any problem if I replace the jar file with a newer version. You can cross-reference your jar file versions against this document: http://www.smorgasbork.com/2015/01/05/google-play-services-sdk-version-history/
BTW -- there is another module available for google analytics. I have used https://github.com/Sitata/titanium-google-analytics with much success. I'm not sure what the difference is between that one and Ti.GA (although I think Ben Bahrenburg is a great Ti developer, so I might have to look into that one).
Probably the problem is with the embedded google play services into cloudpush and admob, try to remove one of this module and see if it compile.
I have a test class that uses #Autowired annotation and #ContextConfiguration and #Category annotations.
The test tuns fine when its run through eclipse.
But when i try running it through Command line, it is throwing the following error.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.690s
[INFO] Finished at: Wed Jun 12 09:56:48 GMT+05:30 2013
[INFO] Final Memory: 31M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.14.1:integration-test (default) on project OmnitureSeleniumTests: Execution default of goal org.apache.maven.plugins:maven-failsafe-plugin:2.14.1:integration-test failed: There was an error in the forked process
[ERROR] java.lang.NoSuchMethodError: org.junit.runner.Request.classes(Lorg/junit/runner/Computer;[Ljava/lang/Class;)Lorg/junit/runner/Request;
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.createReqestAndRun(JUnitCoreWrapper.java:128)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.executeEager(JUnitCoreWrapper.java:111)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:84)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:138)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
[ERROR] at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray2(ReflectionUtils.java:208)
[ERROR] at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:159)
[ERROR] at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:87)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:95)
[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/PluginExecutionException
I am using junit 4.8.2 and
maven-failsafe-plugin:2.14.1
There could be many configuration / environmental differences when running maven from Eclipse vs command line:
The maven version / path. In Eclipse the actual maven binary can be default / explicitly set via preferences, whereas in command line your OS will pick the first one available on your PATH env var. Check maven version using mvn -version
Maven user / global settings.xml. When running through command line typically ~/.m2/settings.xml is used but this can be explicitly overridden on Eclipse preferences
Maven local repository cache. If you have discrepancy on 1 and/or 2, you could end up with different local repository cache. Incorrect artifact distribution could cause build to fail if performed against different local repository cache.
Eclipse maven could use different version of JVM than your command line.
i have changed the version of maven-failsafe-plugin to 2.6 and it is running fine thru command line now :)
I am trying to build Java Mail 1.4.5 with Maven-3.0.4 using default settings of maven.
It is getting failed to build due to following errors -
[ERROR] COMPILATION ERROR : [INFO]
----------------------------------------------------------- [ERROR] \Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[210,37]
cannot find symbol symbol : variable Version location: class
javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[369,47]
cannot find symbol symbol : variable Version location: class
javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[913,29]
cannot find symbol symbol : variable Version location: class
javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[916,29]
cannot find symbol symbol : variable Version location: class
javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[919,29]
cannot find symbol symbol : variable Version location: class
javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[922,29]
cannot find symbol symbol : variable Version location: class
javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[925,29]
cannot find symbol symbol : variable Version location: class
javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[928,29]
cannot find symbol symbol : variable Version location: class
javax.mail.Session [INFO] 8 errors [INFO]
----------------------------------------------------------- [INFO] ---------------------------------------------------------------------- [INFO] BUILD FAILURE [INFO]
---------------------------------------------------------------------- [INFO] Total time: 1:51.197s [INFO] Finished at: Tue Jan 08 13:06:01
IST 2013 [INFO] Final Memory: 12M/67M [INFO]
---------------------------------------------------------------------- [ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.
3.2:compile (default-compile) on project javax.mail: Compilation failure: Compil ation failure: [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[210,37]
cannot find symbol [ERROR] symbol : variable Version [ERROR] location:
class javax.mail.Session
[ERROR]\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[369,47]
cannot find symbol [ERROR] symbol : variable Version [ERROR] location:
class javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[913,29]
cannot find symbol [ERROR] symbol : variable Version [ERROR] location:
class javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[916,29]
cannot find symbol [ERROR] symbol : variable Version [ERROR] location:
class javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[919,29]
cannot find symbol [ERROR] symbol : variable Version [ERROR] location:
class javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[922,29]
cannot find symbol [ERROR] symbol : variable Version [ERROR] location:
class javax.mail.Session
[ERROR]\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[925,29]
cannot find symbol [ERROR] symbol : variable Version [ERROR] location:
class javax.mail.Session [ERROR]
\Workarea\mySourceData\src\Mail\mail\src\main\java\javax\mail\Session.java:[928,29]
cannot find symbol [ERROR] symbol : variable Version [ERROR] location:
class javax.mail.Session [ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal o
rg.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile) on project javax.mail: Compilation failure at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:213) 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.buildProje
ct(LifecycleModuleBuilder.java:84) at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
ct(LifecycleModuleBuilder.java:59) at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
ild(LifecycleStarter.java:183) at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:161) at
org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at
org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at
org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at
org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at
org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:57) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601)
at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290) at
org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230) at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409) at
org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352) Caused by: org.apache.maven.plugin.CompilationFailureException:
Compilation fail ure at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompiler
Mojo.java:656) at
org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128) at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
BuildPluginManager.java:101) at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor
.java:209) ... 19 more [ERROR] [ERROR] [ERROR] For more information
about the errors and possible solutions, please rea d the following
articles: [ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
Same issue I am facing when I am trying to build Java Mail with netbeans - 7.2.1, it getting failed with same version issue in Session.java class.
How can I set this Version in Session.java class to get rid of this error?
If we can use nexus repository then please let me know how to set this.
Thanks,
Neelam Sharma
JavaMail 1.4.5 needs Maven 2 to build. I fixed it to build with Maven 3 shortly after the 1.4.5 release. You can find the changes in the source repository if you want to backport them.
Still, the errors above don't look like they're related to the Maven version so perhaps something else is going wrong. As I remember, I ran into similar problems when using a newer version of the compiler plugin and I had to update the build-helper plugin as well to fix it.