Blogracy is a simple peer-to-peer social networking system, built on top of Bittorrent. Essentially Blogracy is composed by two main modules:
- a Vuze plugin
- a web application
This information regards the first module, the Vuze plugin.
Vuze is not packaged for Maven right now. This may change in the future. Right now, it is necessary to:
- Download the latest AzureusXYZ.jar from main Vuze site: http://dev.vuze.com/
- Rename the downloaded file to Azureus2.jar, as suggested on the Vuze site
- In the same directory where the files have been downloaded, execute the "mvn-install-vuze.sh" script.
To compile the sub-project, it is sufficient to issue
in the sub-project folder. This compiles all the Java sources. The classes, the resource files (those in src/resources) and the configuration files (in src/config) are copied in the "target" folder.
The following command, instead, creates a JAR archive in the "target" folder, including Vuze classes and all other dependencies.
Maven and the IDE
Maven pom files are simply a description of a project. Such description can be easily interpreted by an IDE and can be used to build the project.
Suppose that Blogracy sources have been cloned to "
The first step, in the "/src/blogracy/blogracy-vuze/" folder, is just:
that updates the eclipse project with stuff coming from maven. Repeat this step when something changes in the pom file.
Then, start Eclipse using blogracy as workspace:
eclipse -data ~/src/blogracy/
In Eclipse, choose "Import Existing Maven Project" from the "File" menu, and indicate the "~/src/blogracy/blogracy-vuze/" folder.
Feel free to read more documentation regarding integrating Eclipse with Maven. There is also an excellent plugin that can be installed in Eclipse. We however found that this first project setup phase is easier this way.
With IntelliJ things mostly work out of the box.
java -jar target/blogracy-vuze-1.0-SNAPSHOT-jar-with-dependencies.jar
We do not use GUI or SWT. Consequently we run the Vuze console version. We do not depend from STW, as a consequence.
Alternatively, you can put the blogracy-vuze...jar file into the plugins folder of Vuze, and start Vuze normally. This way, you may also need to start ActiveMQ by hand, separately.
Executing Blogracy inside the IDE
Use the information above to create the appropriate configuration in the IDE. The Blogracy class implements a static "main" method for starting ActiveMQ, Vuze and Blogracy-Vuze plugin.