GoogleCodeArchive / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

ant all fails to build all of piccolo #120

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download Piccolo2D.
2. Unzip archive.
3. ant all

What is the expected output?

Expected at least one .jar file to be built.

What do you see instead?

./piccolo-1.2.1/build/tests/src/NotificationCenterTest.java:33: cannot find
symbol
    [javac] symbol  : method
postNotification(java.lang.String,NotificationCenterTest)
    [javac] location: class edu.umd.cs.piccolox.event.PNotificationCenter
    [javac]             center.postNotification("otherPropertyChanged", this);
    [javac]                   ^
    [javac] 100 errors

Plus others.

What version of the product are you using?

$ wget http://piccolo2d.googlecode.com/files/Piccolo2D.Java-1.2.1.zip

On what operating system?

$ uname -a
Linux jaguar 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 22:12:12 UTC 2009
x86_64 GNU/Linux

Please provide any additional information below.

$ ant -version
Apache Ant version 1.7.1 compiled on June 27 2008
$ java -version
java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode)

Original issue reported on code.google.com by dave.jar...@gmail.com on 5 Aug 2009 at 5:33

GoogleCodeExporter commented 9 years ago
This issue results from attempting to run ant without the necessary environment 
setup.

The script "build.sh" at the root of the piccolo-1.2.1 directory is the 
preferred 
method for compiling Piccolo2D on Linux since it guarantees that all 
dependencies are 
properly met.

Original comment by allain.lalonde on 5 Aug 2009 at 3:46

GoogleCodeExporter commented 9 years ago
This now requires at least three separate "build files": build.bat, build.sh, 
and
build.xml. Ant (and Maven, etc.) allows you to have an operating-independent 
way of
building the library.

Original comment by dave.jar...@gmail.com on 5 Aug 2009 at 4:42

GoogleCodeExporter commented 9 years ago
Very good point. I'll make try and make this work.

Original comment by allain.lalonde on 5 Aug 2009 at 4:58

GoogleCodeExporter commented 9 years ago
Here's a patch that allows it to compile on my system. I'm not sure about the 
procedure for patching a tag release-1.2.1 so, I'll let someone else apply it.

Index: build.xml
===================================================================
--- build.xml   (revision 652)
+++ build.xml   (working copy)
@@ -274,7 +274,7 @@

     <javac srcdir="${build.tests.src}"
            destdir="${build.tests.dest}"
-                  
classpath="${build.dir}/${name}.jar;${build.dir}/${name}x.jar"
+                      
classpath="${build.dir}/${name}.jar;${build.dir}/${name}x.jar;${lib.dir}/junit.j
ar"
            debug="${debug}"
            deprecation="${deprecation}"
            optimize="${optimize}"
@@ -327,6 +327,7 @@
   <target name="runtests" depends="tests">
     <java fork="yes" classname="junit.textui.TestRunner" taskname="junit" 
failonerror="true">
       <arg value="RunAllUnitTests"/>
+      <jvmarg value="-Djava.awt.headless=true" />
       <classpath>
         <pathelement location="${build.dir}/${name}.jar" />
         <pathelement location="${build.dir}/${name}x.jar" />
Index: tests/PFrameTest.java
===================================================================
--- tests/PFrameTest.java       (revision 652)
+++ tests/PFrameTest.java       (working copy)
@@ -13,6 +13,9 @@
     }

     public void testComponentResized() throws InvocationTargetException, 
InterruptedException {
+        if (java.awt.GraphicsEnvironment.isHeadless()) {
+          return;
+        }
         final PFrame frame = new PFrame();
         frame.setBounds(0, 0, TEST_WIDTH, TEST_HEIGHT);
         EventQueue.invokeAndWait(new Runnable() {

Original comment by allain.lalonde on 5 Aug 2009 at 5:22

GoogleCodeExporter commented 9 years ago
I didn't get the point. The release is complete (binary + source + functioning
build.sh) and we don't ant-build no more.

Why should we fix something that's neither broken nor used in the future?

Original comment by mr0...@mro.name on 5 Aug 2009 at 6:06

GoogleCodeExporter commented 9 years ago
Either way, there's a patch that would fix the problem. Removing the need for a 
custom 
build script.

Original comment by allain.lalonde on 5 Aug 2009 at 8:15

GoogleCodeExporter commented 9 years ago
1. Don't Repeat Yourself. build.xml, build.bat, build.sh architecturally do the 
same
thing. Allain's patch means you can now simplify the build instructions: type 
"ant
all" and it just works (on Unix, Mac, or Windows). You can now delete the shell 
scripts.
2. It is consistent with other major Java libraries.
3. Do not force a specific development environment to use the library. I use
JDeveloper, vi, and ant (or javac). Users have not the time to install and 
learn Yet
Another IDE. They would sooner switch to a different graphing tool that (a) 
compiles
out of the box; (b) is not tightly coupled to a specific IDE.

By analogy, it is like writing an IE-only website, effectively limiting the 
number of
people who can peruse it, without an outwardly justifiable reason. (That is to 
say,
since other people can write websites that work with any browser, why don't 
you?)

If Piccolo2D was intended to be a full-fledged application, then I could see the
value of binding it to Eclipse (to leverage SWT integration, for example). If
Piccolo2D is intended to be a complete library for inclusion in other 
applications,
then binding it to a specific IDE is a strategic error.

As an aside, I am researching a number of libraries to use for an application I 
am
writing. One criteria I used to judge a library is how long it takes to run an
example. Piccolo2D did not compile out-of-the-box, which immediately 
disqualified it.
I do not have the time to figure out what various tricks, dependencies must be
downloaded, sripts, documents, and dragons I need to tame before I can 
succesfully
build a third-party library.

prefuse compiled immediately. I had a demo running within JDeveloper in less 
than 15
minutes. That's classy. And that's the point.

Original comment by dave.jar...@gmail.com on 5 Aug 2009 at 9:44

GoogleCodeExporter commented 9 years ago
I don't understand the anti-IDE rhetoric here, I use emacs + maven on several
different platforms to develop Piccolo2D.

Compiled jar files are available from:

http://piccolo2d.googlecode.com/files/Piccolo2D.Java-1.2.1-compiled.zip

We no longer use the ant build.  The svn TRUNK builds immediately with maven.

Original comment by heue...@gmail.com on 6 Aug 2009 at 3:57

GoogleCodeExporter commented 9 years ago
http://maven.apache.org/ant-tasks ;-)

The rhetoric isn't anti-IDE. It's anti-specific-IDE. IDEs are a great 
productivity
boon, and have been since the early days of Borland. Part of the documentation 
I read
implied that working on Piccolo2D required Eclipse. I may have misread. I may 
have
been hasty, as it did not compile with ant (unlike so many other libraries I was
researching).

Good luck with Piccolo2D!

Original comment by dave.jar...@gmail.com on 6 Aug 2009 at 4:10

GoogleCodeExporter commented 9 years ago
With the 1.3 release (see Issue 43) will mark this issue as WontFix.

Original comment by heue...@gmail.com on 10 Mar 2010 at 10:14

GoogleCodeExporter commented 9 years ago
WontFix, version 1.3 has been released.

Original comment by heue...@gmail.com on 11 Mar 2010 at 2:56

GoogleCodeExporter commented 9 years ago

Original comment by heue...@gmail.com on 2 Mar 2011 at 4:09

GoogleCodeExporter commented 9 years ago
Sorry for the noise, this should remain WontFix.

Original comment by heue...@gmail.com on 2 Mar 2011 at 4:16