Hi Peter,
You can't build 3.1.2 using JDK7.
You have to use mvn-2.2.1 and JDK6. (>=u4)
Thanks,
Romain
On 03/08/2012 04:31 AM, peter belbin wrote:
>
> I've set up a virtual box of solaris x86 and am trying to build
> glassfish 3.1.2 using jdk 7u3.
>
> Question:
>
> Should this work? The build instructions mention needing jdk 6 u 4 at
> least, but no mention of jdk 7, even though, as I understand it, this
> version of glassfish is supposed to be usable with jdk 7u2 (at least)?
>
> Also:
>
> In my trying to build, I am:
>
> a)Finding that it takes a very long time when pulling the maven
> artifacts for the various sub projects down.
>
> b)Seeing this error:
>
> [INFO] Building in /opt/gf312src/3.1.2/common
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO]
>
> [INFO] --- maven-bundle-plugin:2.0.1:manifest (bundle-manifest) @
> common ---
>
> [WARNING] Ignoring project type pom - supportedProjectTypes =
> [hk2-jar, bundle]
>
> [INFO]
>
> [INFO] --- maven-source-plugin:2.1:jar-no-fork (attach-sources) @
> common ---
>
> [INFO]
>
> [INFO] --- maven-install-plugin:2.3.1:install (default-install) @
> common ---
>
> [INFO] Installing /opt/gf312src/3.1.2/common/pom.xml to
> /root/.m2/repository/org/glassfish/main/common/common/3.1.2/common-3.1.2.pom
>
> [INFO]
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Building Scattered Archive APIs of Glassfish 3.1.2
>
> [INFO]
> ------------------------------------------------------------------------
>
> [WARNING] Failure to transfer
> org.apache.maven.plugins:maven-jar-plugin/maven-metadata.xml from
> http://maven.glassfish.org/content/groups/glassfish was cached in the
> local repository, resolution will not be reattempted until the update
> interval of glassfish-repo-archive has elapsed or updates are forced.
> Original error: Could not transfer metadata
> org.apache.maven.plugins:maven-jar-plugin/maven-metadata.xml from/to
> glassfish-repo-archive
> (http://maven.glassfish.org/content/groups/glassfish): Connection to
> http://maven.glassfish.org refused
>
> Downloading:
> http://maven.glassfish.org/content/groups/glassfish/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
>
> [WARNING] Could not transfer metadata
> org.apache.maven.plugins:maven-install-plugin/maven-metadata.xml
> from/to glassfish-repo-archive
> (http://maven.glassfish.org/content/groups/glassfish): Connection to
> http://maven.glassfish.org refused
>
> Downloading:
> http://maven.glassfish.org/content/groups/glassfish/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
>
> [WARNING] Could not transfer metadata
> org.apache.maven.plugins:maven-deploy-plugin/maven-metadata.xml
> from/to glassfish-repo-archive
> (http://maven.glassfish.org/content/groups/glassfish): Connection to
> http://maven.glassfish.org refused
>
> [INFO]
>
> [INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-maven) @
> scattered-archive-api ---
>
> [INFO]
>
> [INFO] --- maven-enforcer-plugin:1.0-beta-1:enforce (enforce-versions)
> @ scattered-archive-api ---
>
> [INFO]
>
> [INFO] --- osgiversion-maven-plugin:1.1.14:compute-osgi-version
> (compute-osgi-version) @ scattered-archive-api ---
>
> [INFO]
>
> [INFO] --- maven-glassfishbuild-plugin:3.1.1:echo (echo) @
> scattered-archive-api ---
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Building in /opt/gf312src/3.1.2/common/scattered-archive-api
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO]
>
> [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources)
> @ scattered-archive-api ---
>
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
>
> [INFO] skip non existing resourceDirectory
> /opt/gf312src/3.1.2/common/scattered-archive-api/src/main/resources
>
> [INFO]
>
> [INFO] --- hk2-maven-plugin:1.1.14:hk2-compile (default-hk2-compile) @
> scattered-archive-api ---
>
> Mar 07, 2012 12:06:42 PM org.sonatype.guice.bean.reflect.Logs$JULSink warn
>
> WARNING: Error injecting: com.sun.enterprise.module.maven.HK2CompileMojo
>
> java.lang.NoClassDefFoundError:
> com/sun/mirror/apt/AnnotationProcessorFactory
>
> at java.lang.Class.getDeclaredConstructors0(Native Method)
>
> at
> java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
>
> at
> java.lang.Class.getDeclaredConstructors(Class.java:1853)
>
> at
> com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
>
> at
> com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:98)
>
> at
> com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)
>
> at
> com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:831)
>
> at
> com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:758)
>
> at
> com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:255)
>
> at
> com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:204)
>
> at
> com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:954)
>
> at
> com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:987)
>
> at
> com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:950)
>
> at
> com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1000)
>
> at
> org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:45)
>
> at
> com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:84)
>
> at
> com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:52)
>
> at
> com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
>
> at
> com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
>
> at
> org.sonatype.guice.plexus.lifecycles.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:138)
>
> at
> com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:108)
>
> at
> com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)
>
> at
> com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)
>
> at
> com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)
>
> at
> com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:965)
>
> at
> com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1011)
>
> at
> com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:961)
>
> at com.google.inject.Scopes$1$1.get(Scopes.java:59)
>
> at
> org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:83)
>
> at
> org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:49)
>
> at
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253)
>
> at
> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:245)
>
> at
> org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
>
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
>
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>
> 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.buildProject(LifecycleModuleBuilder.java:84)
>
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.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(DelegatingMethodAccessorImpl.java:43)
>
> at java.lang.reflect.Method.invoke(Method.java:601)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>
> Caused by: java.lang.ClassNotFoundException:
> com.sun.mirror.apt.AnnotationProcessorFactory
>
> at
> org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
>
> at
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
>
> at
> org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
>
> ... 54 more
>
> Any ideas as to what is going wrong?
>
> Regards,
>
> Peter.
>