CVEBrowser - a search engine for the Mitre CVE dictionary. | ||
---|---|---|
<<< Previous | Next >>> |
Compiling from source is not advised for casual users, if you need to compile the source code then follow this steps.
After you download the sources on an empty directory, unpack them like this:
bash$ tar -xzvf cvebrowser-sources-0.0.tar.gz doc/ doc/manual/ etc/ etc/cron/ etc/properties/ etc/properties/app/ etc/properties/test/ etc/rpm/ etc/sql/ etc/xml/ etc/xml/app/ etc/xml/test/ etc/bash/ etc/test/ build/ htdocs/ htdocs/design/ htdocs/images/ scripts/ src/ src/cvebrowser/ src/cvebrowser/dictionary/ src/cvebrowser/dictionary/data/ src/cvebrowser/dictionary/data/parser/ ... |
To compile and pack the source code type the following:
bash$ ant rpm Buildfile: build.xml init: [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/build [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/doc [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/doc/javadoc [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/lib [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/bin [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/etc [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/cron [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/rpm/BUILD [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/rpm/RPMS [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/rpm/SOURCES [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/rpm/SPECS [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/rpm/SRPMS build: [javac] Compiling 22 source files to /home/josevnz/sourceforge/cvebrowser/build [copy] Copying 40 files to /home/josevnz/sourceforge/cvebrowser/build jar: [jar] Building jar: /home/josevnz/sourceforge/cvebrowser/dist/lib/cvebrowser-tools-0.0.jar [jar] Building jar: /home/josevnz/sourceforge/cvebrowser/dist/lib/cvebrowser-web-0.0.jar doc: [javadoc] Generating Javadoc [javadoc] Javadoc execution [javadoc] Loading source files for package cvebrowser.dictionary.data... [javadoc] Loading source files for package cvebrowser.dictionary.data.net... [javadoc] Loading source files for package cvebrowser.dictionary.data.parser... [javadoc] Loading source files for package cvebrowser.dictionary.data.persistence... [javadoc] Loading source files for package cvebrowser.dictionary.data.persistence.util... [javadoc] Loading source files for package cvebrowser.util.parser... [javadoc] Constructing Javadoc information... [javadoc] Standard Doclet version 1.4.2 [javadoc] Building tree for all the packages and classes... [javadoc] Building index for all the packages and classes... [javadoc] Building index for all classes... rpm: [copy] Copying 2 files to /home/josevnz/sourceforge/cvebrowser/dist/doc [echo] Creating documentation RPM [tar] Building tar: /home/josevnz/sourceforge/cvebrowser/rpm/SOURCES/cvebrowser-docs-0.0.tar.gz [exec] Building target platforms: noarch [exec] Building for target noarch ... [exec] + umask 022 [exec] + cd rpm/BUILD [exec] + exit 0 BUILD SUCCESSFUL Total time: 14 seconds [josevnz@localhost cvebrowser]$ |
The RPM installer will tell you were the RPM binaries were left.
Its a good idea to run the tests if you're compiling from source. To do that, just type the following:
bash$ ant test Buildfile: build.xml init: [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/build [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/doc [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/doc/javadoc [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/lib [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/bin [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/etc [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/dist/cron [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/rpm/BUILD [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/rpm/RPMS [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/rpm/SOURCES [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/rpm/SPECS [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/rpm/SRPMS build: [javac] Compiling 22 source files to /home/josevnz/sourceforge/cvebrowser/build [copy] Copying 40 files to /home/josevnz/sourceforge/cvebrowser/build jar: [jar] Building jar: /home/josevnz/sourceforge/cvebrowser/dist/lib/cvebrowser-tools-0.0.jar [jar] Building jar: /home/josevnz/sourceforge/cvebrowser/dist/lib/cvebrowser-web-0.0.jar test: [copy] Copying 2 files to /home/josevnz/sourceforge/cvebrowser/test [propertyfile] Creating new property file: /home/josevnz/sourceforge/cvebrowser/test/RunAllDownloadTests.properti es [propertyfile] Creating new property file: /home/josevnz/sourceforge/cvebrowser/test/CSVToXMLParser.properties [propertyfile] Creating new property file: /home/josevnz/sourceforge/cvebrowser/test/RunAllDictionaryTests.proper ties [propertyfile] Creating new property file: /home/josevnz/sourceforge/cvebrowser/test/XMLImporter.main.properties [javac] Compiling 4 source files to /home/josevnz/sourceforge/cvebrowser/test [echo] Creating test database test_cvebrowser and tables [echo] Make sure than the user root has 'GRANT' permissions enabled: "update user set grant_priv = 'Y' where user ='root';" or the user creation will fail. [sql] Executing commands [sql] 4 of 4 SQL statements executed successfully [sql] Executing file: /home/josevnz/sourceforge/cvebrowser/etc/sql/create_tables.sql [sql] Executing file: /home/josevnz/sourceforge/cvebrowser/etc/sql/load_metadata.sql [sql] 69 of 69 SQL statements executed successfully [echo] Tests summary will go to test/TEST-* [mkdir] Created dir: /home/josevnz/sourceforge/cvebrowser/test/reports [junit] Running cvebrowser.test.RunAllDownloadTests [junit] Tests run: 8, Failures: 0, Errors: 0, Time elapsed: 13.239 sec [junit] Running cvebrowser.test.RunAllDictionaryTests [junit] jdbc:mysql://localhost.localdomain:3306/test_cvebrowser, test_cvebrowser, cv3br0ws3r [junit] jdbc:mysql://localhost.localdomain:3306/test_cvebrowser, test_cvebrowser, cv3br0ws3r [junit] jdbc:mysql://localhost.localdomain:3306/test_cvebrowser, test_cvebrowser, cv3br0ws3r [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 20.794 sec [echo] Drop test database test_cvebrowser and tables [sql] Executing commands [sql] 5 of 5 SQL statements executed successfully BUILD SUCCESSFUL Total time: 56 seconds [josevnz@localhost cvebrowser]$ |
Finally, you can run some of the compilation steps one at the time. To check with targets are available type the following:
bash$ ant -projecthelp Buildfile: build.xml Main targets: build Compile the Java source code clean Delete the temporary project objects doc Generate the project documentation init Prepare the temporary directories for the project jar Pack the project sources for distribution rpm Create the installation RPM files test Run the unit tests Default target: build |
If you want to contribute with this project, please go to the developers list.
<<< Previous | Home | Next >>> |
Application requirements | Installation |