Compile issues with the latest code from master branch #203

Closed
atinsood opened this Issue Mar 22, 2013 · 6 comments

Comments

Projects
None yet
4 participants
@atinsood

I checked out the latest code

asood@starbuck-2 [~/work/opensource/software/hawtio]

git status

On branch master

nothing to commit (working directory clean)

and executed the following command
asood@starbuck-2 [~/work/opensource/software/hawtio/hawtio-web]

mvn test-compile exec:java -Psnapshot,fabric

Gives me the following exception

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /Users/asood/work/opensource/software/hawtio/hawtio-web/src/test/java/io/hawt/sample/Main.java:[153,20] cannot find symbol
symbol  : method setMbeanServer(javax.management.MBeanServer)
location: class org.fusesource.fabric.service.FabricServiceImpl
[ERROR] /Users/asood/work/opensource/software/hawtio/hawtio-web/src/test/java/io/hawt/sample/Main.java:[155,20] cannot find symbol
symbol  : method init()
location: class org.fusesource.fabric.service.FabricServiceImpl
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.746s
[INFO] Finished at: Thu Mar 21 20:34:21 EDT 2013
[INFO] Final Memory: 29M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:testCompile (default-testCompile) on project hawtio-web: Compilation failure: Compilation failure:
[ERROR] /Users/asood/work/opensource/software/hawtio/hawtio-web/src/test/java/io/hawt/sample/Main.java:[153,20] cannot find symbol
[ERROR] symbol  : method setMbeanServer(javax.management.MBeanServer)
[ERROR] location: class org.fusesource.fabric.service.FabricServiceImpl
[ERROR] /Users/asood/work/opensource/software/hawtio/hawtio-web/src/test/java/io/hawt/sample/Main.java:[155,20] cannot find symbol
[ERROR] symbol  : method init()
[ERROR] location: class org.fusesource.fabric.service.FabricServiceImpl
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
@gashcrumb

This comment has been minimized.

Show comment
Hide comment
@gashcrumb

gashcrumb Mar 22, 2013

Member

I can't seem to reproduce it here, maybe you're picking up an old snapshot version of the fabric-core module that's outdated. You could try and build it locally, the module in question is this one, with luck you might be able to get away with just building that one module.

Member

gashcrumb commented Mar 22, 2013

I can't seem to reproduce it here, maybe you're picking up an old snapshot version of the fabric-core module that's outdated. You could try and build it locally, the module in question is this one, with luck you might be able to get away with just building that one module.

@jstrachan

This comment has been minimized.

Show comment
Hide comment
@jstrachan

jstrachan Mar 22, 2013

Member

I've stopped using the snapshot version of insight-log BTW. I wonder if you could try another build without the "snapshot" profile. As we're using ActiveMQ 5.8 and the latest build of Fabric now anyway really, so the snapshot profile probably does more harm than good? :)

It builds here fine using the released versions etc.

mvn test-compile exec:java -Pfabric
Member

jstrachan commented Mar 22, 2013

I've stopped using the snapshot version of insight-log BTW. I wonder if you could try another build without the "snapshot" profile. As we're using ActiveMQ 5.8 and the latest build of Fabric now anyway really, so the snapshot profile probably does more harm than good? :)

It builds here fine using the released versions etc.

mvn test-compile exec:java -Pfabric
@davsclaus

This comment has been minimized.

Show comment
Hide comment
@davsclaus

davsclaus Mar 30, 2013

Member

Is this still a problem with latest code?

Member

davsclaus commented Mar 30, 2013

Is this still a problem with latest code?

@jstrachan

This comment has been minimized.

Show comment
Hide comment
@jstrachan

jstrachan Apr 2, 2013

Member

am gonna assume its fixed - let us know if its not and we can reopen

Member

jstrachan commented Apr 2, 2013

am gonna assume its fixed - let us know if its not and we can reopen

@jstrachan jstrachan closed this Apr 2, 2013

@atinsood

This comment has been minimized.

Show comment
Hide comment
@atinsood

atinsood Apr 2, 2013

I was able to run the build with just the fabric profile

mvn test-compile exec:java -Pfabric

But it printed the error mentioned below, even though the build was a success. This is because that the webapp-outdir points to the location
${basedir}/target/${webapp-dir}

If the module is not built before or if you run the clean target then the build won't be able to find the target directory and hence the below error.

You can fix this by running mvn compile before executing the fabric profile.

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
ERROR | io.hawt.sample.Main.main() | No web.xml could be found for $webXml
java.lang.IllegalStateException: No web.xml could be found for $webXml
at io.hawt.sample.Main.require(Main.java:194)
at io.hawt.sample.Main.main(Main.java:46)
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:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
at java.lang.Thread.run(Thread.java:680)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

atinsood commented Apr 2, 2013

I was able to run the build with just the fabric profile

mvn test-compile exec:java -Pfabric

But it printed the error mentioned below, even though the build was a success. This is because that the webapp-outdir points to the location
${basedir}/target/${webapp-dir}

If the module is not built before or if you run the clean target then the build won't be able to find the target directory and hence the below error.

You can fix this by running mvn compile before executing the fabric profile.

SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
ERROR | io.hawt.sample.Main.main() | No web.xml could be found for $webXml
java.lang.IllegalStateException: No web.xml could be found for $webXml
at io.hawt.sample.Main.require(Main.java:194)
at io.hawt.sample.Main.main(Main.java:46)
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:597)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
at java.lang.Thread.run(Thread.java:680)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------

@jstrachan

This comment has been minimized.

Show comment
Hide comment
@jstrachan

jstrachan Apr 3, 2013

Member

@atinsood ah I wonder if there is an issue of the exec-maven-plugin not waiting for the grunt command to complete before continuing? @AlanFoster hinted at this in #22. There's way in grunt.cmd of specifying some command to wait until the command has finished I wonder?

For now I'll add a note in the docs on windows to run "mvn compile" first :). Would love to get the build to just work on windows though - feels like we're so close!

Member

jstrachan commented Apr 3, 2013

@atinsood ah I wonder if there is an issue of the exec-maven-plugin not waiting for the grunt command to complete before continuing? @AlanFoster hinted at this in #22. There's way in grunt.cmd of specifying some command to wait until the command has finished I wonder?

For now I'll add a note in the docs on windows to run "mvn compile" first :). Would love to get the build to just work on windows though - feels like we're so close!

jstrachan added a commit that referenced this issue Apr 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment