Compiling Error in Maven -


seeing compilation error in maven. checked , tried workarounds got google , stack* sites. still couldnt resolve.

installed maven 3.3.3 , supported version of java 1.7. please note haven't set java_home, m2 , m2_home environment variables. still takes path.

apache maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22t07:57:37-04:00) maven home: /usr/local/apache-maven-3.3.3 java version: 1.7.0_85, vendor: oracle corporation java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.85.x86_64/jre default locale: en_us, platform encoding: utf-8 os name: "linux", version: "2.6.32-573.3.1.el6.x86_64", arch: "amd64", family: "unix" 

errors are

[info] ------------------------------------------------------------- [error] compilation error : [info] ------------------------------------------------------------- [error] /home/sdiuser/build-release/hg-artifactid/src/main/java/hg-groupid/app.java:[1,11] ';' expected [info] 1 error [info] ------------------------------------------------------------- [info] ------------------------------------------------------------------------ [info] build failure [info] ------------------------------------------------------------------------ [info] total time: 2.007 s [info] finished at: 2015-08-31t02:43:32-04:00 [info] final memory: 9m/158m [info] ------------------------------------------------------------------------ [error] failed execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project hg-artifactid: compilation failure [error] /home/sdiuser/build-release/hg-artifactid/src/main/java/hg-groupid/app.java:[1,11] ';' expected [error] -> [help 1] org.apache.maven.lifecycle.lifecycleexecutionexception: failed execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project hg-artifactid: compilation failure /home/sdiuser/build-release/hg-artifactid/src/main/java/hg-groupid/app.java:[1,11] ';' expected      @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:212)     @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:153)     @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:145)     @ org.apache.maven.lifecycle.internal.lifecyclemodulebuilder.buildproject(lifecyclemodulebuilder.java:116)     @ org.apache.maven.lifecycle.internal.lifecyclemodulebuilder.buildproject(lifecyclemodulebuilder.java:80)     @ org.apache.maven.lifecycle.internal.builder.singlethreaded.singlethreadedbuilder.build(singlethreadedbuilder.java:51)     @ org.apache.maven.lifecycle.internal.lifecyclestarter.execute(lifecyclestarter.java:128)     @ org.apache.maven.defaultmaven.doexecute(defaultmaven.java:307)     @ org.apache.maven.defaultmaven.doexecute(defaultmaven.java:193)     @ org.apache.maven.defaultmaven.execute(defaultmaven.java:106)     @ org.apache.maven.cli.mavencli.execute(mavencli.java:862)     @ org.apache.maven.cli.mavencli.domain(mavencli.java:286)     @ org.apache.maven.cli.mavencli.main(mavencli.java:197)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:606)     @ org.codehaus.plexus.classworlds.launcher.launcher.launchenhanced(launcher.java:289)     @ org.codehaus.plexus.classworlds.launcher.launcher.launch(launcher.java:229)     @ org.codehaus.plexus.classworlds.launcher.launcher.mainwithexitcode(launcher.java:415)     @ org.codehaus.plexus.classworlds.launcher.launcher.main(launcher.java:356) caused by: org.apache.maven.plugin.compiler.compilationfailureexception: compilation failure /home/sdiuser/build-release/hg-artifactid/src/main/java/hg-groupid/app.java:[1,11] ';' expected      @ org.apache.maven.plugin.compiler.abstractcompilermojo.execute(abstractcompilermojo.java:858)     @ org.apache.maven.plugin.compiler.compilermojo.execute(compilermojo.java:129)     @ org.apache.maven.plugin.defaultbuildpluginmanager.executemojo(defaultbuildpluginmanager.java:134)     @ org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:208)     ... 20 more 

going out on limb here... line 1 of app.java contain following package definition:

package hg-groupid; 

if so, problem relates hyphen have in package name - java identifiers not permitted contain hyphen in name - may wish change underscore.

see also: hyphenated company name in java packages


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -