I was confused - I was combining the instructions for trying to build a quarks application with trying to build quarks using eclipse.
So once I followed the instructions in the “Getting Started with Apache Quarks” page: http://quarks.incubator.apache.org/docs/quarks-getting-started.html <http://quarks.incubator.apache.org/docs/quarks-getting-started.html> I could build the sample application that is referenced there. However, I still have a problem with trying to run examples / samples from Eclipse and that was the intent of my original question. I originally modified the .classpath files in Eclipse using the context menu “Build Path —> Configure Build Path” for each of the folders under incubator-quarks. But now, when I start fresh with a new workspace, I’m still having issues. Here is what I’ve tried two separate ways and have been unsuccessful: First way: First off I don’t see a _gradle directory, but after I did the following: 1) updated my source code using git checkout master git fetch upstream git rebase upstream/master git push 2) I created a new eclipse workspace 3) I selected “Import Project” from the new eclipse workspace 4) I selected a root directory of ~/git/incubator-quarks I then clicked the _quarks project where it asks you to select the project. Since this is the top level project for quarks, I figured this was the right one. I did NOT check ‘Search for nested projects’ because I tried that before and got duplicate projects. 5) After that, I clicked on build.xml and ran ‘Run As -> Ant Build’. So Quarks builds fine in eclipse, but I still can’t seem to run any applications .. I was trying to run, specifically, the topology/DevelopmentMetricsSample When I click on that file, and bring up the context menu it does not even have ‘Run As —> Java application’. it only has Run As —> Run on Server or Run Jetty. Also, if I try to configure the build path for the entire _quarks project, it says ‘No actions available’. Way 2: Use the Git repositories feature of eclipse to try to import the project. I pointed to my local clone and then clicked on the clone and selected Import Projects. The first time I did this I pointed to my _quarks directory, and got the same problem as above … no way to configure my build path. So then I tried selecting the _quarks directory and selecting nested projects and de-selecting the _quarks project. Now I can see all of the folders under incubator-quarks. But once again when I do it this way I don’t see the build.xml file at the top level of quarks, and I have the red x’s on several projects. Does anyone know what I have done wrong? Once I get this setup I will document it on the wiki or website. Thanks, Susan > On Jun 7, 2016, at 8:22 AM, Dale LaBossiere <[email protected]> wrote: > > Why and how are the various .classpath file modified? That’s the first place > I’d look to resolve Eclipse build problems. > > At a higher level, I think > http://quarks.incubator.apache.org/docs/quarks-getting-started.html > <http://quarks.incubator.apache.org/docs/quarks-getting-started.html> is > perhaps (implicitly) describing an environment where the building of Quarks > isn’t performed in the same Eclipse workspace as the Quarks application > you’re trying to create. (though this can work. more below) > > e.g., > “Downloading Apache Quarks” => download quarks and build via ant as described > in the DEVELOPMENT.md. Don’t even bother with Eclipse for that part. > “Setting up your environment” => create an Eclipse workspace, and follow the > rest of the directions. Configure it to use the ant created jars from the > first step. > > On the “all in one workspace” flow... > > So I just tried doing everything from a single Eclipse workspace and it > worked fine: > - built Quarks from a git repo clone in Eclipse. You also need to run the > ant build to generate the jars that the “getting started” flow describes > using. e.g., in Eclipse select _gradle > build.xml > Run as > Ant Build. Or > run ant from the command line. > - used the same Eclipse workspace for “Setting up your environment”. For the > new project’s setup, use “Add External Jars” to select the jars build above > (e.g., from ~/git/incubator-quarks/target/java8/lib). > > I didn’t try this with (a) building Quarks from a download instead of a clone > (there was a recent build.xml fix for that, though it doesn’t seem like > you’re encountering that problem) and/or (b) configuring the new project’s > classpath to depend on the various Quarks projects in the workspace (though I > can’t think of any reason why that wouldn’t work). > > Hope that helps > — Dale > >> On Jun 7, 2016, at 10:38 AM, Susan Cline <[email protected]> wrote: >> >> Thanks for your response. >> >> I do have a utils in my .classpath file, but it is not /utils >> >> <classpathentry kind="src" path="utils”/> >> >> Closing and opening the project does not fix the problem. >> >> Susans-MBP-429:incubator-quarks susancline$ git status >> On branch master >> Your branch is up-to-date with 'origin/master'. >> Changes not staged for commit: >> (use "git add <file>..." to update what will be committed) >> (use "git checkout -- <file>..." to discard changes in working directory) >> >> modified: connectors/.classpath >> modified: console/.classpath >> modified: providers/.classpath >> modified: providers/.project >> modified: samples/.classpath >> modified: test/.classpath >> modified: utils/.classpath >> >> I don’t have a top level project, I just have individual projects. >> >> What I am trying to accomplish is to perform a build in eclipse. It seemed >> like something new users might want - to have all of their eclipse projects >> build without errors. Following the instructions here: >> >> http://quarks.incubator.apache.org/docs/quarks-getting-started.html >> >> are not clear, and I thought it would be good to clarify these instructions >> for new users so everything builds correctly. >> >> Thanks, >> >> Susan >> >> >>> In your eclipse workspace, with Eclipse building quarks, it’s >>> providers/.classpath that makes StreamsScopeTest.class available when >>> DevelopmentStreamScopeTest is built. That .classpath include a “src” entry >>> for /utils. And >>> utils/streamscope/test.classes/quarks/test/streamscope/StreamScopeTest.class >>> should be present. >>> >>> I’m unclear in what you’re trying to — what sort of thing this new project >>> constitutes. What’s in the new project’s .classpath? >>> >>> If you “close” your new project, does the workspace still have build >>> problems? What does “git status” report? >>> >>> — Dale >>> >>> >>>> On Jun 6, 2016, at 3:26 PM, Susan Cline <[email protected]> wrote: >>>> >>>> Hi, >>>> >>>> I’m trying to set up a new project in eclipse for quarks. After adding >>>> the target/java8/lib jars to most of my projects everything seems to be >>>> building in Eclipse correctly except for DevelopmentStreamScopeTest.java. >>>> >>>> It is looking for StreamScopeTest.java, which is under >>>> utils/streamscope/src/test/java/quarks/test/streamscope. >>> >> >
