|
DeveloperNotes
Table of Contents
IntroductionThis page is intended for developers or those wishing to download and compile the YAMJ code. Google Group page for developers & skin makers
You can apply to join the group here Project code styleWe need to be consistent in using the code formatting styles. Some of the rules are as below.
Examplepackage com.my.package;
import java.util.List;
public class MyClass {
private String memberAttribute;
private String blahString;
public MyClass {
}
public void methodA() {
// can use inline comments where necessary
if (memberAttribute == null) {
memberAttribute = "blah";
}
}
public int methodB(List<String> someList) {
int count = 0;
for (String s : someList) {
if (s.contains("abc")) {
count++;
} else {
System.out.println(s);
}
}
return count;
}
}Making code changesPlease follow these simple rules when updating the code base to make it easier for all of us to keep up with the changes that have been made. Release_notes.txtIf you make a code change, before you commit the change you need to update the release_notes.txt file in the config directory. The format of the release notes file should be fairly self explanatory: - {Enhancement/Fixed Defect} #{google code issue number} {google code issue title}with the issues listed in numerical order. Committing Code ChangesWhen committing code changes, you should enter this as the comment: Issue {google code issue number} {google code issue title}as this allows the automatic linking back to the issue from the revision page on the google code site. Additional information about the code update can also be entered. Updating the IssueYou should then update the issue and mark it as "Fixed" with a minimum comment of "Fixed in r????" where r???? is the revision that you have just committed. As an alternative, you can commit the issue with the text "Fixes issue #????" and this will automatically close the google code issue for you. Skin ChangesIf you make changes that could affect skin makers, please make a post describing the change on this thread in the Networked Media Tank forums so that they can update their skins appropriately http://www.networkedmediatank.com/showthread.php?tid=18631 Updating documentationDon't forget to document the changes you have made, for example add new properties to the PropertiesConfiguration and SkinConfiguration pages. Setting up a Development Environment for YAMJThere are two programs you can use (free) on all platforms; either NetBeans (Recommended) or Eclipse. Netbeans install instructions are *HERE* Eclipse install instructions are *HERE* Building the projectThere are several Maven steps required for building the project, each of them can be done separately, or they can be combined together depending on how you work. These instruction will vary depending on the IDE you are using. Firstly, you should "clean" the Maven build before any other steps. Right click on the project, run as, then maven clean mvn clean When you are ready to compile the source, you can do a maven package and that will generate the zip file in the target folder of the project. You might need to refresh the directory structure F5 to see the folder. mvn package The first time you package, it will take some time as it will download all the dependencies that are required by YAMJ to your local machine to ensure you have the latest packages. A combined maven command would look like this mvn clean package Optional ParametersThere are a couple of parameters that are useful if you are developing that could save you some time. Skip TestsWhen developing, it's sometimes worthwhile skipping all the Junit tests that are included with YAMJ. You can do this by adding the following switch to the command line: -DskipTests=true Don't zip target directoryIf you are compiling the code to deploy to your own test environment, you probably don't need to have the output directory compressed only to uncompress it again. You can do this by adding the following switch to the command line: -Ddistribution.format=dir Example command lineHere is an example command line with all of the above in it: mvn clean package -DskipTests=true -Ddistribution.format=dir Development ServersThere are two development servers available to the YAMJ developers. The first, I don't expect any of you to really need to interact with, is the Jenkins Continuous Integration system (http://jenkins-ci.org/). This is the application that builds YAMJ whenever there are changes to the google code source. So whenever you commit a change, this should kick in, build YAMJ and then upload it to mediaplayersite.com. If you want to see what it does, what's been built, error logs, etc., then you can access it here: URL: http://jenkins.omertron.com Username: yamj Password: D_v_l0p_r! (Replace "" with the result of 2 plus 1) If you want changes made, or you want the build uploaded to another server, let me know and I'll configure it appropriately. The second system is perhaps a lot more useful for us, is Sonar (http://sonar.codehaus.org/) which is a code quality management system. URL: http://sonar.omertron.com Username: yamj Password: D_v_l0p_r! (Replace "" with the result of 2 plus 1) With this, you can see where there are "rules" violations, errors in the code, etc. I've not fully configured it yet, You can help out by using the system and suggesting rules that need to be added or removed from the system so we can clean up YAMJ - Go to "Configuration" -> "YAMJ" and see the rules that are currently set, we can change these easily |
Please add requirement to Java 1.6 and emphasize on the UTF-8 for character encoding.
Though the description of "Setting up Eclipse for YAMJ" is a bit out-dated for recent eclipse versions, I managed to compile the actual YAMJ revision builts. But I'm still having one (minor) problem: the respective revision number is not recognized. E.g. the ZIP file is allways named yamj-svn-r0000.zip. In Eclipse I use 'Run as' -> 'Ant Built' on the build.xml to start the compiling process. Is there any setting I have to change tho get de revision number incorporated?
No, the revision number is only populated as part of the build from something like hudson
Hello, i would like participate to this projet, but when i download the source with Eclipse there are two errors :
- Project 'moviejukebox' is missing required source folder: 'build/jaxb' - The project cannot be built until build path errors are resolved
How resolved this ? i don't know how make jaxb ?
You don't need to, the jaxb is built with the Ant build.xml file. If you are using something like Eclipse you should be able to click on the build.xml file and get it to compile to the "dist" directory
Can someone update the instructions "Setting up Eclipse for YAMJ", please? Extremely helpful would be a short steb-by-step tutorial for the compiling with Maven (what must be changed/entered where after installing the m2eclipse plugin?). Compiling YAMJ with ant was easy but, thought, I tried several hours, I don't get along with maven :-( Can't use anything newer than rev 2113. Thanks in advance.