While walking through http://code.google.com/p/sadi/wiki/BuildingServicesInJava
a colleague and I have independently hit a snag at:
"If you are working in Eclipse, there will be a preset run
configuration for the service generator. Choose Run » Run
configurations… and find generate sadi service under Maven Build in
the left side panel of the dialog. "
The problem: No run configurations are listed.
I'm including a link to a screenshot [1] of the "Maven Build" in the
left side panel, which does not show any configurations.
I am using the following resources:
* Eclipse SDK Version: 3.7.0 (Indigo)
* m2e Version 1.0
* http://sadi.googlecode.com/files/sadi-service-skeleton-0.1.1.zip
Some notes:
1) When creating the eclipse project, the option "Create project from
existing source" was not available.
Instead, I selected the sadi-services directory for the "Location"
field. (Perhaps just a disparity in Eclipse versions?)
2) Although I'm assuming m2e installs its own maven, I am running
Apache Maven 3.0.3 in my regular command line environment.
3) The file "doc/eclipse/generate sadi service.launch" is visible from
the package explorer.
Thank you for your consideration.
Regards,
Tim Lebo
[1] https://github.com/timrdf/DataFAQs/raw/master/doc/sadi/sadi-generate-service-run-config-missing.png
> "If you are working in Eclipse, there will be a preset run
> configuration for the service generator. Choose Run » Run
> configurations… and find generate sadi service under Maven Build in
> the left side panel of the dialog. "
>
> The problem: No run configurations are listed.
...
> Some notes:
>
> 1) When creating the eclipse project, the option "Create project from
> existing source" was not available.
> Instead, I selected the sadi-services directory for the "Location"
> field. (Perhaps just a disparity in Eclipse versions?)
Using
"File > Import..." (as suggested in
http://code.google.com/p/sadi/wiki/Dependencies)
instead of
"File > New > Java Project" (as stated in
http://code.google.com/p/sadi/wiki/BuildingServicesInJava)
will provide one maven build run configuration named "sadi-services".
But "generate sadi service" is still not appearing.
Thanks,
Tim
> 1) When creating the eclipse project, the option "Create project from
> existing source" was not available.
> Instead, I selected the sadi-services directory for the "Location"
> field. (Perhaps just a disparity in Eclipse versions?)
Must be. I'll install the latest Eclipse next week and look into it.
> 3) The file "doc/eclipse/generate sadi service.launch" is visible from
> the package explorer.
In my version of Eclipse, I can right click on this file in the Package explorer (which is in the left-hand panel by default) and choose "Run as…" and use the option that appears "generate sadi service".
Unfortunately, you need to edit the options in that run configuration. You can try to do that by editing the .launch XML itself, or you can just run it as it is, which will generate a service you probably don't want, but will hopefully also make the configuration visible in the Run menu so that subsequent tutorial instructions will make sense. Let me know if this works and I'll update the wiki for the time being (i.e.: until next week when I will install the new Eclipse and update the tutorial accordingly.
Cheers,
Luke
On Sat, Jan 7, 2012 at 12:40 PM, Luke McCarthy <lu...@elmonline.ca> wrote:
> On 2012-01-07, at 7:20 AM, Tim rdf wrote:
>
>> 1) When creating the eclipse project, the option "Create project from
>> existing source" was not available.
>> Instead, I selected the sadi-services directory for the "Location"
>> field. (Perhaps just a disparity in Eclipse versions?)
>
> Must be. I'll install the latest Eclipse next week and look into it.
>
>> 3) The file "doc/eclipse/generate sadi service.launch" is visible from
>> the package explorer.
>
> In my version of Eclipse, I can right click on this file in the Package explorer (which is in the left-hand panel by default) and choose "Run as…" and use the option that appears "generate sadi service".
The only option that I am offered is "Run Configurations..."
Opening that lists "sadi-services" and "sadi.service" under "Maven Build"
Which version of Eclipse are you using? I can try to downgrade to get
it to work for this weekend.
>
> Unfortunately, you need to edit the options in that run configuration.
I'm assuming just these, right?
<listEntry value="serviceName=uniprot2pubmed"/>
<listEntry value="serviceClass=com.example.UniProt2PubMed"/>
<listEntry value="inputClass=http://purl.oclc.org/SADI/LSRN/UniProt_Record"/>
<listEntry value="outputClass=http://sadiframework.org/examples/uniprot2pubmed.owl#AnnotatedUniProtRecord"/>
<listEntry value="contactEmail=your-email-address"/>
> You can try to do that by editing the .launch XML itself, or you can just run it as it is,
Doesn't seem that I can run it :-/
> which will generate a service you probably don't want, but will hopefully also make the configuration visible in the Run menu so that subsequent tutorial instructions will make sense.
The rest of the tutorial makes sense; I've done it from the command
line. I'm now trying to get serious and develop some of my own initial
services, which I'll need Eclipse to stay sane.
Are there advantages to invoking the "generate sadi service" from
Eclipse versus from the command line? Perhaps I can just switch back
an forth.
> Let me know if this works and I'll update the wiki for the time being (i.e.: until next week when I will install the new Eclipse and update the tutorial accordingly.
Thanks for revisiting the documentation.
Regards,
Tim
> Which version of Eclipse are you using? I can try to downgrade to get
> it to work for this weekend.
I have Eclipse 3.6.1 (Helios) and Eclipse 3.5.2 here and it works in both. Helios is much better, though, if you're going that way.
> I'm assuming just these, right?
>
> <listEntry value="serviceName=uniprot2pubmed"/>
> <listEntry value="serviceClass=com.example.UniProt2PubMed"/>
> <listEntry value="inputClass=http://purl.oclc.org/SADI/LSRN/UniProt_Record"/>
> <listEntry value="outputClass=http://sadiframework.org/examples/uniprot2pubmed.owl#AnnotatedUniProtRecord"/>
> <listEntry value="contactEmail=your-email-address"/>
Yes.
> Are there advantages to invoking the "generate sadi service" from
> Eclipse versus from the command line? Perhaps I can just switch back
> an forth.
Only the principle options are right there to be edited. The generate command line can otherwise get very long with a lot of opportunity for typos.
Switching back and forth will be fine — many years ago (before the m2e plugin), that was the only way to do things. You just have to refresh the Eclipse workspace after each Maven operation.
Cheers,
Luke
Thanks.
I installed a fresh Helios 3.6.1
and m2e 1.0 from http://download.eclipse.org/technology/m2e/releases
I used "File > Import.." to create "Existing Projects into Workspace"
from the uncompressed sadi-service-skeleton-0.1.1.zip
Still no run configurations available when right clicking on "generate
sadi service.launch".
When trying "File » New » Java Project and then choose Create project
from existing source" as per [1], I cannot find option "Create project
from existing source".
[1] http://code.google.com/p/sadi/wiki/BuildingServicesInJava
>
>> I'm assuming just these, right?
>>
>> <listEntry value="serviceName=uniprot2pubmed"/>
>> <listEntry value="serviceClass=com.example.UniProt2PubMed"/>
>> <listEntry value="inputClass=http://purl.oclc.org/SADI/LSRN/UniProt_Record"/>
>> <listEntry value="outputClass=http://sadiframework.org/examples/uniprot2pubmed.owl#AnnotatedUniProtRecord"/>
>> <listEntry value="contactEmail=your-email-address"/>
>
> Yes.
Great, thanks.
>
>> Are there advantages to invoking the "generate sadi service" from
>> Eclipse versus from the command line? Perhaps I can just switch back
>> an forth.
>
> Only the principle options are right there to be edited. The generate command line can otherwise get very long with a lot of opportunity for typos.
>
> Switching back and forth will be fine — many years ago (before the m2e plugin), that was the only way to do things. You just have to refresh the Eclipse workspace after each Maven operation.
Given all of the trouble I've been having, I'll just fall back to the
command line to generate the Java stubs and press on. I was just
trying not to miss out on the features that were added for Eclipse.
Thanks for your help.
Regards,
Tim
I've attached a screenshot of what I see when I right-click on the run configuration, just in case it helps:
Thanks again.
Please let me know if and when you would like me to review the documentation.
The screenshot you show is what I'm expecting to see, but I only get
"Run Configurations".
Regards,
Tim
So it does appear that the Maven plugin has changed dramatically. I'll update the wiki on Monday and let you know.
Regards,
Tim
<launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType">
Cheers,
Peter
Making this change allows the run configuration to appear on right-click.
Thanks for your help.
-Tim
Luke will likely respond in detail in a few hours (he's on Pacific time,
so he wont be waking up for another 4-5 hrs); however, a very similar
conversation happened on the sadi-dev list just last week... perhaps look
there for answers (and more generally, look/post there about developer
problems).
Cheers!
Mark
--
Dr. Mark Wilkinson
Associate Professor, Medical Genetics
PI Bioinformatics, Institute for Heart + Lung Health
University of British Columbia
Vancouver, BC, Canada
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2012.0.1901 / Virus Database: 2109/4752 - Release Date: 01/18/12
Can you check the version in the sadi-services/pom.xml file? If if isn't version 0.1.1-e3.7, you need to download the skeleton from http://sadi.googlecode.com/files/sadi-service-skeleton-0.1.1-e3.7.zip (which is the version that works with Eclipse 3.7 and it's built-in Maven integration[1])
If you previously tried to import the old skeleton, you have to make sure the old project is completely removed from the workspace (i.e.: check the box for "delete contents on disk" when you delete the project) before you try again.
If you do have version 0.1.1-e3.7 of the skeleton, this shouldn't be happening and I'm very confused...
Cheers,
Luke
[1] the "Eclipse IDE for Java Developers" (i.e.: the one you can download from http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/indigosr1) includes the Maven plugin