Hi,
I want to compile and run the basex-examples in Eclipse (Oxygen) but even after adding Maven-support, I can't manage to compile the sources (were downloaded with git).
When I look at the properties for the basex-examples project, I would expect to find the Java-classes in the target/classes directory but this directory does not contain any java classes.
How can I compile the sources?
Thanks,
Ben
Hi Ben,
in principle there's 'nothing special' to watch out for.
- $ git clone git@github.com:BaseXdb/basex.git - Eclipse: File -> Import -> Git -> Projects from Git
The project should compile properly and one should be able to run the examples. What problems do you encounter?
Cheers, Alex
On 13. Apr 2018, at 01:11, Ben Engbers Ben.Engbers@Be-Logical.nl wrote:
Hi,
I want to compile and run the basex-examples in Eclipse (Oxygen) but even after adding Maven-support, I can't manage to compile the sources (were downloaded with git).
When I look at the properties for the basex-examples project, I would expect to find the Java-classes in the target/classes directory but this directory does not contain any java classes.
How can I compile the sources?
Thanks,
Ben
Hi,
I select basex-examples [basex master], right-click and 'Run As´ java application. Eclipse starts building a type hiërarchie and returns with this dialog:
After selecting QueryExample, I get this missege in the console: Error: Could not find or load main class org.basex.examples.api.QueryExample
I checked but QueryExample.class does not exist
Ben
Op 13-04-18 om 10:02 schreef Alexander Holupirek:
Hi Ben,
in principle there's 'nothing special' to watch out for.
- $ git clone git@github.com:BaseXdb/basex.git
- Eclipse: File -> Import -> Git -> Projects from Git
The project should compile properly and one should be able to run the examples. What problems do you encounter?
Cheers, Alex
Hi Ben,
do you have Project -> Build Automatically enabled?
What happens if you try to run 'HTMLExample' (select basex-examples [basex master], right-click and 'Run As´ java application, select 'HTMLExample - org.basex.examples.create'?
Cheers, Alex
On 13. Apr 2018, at 11:21, Ben Engbers Ben.Engbers@Be-Logical.nl wrote:
Hi,
I select basex-examples [basex master], right-click and 'Run As´ java application. Eclipse starts building a type hiërarchie and returns with this dialog:
<mlahhplipfinldho.png>
After selecting QueryExample, I get this missege in the console: Error: Could not find or load main class org.basex.examples.api.QueryExample
I checked but QueryExample.class does not exist
Ben
Op 13-04-18 om 10:02 schreef Alexander Holupirek:
Hi Ben,
in principle there's 'nothing special' to watch out for.
- $ git clone
git@github.com:BaseXdb/basex.git
- Eclipse: File -> Import -> Git -> Projects from Git
The project should compile properly and one should be able to run the examples. What problems do you encounter?
Cheers, Alex
Hi Alex,
Automatic build is enabled.
Error: Could not find or load main class org.basex.examples.create.HTMLExample Op 13-04-18 om 11:35 schreef Alexander Holupirek:
This is how basex shows up in my project-explorer:
I am running Fedora on a Thinkpad
Ben
Hi Ben,
do you have Project -> Build Automatically enabled?
What happens if you try to run 'HTMLExample' (select basex-examples [basex master], right-click and 'Run As´ java application, select 'HTMLExample - org.basex.examples.create'?
Cheers, Alex
On 13. Apr 2018, at 11:21, Ben Engbers Ben.Engbers@Be-Logical.nl wrote:
Hi,
I select basex-examples [basex master], right-click and 'Run As´ java application. Eclipse starts building a type hiërarchie and returns with this dialog:
<mlahhplipfinldho.png>
After selecting QueryExample, I get this missege in the console: Error: Could not find or load main class org.basex.examples.api.QueryExample
I checked but QueryExample.class does not exist
Ben
Op 13-04-18 om 10:02 schreef Alexander Holupirek:
Hi Ben,
in principle there's 'nothing special' to watch out for.
- $ git clone
git@github.com:BaseXdb/basex.git
- Eclipse: File -> Import -> Git -> Projects from Git
The project should compile properly and one should be able to run the examples. What problems do you encounter?
Cheers, Alex
Hi Ben,
the red signs indicate problems. Is there output in the 'Problems'-View (Window->Show View->Problems)? What happens if you Project->Clean...->Clean all projects(enabled)->Clean?
Cheers, Alex
On 13. Apr 2018, at 11:46, Ben Engbers Ben.Engbers@Be-Logical.nl wrote:
Hi Alex,
Automatic build is enabled.
Error: Could not find or load main class org.basex.examples.create.HTMLExample Op 13-04-18 om 11:35 schreef Alexander Holupirek:
This is how basex shows up in my project-explorer:
<jmbneapdbnikpkjo.png>
I am running Fedora on a Thinkpad
Ben
Hi Ben,
do you have Project -> Build Automatically enabled?
What happens if you try to run 'HTMLExample' (select basex-examples [basex master], right-click and 'Run As´ java application, select 'HTMLExample - org.basex.examples.create'?
Cheers, Alex
On 13. Apr 2018, at 11:21, Ben Engbers Ben.Engbers@Be-Logical.nl wrote:
Hi,
I select basex-examples [basex master], right-click and 'Run As´ java application. Eclipse starts building a type hiërarchie and returns with this dialog:
<mlahhplipfinldho.png>
After selecting QueryExample, I get this missege in the console: Error: Could not find or load main class org.basex.examples.api.QueryExample
I checked but QueryExample.class does not exist
Ben
Op 13-04-18 om 10:02 schreef Alexander Holupirek:
Hi Ben,
in principle there's 'nothing special' to watch out for.
- $ git clone
git@github.com:BaseXdb/basex.git
- Eclipse: File -> Import -> Git -> Projects from Git
The project should compile properly and one should be able to run the examples. What problems do you encounter?
Cheers, Alex
Hi Alex,
Cheers, Ben
Op 13-04-18 om 11:52 schreef Alexander Holupirek:
Hi Ben,
the red signs indicate problems. Is there output in the 'Problems'-View (Window->Show View->Problems)?
A lot of lines like this one: Description Resource Path Location Type Archive for required library: '/home/bengbers/.m2/repository/org/jdom/jdom/1.1/jdom-1.1.jar' in project 'basex-api' cannot be read or is not a valid ZIP file basex-api Build path Build Path Problem
What happens if you Project->Clean...->Clean all projects(enabled)->Clean?
Cleaning does not help
Cheers, Alex
On 13. Apr 2018, at 11:58, Ben Engbers Ben.Engbers@Be-Logical.nl wrote:
the red signs indicate problems. Is there output in the 'Problems'-View (Window->Show View->Problems)?
A lot of lines like this one: Description Resource Path Location Type Archive for required library: '/home/bengbers/.m2/repository/org/jdom/jdom/1.1/jdom-1.1.jar' in project 'basex-api' cannot be read or is not a valid ZIP file basex-api Build path Build Path Problem
You seem to have a maven problem. The .m2 folder is mavens local repository (it is used to store all your project’s dependencies (plugin jars and other files which are downloaded by Maven)). Perhaps during the recent installation you went offline or something like that).
At least, this is not a basex related problem.
However, you can try to get it resolved by
- removing the whole maven folder: $ rm -rf ~/.m2 - Eclipse: Project -> Clean all projects (errors and warning afterwards are expected in the package explorer view) - Eclipse: Package Explorer View - right-click one of the basex-xxx entries -> Maven -> Update Project -> Select All (basex-api, basex-core, basex-examples, basex-tests)
The expectation is that the maven local repository is rebuild (dependencies downloaded again) without problems. Afterward the automatic build will probably kick in and compile all projects.
Hope this helps, Alex
Yep!
:-)
Ben
Op 13-04-18 om 12:21 schreef Alexander Holupirek:
On 13. Apr 2018, at 11:58, Ben Engbers Ben.Engbers@Be-Logical.nl wrote:
the red signs indicate problems. Is there output in the 'Problems'-View (Window->Show View->Problems)?
A lot of lines like this one: Description Resource Path Location Type Archive for required library: '/home/bengbers/.m2/repository/org/jdom/jdom/1.1/jdom-1.1.jar' in project 'basex-api' cannot be read or is not a valid ZIP file basex-api Build path Build Path Problem
You seem to have a maven problem. The .m2 folder is mavens local repository (it is used to store all your project’s dependencies (plugin jars and other files which are downloaded by Maven)). Perhaps during the recent installation you went offline or something like that).
At least, this is not a basex related problem.
However, you can try to get it resolved by
- removing the whole maven folder: $ rm -rf ~/.m2
- Eclipse: Project -> Clean all projects (errors and warning afterwards are expected in the package explorer view)
- Eclipse: Package Explorer View - right-click one of the basex-xxx entries -> Maven -> Update Project -> Select All (basex-api, basex-core, basex-examples, basex-tests)
The expectation is that the maven local repository is rebuild (dependencies downloaded again) without problems. Afterward the automatic build will probably kick in and compile all projects.
Hope this helps, Alex
basex-talk@mailman.uni-konstanz.de