I don't think it was a Maven issue in the first place, but a problem with the java-file.

/.../maven-intro/src/main/java/com/testing/App.java:[1,13] ';' expected

This means that on row 1, colomn 13 a semi colon was expected.

Normally that would be the line with the package (or comment or package Annotations, all possible) You copied only a part of the file, but there must have been an issue with the real first line.

Robert

Op Mon, 01 Apr 2013 20:57:34 +0200 schreef Simon Peters <[email protected]>:

Hi

I needed to regenerate the project again, after changing binaries.
Now it works as expected.

Strange, that Apple includes a maven which is not working even on basics...

Thanks a lot!
Simon



________________________________
 From: Baptiste MATHUS <[email protected]>
To: Maven Users List <[email protected]>; Simon Peters <[email protected]>
Cc: "[email protected]" <[email protected]>
Sent: Monday, April 1, 2013 8:49 PM
Subject: Re: Compilation error on Maven getting started guide
Maybe you could push that code somewhere? On Github? or a link to the
zipped version of your project?

Cheers


2013/4/1 Simon Peters <[email protected]>

Thanks for your reply, Curtis

Yes, I used all the defaults.

> mvn -version
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: /usr/share/maven
Java version: 1.6.0_43, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: de_DE, platform encoding: MacRoman
OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac"

Ups, I'll try with the 3.0.5 update of maven first...

Regards
Simon



________________________________
  From: Curtis Rueden <[email protected]>
To: Maven Users List <[email protected]>; Simon Peters <
[email protected]>
Sent: Monday, April 1, 2013 8:12 PM
Subject: Re: Compilation error on Maven getting started guide

Hi Simon,

> sure, it's the default generated "hello world":

OK. Did you enter all defaults when prompted (just press enter)? I tried it
on my system (OS X 10.6.8, with Maven 3.0.5 installed via Homebrew) and
could not reproduce the issue.

Regards,
Curtis


On Mon, Apr 1, 2013 at 1:09 PM, Simon Peters <[email protected]> wrote:

> Hi Curtis
>
> sure, it's the default generated "hello world":
> --------- SNIP ----------
> package com.testing;
>
> /**
>  * Hello world!
>  *
>  */
> public class App
> {
>     public static void main( String[] args )
>     {
>         System.out.println( "Hello World!" );
>     }
> }
> ----------- SNIP ---------
>
> Regards
> Simon
>
>
> ________________________________
>  From: Curtis Rueden <[email protected]>
> To: Maven Users List <[email protected]>; Simon Peters <
> [email protected]>
> Sent: Monday, April 1, 2013 8:03 PM
> Subject: Re: Compilation error on Maven getting started guide
>
> Hi Simon,
>
> > compiler-plugin:2.3.2:compile (default-compile) on project maven-intro:
> Compilation failure
> > /.../maven-intro/src/main/java/com/testing/App.java:[1,13] ';' expected
>
> What does "cat maven-intro/src/main/java/com/testing/App.java" show? Is
the
> file syntactically valid?
>
> Regards,
> Curtis
>
>
> On Mon, Apr 1, 2013 at 12:57 PM, Simon Peters <[email protected]> wrote:
>
> > Hi
> >
> > I tried to follow the Maven getting started guide, and ran into
problems
> > when first trying to compile the generated project.
> > I generated the project with:
> > > mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes
> > -DgroupId=com.testing -DartifactId=maven-intro
> >
> >
> > using the defaults.
> >
> > mvn compile gives me this error:
> > org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute
> > goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
> > (default-compile) on project maven-intro: Compilation failure
> > /.../maven-intro/src/main/java/com/testing/App.java:[1,13] ';' expected
> >
> > I run Mac OS X 10.7.5.
> >
> > > env
> >
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
> > LANG=de_CH.UTF-8
> >
> > > java -version
> > java version "1.6.0_43"
> > Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)
> > Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)
> >
> > I guess it's an encoding problem. But how to quickly make it right?
> > Thanks!
> >
> > Simon
>




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to