Building from git repo

82 views
Skip to first unread message

James Coglan

unread,
Jan 9, 2012, 8:00:11 PM1/9/12
to CometD list
Hi there,

I just cloned from git and tried to build using this command:

apache-maven-3.0.3/bin/mvn clean install -DskipTests=true

It fails to build, this being the main error it produces?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (default-testCompile) on project cometd-java-annotations: Compilation failure: Compilation failure:
[ERROR] /home/jcoglan/projects/cometd/cometd-java/cometd-java-annotations/src/test/java/org/cometd/java/annotation/ServerAnnotationProcessorTest.java:[426,21] cannot find symbol
[ERROR] symbol  : method foo(org.cometd.bayeux.server.ServerSession,org.cometd.bayeux.server.ServerMessage.Mutable)
[ERROR] location: class org.cometd.java.annotation.ServerAnnotationProcessorTest.S
[ERROR] /home/jcoglan/projects/cometd/cometd-java/cometd-java-annotations/src/test/java/org/cometd/java/annotation/ServerAnnotationProcessorTest.java:[423,12] method does not override or implement a method from a supertype
[ERROR] /home/jcoglan/projects/cometd/cometd-java/cometd-java-annotations/src/test/java/org/cometd/java/annotation/ServerAnnotationProcessorTest.java:[673,25] destroy() in SS cannot override destroy() in org.cometd.java.annotation.ServerAnnotationProcessorTest.S; overridden method is static
[ERROR] /home/jcoglan/projects/cometd/cometd-java/cometd-java-annotations/src/test/java/org/cometd/java/annotation/ServerAnnotationProcessorTest.java:[708,24] init() in SS cannot override init() in org.cometd.java.annotation.ServerAnnotationProcessorTest.S; overridden method is static
[ERROR] /home/jcoglan/projects/cometd/cometd-java/cometd-java-annotations/src/test/java/org/cometd/java/annotation/ServerAnnotationProcessorTest.java:[707,12] method does not override or implement a method from a supertype
[ERROR] /home/jcoglan/projects/cometd/cometd-java/cometd-java-annotations/src/test/java/org/cometd/java/annotation/ServerAnnotationProcessorTest.java:[716,17] destroy() in SS cannot override destroy() in org.cometd.java.annotation.ServerAnnotationProcessorTest.S; overridden method is static

As a Java/Maven noob, any pointers on getting this fixed?

Thanks,
James

Matthew Tyson

unread,
Jan 9, 2012, 8:37:14 PM1/9/12
to cometd...@googlegroups.com
I don't have the sources out myself, but ServerAnnotationProcessorTest is trying to call foo :).  That definitely sounds like an accidental checkin.  Open  ServerAnnotationProcessorTest.java, go to line 426, and see what's there.  Probably can just comment it out.

Matt

--
You received this message because you are subscribed to the Google Groups "cometd-users" group.
To post to this group, send email to cometd...@googlegroups.com
To unsubscribe from this group, send email to cometd-users...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cometd-users
 
Visit the CometD website at http://www.cometd.org

James Coglan

unread,
Jan 10, 2012, 2:55:36 AM1/10/12
to cometd...@googlegroups.com
On 10 January 2012 01:37, Matthew Tyson <matthewc...@gmail.com> wrote:
I don't have the sources out myself, but ServerAnnotationProcessorTest is trying to call foo :).  That definitely sounds like an accidental checkin.  Open  ServerAnnotationProcessorTest.java, go to line 426, and see what's there.  Probably can just comment it out.

To get 'mvn clean install' to run successfully, I've made the following changes:

diff --git a/cometd-java/cometd-java-annotations/src/test/java/org/cometd/java/annotation/ServerAnnotationProcessorTest.java b/cometd-java/cometd-java-annotations/src/test/java/org/cometd/java/annotation/ServerAnnotationProcessorTest.jav
index 262742b..06b4eb7 100644
--- a/cometd-java/cometd-java-annotations/src/test/java/org/cometd/java/annotation/ServerAnnotationProcessorTest.java
+++ b/cometd-java/cometd-java-annotations/src/test/java/org/cometd/java/annotation/ServerAnnotationProcessorTest.java
@@ -420,10 +420,9 @@ public class ServerAnnotationProcessorTest
 
         class SS extends S
         {
-            @Override
             protected void foo(ServerSession remote, ServerMessage.Mutable message)
             {
-                super.foo(remote, message);
+                //super.foo(remote, message);
                 messageLatch.countDown();
             }
         }
@@ -669,11 +668,6 @@ public class ServerAnnotationProcessorTest
 
         class SS extends S
         {
-            @PreDestroy
-            private void destroy()
-            {
-                destroyLatch.countDown();
-            }
         }
 
         SS ss = new SS();
@@ -704,19 +698,6 @@ public class ServerAnnotationProcessorTest
 
         class SS extends S
         {
-            @Override
-            public void init()
-            {
-                assertEquals(2, initLatch.getCount());
-                initLatch.countDown();
-                super.init();
-            }
-
-            @PreDestroy
-            void destroy()
-            {
-                destroyLatch.countDown();
-            }
         }
 
         SS ss = new SS();

But now jetty:run does'nt work:

$ ../apache-maven-3.0.3/bin/mvn jetty:run
[INFO] Scanning for projects...
[WARNING] The POM for org.mortbay.jetty:jetty-maven-plugin:jar:7.6.0-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.mortbay.jetty:jetty-maven-plugin:7.6.0-SNAPSHOT: Plugin org.mortbay.jetty:jetty-maven-plugin:7.6.0-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.mortbay.jetty:jetty-maven-plugin:jar:7.6.0-SNAPSHOT
[WARNING] The POM for org.mortbay.jetty:jetty-maven-plugin:jar:7.6.0-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.mortbay.jetty:jetty-maven-plugin:7.6.0-SNAPSHOT: Plugin org.mortbay.jetty:jetty-maven-plugin:7.6.0-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.mortbay.jetty:jetty-maven-plugin:jar:7.6.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.948s
[INFO] Finished at: Tue Jan 10 07:53:02 GMT 2012
[INFO] Final Memory: 7M/77M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'jetty' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/home/jcoglan/.m2/repository), central (http://repo1.maven.org/maven2)] -> [Help 1] 

Simone Bordet

unread,
Jan 10, 2012, 4:25:30 AM1/10/12
to cometd...@googlegroups.com
Hi,

You are using OpenJDK to build, instead of the Sun/Oracle JDK.
OpenJDK has a known compiler bug that generates the error you see.

Can you please report what exact Java version and vendor are you using ?

Easy solution is to download and install Oracle's JDK and use that to build.

Simon
--
http://cometd.org
http://intalio.com
http://bordet.blogspot.com
----
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz

James Coglan

unread,
Jan 10, 2012, 2:41:53 PM1/10/12
to cometd...@googlegroups.com
On 10 January 2012 09:25, Simone Bordet <sbo...@intalio.com> wrote:
You are using OpenJDK to build, instead of the Sun/Oracle JDK.
OpenJDK has a known compiler bug that generates the error you see.

Can you please report what exact Java version and vendor are you using ?

I've installed the sun-java-6 packages for Ubuntu and this made `clean install` run, but I still can't the demo:

$ JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26/ ../apache-maven-3.0.3/bin/mvn jetty:run
[INFO] Scanning for projects...
[WARNING] The POM for org.mortbay.jetty:jetty-maven-plugin:jar:7.6.0-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.mortbay.jetty:jetty-maven-plugin:7.6.0-SNAPSHOT: Plugin org.mortbay.jetty:jetty-maven-plugin:7.6.0-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.mortbay.jetty:jetty-maven-plugin:jar:7.6.0-SNAPSHOT
[WARNING] The POM for org.mortbay.jetty:jetty-maven-plugin:jar:7.6.0-SNAPSHOT is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for org.mortbay.jetty:jetty-maven-plugin:7.6.0-SNAPSHOT: Plugin org.mortbay.jetty:jetty-maven-plugin:7.6.0-SNAPSHOT or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.mortbay.jetty:jetty-maven-plugin:jar:7.6.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.671s
[INFO] Finished at: Tue Jan 10 19:39:29 GMT 2012
[INFO] Final Memory: 9M/77M

James Coglan

unread,
Jan 10, 2012, 3:10:19 PM1/10/12
to cometd...@googlegroups.com
On 10 January 2012 09:25, Simone Bordet <sbo...@intalio.com> wrote:
Can you please report what exact Java version and vendor are you using ?

Oddly, alternatives is saying I'm using Sun:

$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                      Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode
  1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode
* 2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode 

I'm not very familiar with setting up Java stuff, apologies for the noob questions.

Simone Bordet

unread,
Jan 10, 2012, 3:27:06 PM1/10/12
to cometd...@googlegroups.com
Hi,

On Tue, Jan 10, 2012 at 20:41, James Coglan <jco...@gmail.com> wrote:
> I've installed the sun-java-6 packages for Ubuntu and this made `clean
> install` run, but I still can't the demo:
>
> $ JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.26/ ../apache-maven-3.0.3/bin/mvn
> jetty:run
> [INFO] Scanning for projects...
> [WARNING] The POM for
> org.mortbay.jetty:jetty-maven-plugin:jar:7.6.0-SNAPSHOT is missing, no
> dependency information available

This is not a Java problem, but a build problem. I pushed a fix for
it, so please pull again, and you should be good.

Let us know if you still have problems.

James Coglan

unread,
Jan 10, 2012, 3:36:46 PM1/10/12
to cometd...@googlegroups.com
On 10 January 2012 20:27, Simone Bordet <sbo...@intalio.com> wrote:
This is not a Java problem, but a build problem. I pushed a fix for
it, so please pull again, and you should be good.

Let us know if you still have problems.

That's got it working, thanks a lot for your help. 

Simone Bordet

unread,
Jan 10, 2012, 3:49:47 PM1/10/12
to cometd...@googlegroups.com
Hi,

On Tue, Jan 10, 2012 at 21:36, James Coglan <jco...@gmail.com> wrote:
> That's got it working, thanks a lot for your help.

You're working off master, which is in development.
You may experience temporary instabilities, and pull often.

Reply all
Reply to author
Forward
0 new messages