Can you try with 2.0?

On 12/19/05, Conrad O'Dea <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I've run into a problem with maven on OS X and JDK 1.5.  We're just
> starting to migrate our project over to Maven 2 and the initial
> project will not build on my Mac.  I can reproduce the problem by
> creating a 'Hello World' project using this command:
>
> $ mvn archetype:create -DgroupId=foo.bar -DartifactId=foo-bar
>
> and after a chunk of output, it printed 'BUILD SUCCESSFUL'.  However,
> when compiling the project, it fails with the following error (full
> stack trace at end of mail).
>
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] Fatal error compiling
>
> Embedded error: Prohibited package name: java.lang
>
> If I switch to a 1.4 JDK, the project builds without problems.
> Unfortunately our actual project requires JDK 1.5.
>
> Can anyone give advice on what, if anything, I can do to workaround
> this?
>
> thanks
> Conrad
>
> $ mvn --version
> Maven version: 2.0.1
> [EMAIL PROTECTED] ~/scratch/maven/foo-bar]
> $ java -version
> java version "1.5.0_05"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-83)
> Java HotSpot(TM) Client VM (build 1.5.0_05-48, mixed mode, sharing)
>
> $ mvn -e compile
> + Error stacktraces are turned on.
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] Building Maven Quick Start Archetype
> [INFO]    task-segment: [compile]
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> Compiling 1 source file to /Users/codea/scratch/maven/foo-bar/target/
> classes
> [INFO]
> ------------------------------------------------------------------------
> ----
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] Fatal error compiling
>
> Embedded error: Prohibited package name: java.lang
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] Trace
> org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error
> compiling
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> (DefaultLifecycleExecutor.java:555)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifec
> ycle(DefaultLifecycleExecutor.java:472)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
> (DefaultLifecycleExecutor.java:451)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandle
> Failures(DefaultLifecycleExecutor.java:303)
>         at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
> DefaultLifecycleExecutor.java:270)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
> (DefaultLifecycleExecutor.java:139)
>         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:322)
>         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115)
>         at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke
> (NativeMethodAccessorImpl.java:39)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke
> (DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
>         at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
>         at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:
> 430)
>         at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal
> error compiling
>         at org.apache.maven.plugin.AbstractCompilerMojo.execute
> (AbstractCompilerMojo.java:412)
>         at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:110)
>         at org.apache.maven.plugin.DefaultPluginManager.executeMojo
> (DefaultPluginManager.java:432)
>         at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
> (DefaultLifecycleExecutor.java:530)
>         ... 16 more
> Caused by: java.lang.SecurityException: Prohibited package name:
> java.lang
>         at java.lang.ClassLoader.preDefineClass(ClassLoader.java:479)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
>         at java.security.SecureClassLoader.defineClass
> (SecureClassLoader.java:124)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at org.codehaus.plexus.compiler.javac.IsolatedClassLoader.loadClass
> (IsolatedClassLoader.java:56)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>         at java.lang.ClassLoader.defineClass1(Native Method)
>         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>         at java.security.SecureClassLoader.defineClass
> (SecureClassLoader.java:124)
>         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at org.codehaus.plexus.compiler.javac.IsolatedClassLoader.loadClass
> (IsolatedClassLoader.java:56)
>         at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess
> (JavacCompiler.java:350)
>         at org.codehaus.plexus.compiler.javac.JavacCompiler.compile
> (JavacCompiler.java:136)
>         at org.apache.maven.plugin.AbstractCompilerMojo.execute
> (AbstractCompilerMojo.java:407)
>         ... 19 more
> [INFO]
> ------------------------------------------------------------------------
> ----
> [INFO] Total time: 5 seconds
> [INFO] Finished at: Mon Dec 19 10:18:47 GMT 2005
> [INFO] Final Memory: 2M/6M
> [INFO]
> ------------------------------------------------------------------------
> ----
> [EMAIL PROTECTED] ~/scratch/maven/foo-bar]
> $ mvn --version
> Maven version: 2.0.1
> [EMAIL PROTECTED] ~/scratch/maven/foo-bar]
> $       at org.apache.maven.cli.MavenCli.main(MavenCli.java:249)
> bash: syntax error near unexpected token `('
> [EMAIL PROTECTED] ~/scratch/maven/foo-bar]
> $
> [EMAIL PROTECTED] ~/scratch/maven/foo-bar]
> $ mvn --version
> Maven version: 2.0.1
> [EMAIL PROTECTED] ~/scratch/maven/foo-bar]
> $ java -version
> java version "1.5.0_05"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-83)
> Java HotSpot(TM) Client VM (build 1.5.0_05-48, mixed mode, sharing)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to