Hi Ian,
it is good to hear from you. I agree we should have smarter defaults for Maven wherever
it is possible. Without the need for overriding things in the settings.xml. For example
the GWT memory thing, why we just couldn't put the:
<gwt-plugin.extraJvmArgs>-Xms512M -Xmx1024M -XX:PermSize=128M
-XX:MaxPermSize=256M</gwt-plugin.extraJvmArgs>
<gwt-plugin.localWorkers>2</gwt-plugin.localWorkers>
..to the coregui's pom.xml? In the worst case user gets "Invalid initial heap
size: -Xmx1024M", but honestly, who has less than 1G ram these days? Btw. if we will
be using Errai sometimes in the future, it is more greedy. I had to set the Xmx to ~1300
megs for it.
error 5): I've never seen this before, looks like some bad switch used for gwt
compiler, perhaps in the ~/.m2/settings.xml (?)
jk
----- Original Message -----
From: "Ian" <ian.springer(a)gmail.com>
To: rhq-devel(a)lists.fedorahosted.org
Sent: Monday, March 25, 2013 12:43:12 AM
Subject: troubles building RHQ
Hello ex-colleagues,
I hope everyone is doing well.
I wanted to take a peek at the latest RHQ and dev that I am, I
thought I would build it from source. I ended up hitting a number of
issues and eventually gave up. Here they are in case the dev team
wants to look into any of them. I think it would be ideal if people
could check out the source from git and simply run "mvn install" to
build it. Being able to run it right away without having to setup
Postgres would be even better (make H2 or JavaDB the default out of
box perhaps?).
Cheers,
Ian
---
Here's the list of stuff I encountered:
1)
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile) on project rest-docs-generator: Compilation
failure
[ERROR]
/Users/ips/Code/rhq/modules/helpers/rest-docs-generator/src/main/java/org/rhq/helpers/rest_docs_generator/ClassLevelProcessor.java:[61,37]
cannot find symbol
[ERROR] symbol : variable RELEASE_7
[ERROR] location: class javax.lang.model.SourceVersion
Solution: Set JAVA_HOME environment var to JDK7 install dir. Note:
The build aborts when the above error occurs, so there may be other
JDK7 deps further along.
2)
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-antrun-plugin:1.7:run
(test-db-schema-version) on project rhq-core-dbutils: An Ant
BuildException has occured: The following error occurred while
executing this line:
[ERROR]
/Users/ips/Code/rhq/modules/core/dbutils/src/main/scripts/dbsetup-build.xml:339:
org.postgresql.util.PSQLException: Connection refused. Check that
the hostname and port are correct and that the postmaster is
accepting TCP/IP connections.
[ERROR] around Ant part ...<ant
antfile="/Users/ips/Code/rhq/modules/core/dbutils/src/main/scripts/dbsetup-build.xml"
target="dbsetup-check-schema">... @ 14:124 in
/Users/ips/Code/rhq/modules/core/dbutils/target/antrun/build-main.xml
Solution: Pass -Ddbsetup-do-not-check-schema option to mvn.
3)
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile
(default-compile) on project rhq-enterprise-server-xml-schemas:
Compilation failure
[ERROR] Failure executing javac, but could not parse the error:
[ERROR]
[ERROR]
[ERROR] The system is out of resources.
[ERROR] Consult the following stack trace for details.
[ERROR] java.lang.OutOfMemoryError: PermGen space
[ERROR] at
com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:355)
[ERROR] at
com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:88)
[ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:424)
[ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:353)
[ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:342)
[ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:333)
[ERROR] at com.sun.tools.javac.Main.compile(Main.java:94)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
[ERROR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[ERROR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:601)
[ERROR] at
org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554)
[ERROR] at
org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161)
[ERROR] at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605)
[ERROR] at
org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
[ERROR] at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
[ERROR] at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
[ERROR] at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
[ERROR] at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
[ERROR] at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
[ERROR] at
org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
[ERROR] at
org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:163)
[ERROR] at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:166)
[ERROR] at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
[ERROR] at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
[ERROR] at java.util.concurrent.FutureTask.run(FutureTask.java:166)
[ERROR] at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[ERROR] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[ERROR] at java.lang.Thread.run(Thread.java:722)
Solution:
Interesting Side Note: Permgen will no longer exist in Java 8 (
http://javaeesupportpatterns.blogspot.com/2011/10/java-7-features-permgen...
)
4)
[ERROR] Failed to execute goal
org.bsc.maven:maven-processor-plugin:2.0.6-redhat:process-test
(create-rest-api-report) on project rest-docs-generator: Error
executing: error during compilation -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
execute goal
org.bsc.maven:maven-processor-plugin:2.0.6-redhat:process-test
(create-rest-api-report) on project rest-docs-generator: Error
executing
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:167)
at
org.apache.maven.lifecycle.internal.LifecycleThreadedBuilder$1.call(LifecycleThreadedBuilder.java:163)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.apache.maven.plugin.MojoExecutionException: Error
executing
at
org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.execute(AbstractAnnotationProcessorMojo.java:223)
at
org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 13 more
Caused by: java.lang.Exception: error during compilation
at
org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.executeWithExceptionsHandled(AbstractAnnotationProcessorMojo.java:384)
at
org.bsc.maven.plugin.processor.AbstractAnnotationProcessorMojo.execute(AbstractAnnotationProcessorMojo.java:216)
... 15 more
Solution: Stop passing "--threads 1C" option from mvn (see
http://code.google.com/p/maven-annotation-plugin/issues/detail?id=32
)
5)
[INFO] Compiling module org.rhq.enterprise.gui.coregui.CoreGUI
[INFO] [ERROR] An internal compiler exception occurred
[INFO] com.google.gwt.dev.jjs.InternalCompilerException: Unexpected
error during visit.
[INFO] at
com.google.gwt.dev.jjs.ast.JVisitor.translateException(JVisitor.java:109)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:276)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at
com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[INFO] at
com.google.gwt.dev.jjs.ast.JFieldRef.traverse(JFieldRef.java:111)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at
com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[INFO] at
com.google.gwt.dev.jjs.ast.JMethodCall.visitChildren(JMethodCall.java:248)
[INFO] at
com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:241)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor$ListContext.traverse(JModVisitor.java:88)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemove(JModVisitor.java:331)
[INFO] at
com.google.gwt.dev.jjs.ast.js.JMultiExpression.traverse(JMultiExpression.java:60)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at
com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[INFO] at
com.google.gwt.dev.jjs.impl.MethodInliner$InliningVisitor.tryInlineExpression(MethodInliner.java:381)
[INFO] at
com.google.gwt.dev.jjs.impl.MethodInliner$InliningVisitor.endVisit(MethodInliner.java:122)
[INFO] at
com.google.gwt.dev.jjs.ast.JMethodCall.traverse(JMethodCall.java:243)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at
com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[INFO] at
com.google.gwt.dev.jjs.ast.JBinaryOperation.traverse(JBinaryOperation.java:81)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at
com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:116)
[INFO] at
com.google.gwt.dev.jjs.ast.JExpressionStatement.traverse(JExpressionStatement.java:41)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[INFO] at com.google.gwt.dev.jjs.ast.JBlock.traverse(JBlock.java:83)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at
com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:137)
[INFO] at
com.google.gwt.dev.jjs.ast.JVisitor.accept(JVisitor.java:133)
[INFO] at
com.google.gwt.dev.jjs.ast.JMethodBody.traverse(JMethodBody.java:82)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at
com.google.gwt.dev.jjs.ast.JMethod.visitChildren(JMethod.java:426)
[INFO] at
com.google.gwt.dev.jjs.ast.JConstructor.traverse(JConstructor.java:124)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor$ListContextImmutable.traverse(JModVisitor.java:170)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.acceptWithInsertRemoveImmutable(JModVisitor.java:336)
[INFO] at
com.google.gwt.dev.jjs.ast.JClassType.traverse(JClassType.java:98)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:287)
[INFO] at
com.google.gwt.dev.jjs.ast.JProgram.traverse(JProgram.java:1032)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:265)
[INFO] at
com.google.gwt.dev.jjs.impl.MethodInliner.execImpl(MethodInliner.java:521)
[INFO] at
com.google.gwt.dev.jjs.impl.MethodInliner.exec(MethodInliner.java:504)
[INFO] at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.optimizeLoop(JavaToJavaScriptCompiler.java:870)
[INFO] at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.optimize(JavaToJavaScriptCompiler.java:762)
[INFO] at
com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.precompile(JavaToJavaScriptCompiler.java:698)
[INFO] at
com.google.gwt.dev.jjs.JavaScriptCompiler.precompile(JavaScriptCompiler.java:33)
[INFO] at
com.google.gwt.dev.Precompile.precompile(Precompile.java:278)
[INFO] at
com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
[INFO] at
com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:232)
[INFO] at com.google.gwt.dev.Compiler.run(Compiler.java:198)
[INFO] at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
[INFO] at
com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
[INFO] at
com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
[INFO] at com.google.gwt.dev.Compiler.main(Compiler.java:177)
[INFO] Caused by: java.lang.AssertionError
[INFO] at
com.google.gwt.dev.jjs.ast.JNonNullType.<init>(JNonNullType.java:28)
[INFO] at
com.google.gwt.dev.jjs.ast.JReferenceType.getNonNull(JReferenceType.java:58)
[INFO] at
com.google.gwt.dev.jjs.impl.MethodInliner.merge(MethodInliner.java:559)
[INFO] at
com.google.gwt.dev.jjs.impl.MethodInliner.maybeCast(MethodInliner.java:543)
[INFO] at
com.google.gwt.dev.jjs.impl.MethodInliner.access$300(MethodInliner.java:57)
[INFO] at
com.google.gwt.dev.jjs.impl.MethodInliner$ParameterReplacer.endVisit(MethodInliner.java:468)
[INFO] at
com.google.gwt.dev.jjs.ast.JParameterRef.traverse(JParameterRef.java:47)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.traverse(JModVisitor.java:361)
[INFO] at
com.google.gwt.dev.jjs.ast.JModVisitor.accept(JModVisitor.java:273)
[INFO] ... 66 more
[INFO] [ERROR] at GroupOperationHistory.java(120): this$static
[INFO] com.google.gwt.dev.jjs.ast.JParameterRef
[INFO] [ERROR] at GroupOperationHistory.java(120):
this$static.resourceOperationHistories
[INFO] com.google.gwt.dev.jjs.ast.JFieldRef
[INFO] [ERROR] at GroupOperationHistory.java(120):
this$static.resourceOperationHistories.add(history)
[INFO] com.google.gwt.dev.jjs.ast.JMethodCall
[INFO] [ERROR] at GroupOperationHistory.java(119):
(this$static.resourceOperationHistories.add(history))
[INFO] com.google.gwt.dev.jjs.ast.js.JMultiExpression
[INFO] [ERROR] at ResourceOperationHistory.java(168):
GroupOperationHistory.$addResourceOperationHistory(groupHistory,
this)
[INFO] com.google.gwt.dev.jjs.ast.JMethodCall
[INFO] [ERROR] at ResourceOperationHistory.java(167):
this.groupOperationHistory != null &&
GroupOperationHistory.$addResourceOperationHistory(groupHistory,
this)
[INFO] com.google.gwt.dev.jjs.ast.JBinaryOperation
[INFO] [ERROR] at ResourceOperationHistory.java(167):
this.groupOperationHistory != null &&
GroupOperationHistory.$addResourceOperationHistory(groupHistory,
this)
[INFO] com.google.gwt.dev.jjs.ast.JExpressionStatement
[INFO] [ERROR] at ResourceOperationHistory.java(129): {
[INFO] super(jobName, jobGroup, subjectName, operationDefinition,
parameters);
[INFO] this.resource = resource;
[INFO] this.groupOperationHistory = groupHistory;
[INFO] this.groupOperationHistory != null &&
GroupOperationHistory.$addResourceOperationHistory(groupHistory,
this);
[INFO] }
[INFO] com.google.gwt.dev.jjs.ast.JBlock
[INFO] [ERROR] at ResourceOperationHistory.java(129): {
[INFO] super(jobName, jobGroup, subjectName, operationDefinition,
parameters);
[INFO] this.resource = resource;
[INFO] this.groupOperationHistory = groupHistory;
[INFO] this.groupOperationHistory != null &&
GroupOperationHistory.$addResourceOperationHistory(groupHistory,
this);
[INFO] }
[INFO] com.google.gwt.dev.jjs.ast.JMethodBody
[INFO] [ERROR] at ResourceOperationHistory.java(129): public
ResourceOperationHistory(null jobName, null jobGroup, String
subjectName, OperationDefinition operationDefinition, Configuration
parameters, Resource resource, null groupHistory);
[INFO]
[INFO] com.google.gwt.dev.jjs.ast.JConstructor
[INFO] [ERROR] at ResourceOperationHistory.java(98): final class
ResourceOperationHistory extends OperationHistory
[INFO] com.google.gwt.dev.jjs.ast.JClassType
[INFO] [ERROR] at Unknown(0): <JProgram>
[INFO] com.google.gwt.dev.jjs.ast.JProgram
At this point, I gave up. Perhaps
http://code.google.com/p/google-web-toolkit/issues/detail?id=6508 is
related.
_______________________________________________
rhq-devel mailing list
rhq-devel(a)lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/rhq-devel