النتائج (
العربية) 1:
[نسخ]نسخ!
The LabKey Server source code is available via enlistment in LabKey's Subversion repository. Creating an enlistment will allow you to monitor, build, and develop against the most current, unreleased LabKey source code as well as released versions of the product. The following topic provides step-by-step instructions for acquiring the LabKey Server source code, installing required components, and building LabKey Server from source. Note: if your development project does not require Java, consider using the module development path -- for details see: Develop ModulesChecklistA checklist, guiding you through the setup process, is available for download: LabKey_Development_Server_Checklist.xlsxObtain and Install LabKey SourceEnlist in the Version Control Project to Obtain the LabKey Source Files Via SVNFollow the instructions on the Enlisting in the Version Control Project page to enlist in the LabKey Subversion Repository and obtain the source files.Note: For LabKey developers, we recommend enlisting in the LabKey SVN. However, if you are only interested in reading the source code then you can also obtain the source distribution from the Source Code download page. The source distribution is available as a .zip file for Windows users, and as a .tar file for Unix users. Extract the source files from the LabKey source archive to a designated directory on your local computer. For example, on Windows you might extract the source files to c:labkey. From this point forward we refer to the directory containing the LabKey source as .Obtain and Install LabKey PrerequisitesInstall Oracle JDKDownload the Oracle JDK (Java Development Kit) version 8 from http://www.oracle.com/technetwork/java/javase/downloads/index.html and install it. For more details, see Supported Technologies.Install TomcatDownload the latest version of Tomcat 7 (the web server) from http://tomcat.apache.org/download-70.cgi. If you're developing against the upcoming 15.3 release (i.e., trunk) you can build and run on Tomcat 8 instead (http://tomcat.apache.org/download-80.cgi). Note that distributions built against Tomcat 8 cannot be deployed on Tomcat 7. For more details, see Supported Tomcat Versions.To install Tomcat, unzip it to the chosen directory (e.g., on a Windows machine, C: omcat). The Windows Service Installer is usable for production deployments, but is not generally recommended for developers who tend to start and stop Tomcat frequently. The Service Installer distribution also omits scripts that are used by the standard build file (e.g., catalina.bat).Use of non-ASCII characters, or running the Build Verification Test (BVT), with Tomcat 7 requires that you modify your server configuration in $TOMCAT_HOME/conf/server.xml. (This step is not required for Tomcat 8). If running Tomcat 7, add the following attribute to your Connector element:URIEncoding="UTF-8"Install and Configure Your DatabaseInstall one of the following database servers: PostgreSQL Microsoft SQL ServerPlatform-specific installation instructions: Install PostgreSQL (Windows) Install PostgreSQL (Linux, Unix or Macintosh) Install Microsoft SQL ServerConfigure Environment Variables and System PathAfter you've installed the components listed above, you'll need to create the following environment variables: A new system environment variable named JAVA_HOME that points to your JDK installation location (e.g., C:Program FilesJavajdk1.8.0_xx). If you've already set the JAVA_HOME variable to point to your installation of the JRE, you should modify it to point to the JDK. A new system environment variable named CATALINA_HOME that points to the location of the root directory of your Tomcat installation (e.g., C: omcat).You'll also need to add to your system PATH: References to the locations: /external/ant/bin and /build/deploy/binFor example, C:devlabkeyexternalantin;C:devlabkeyuilddeployin. These directories contain Apache Ant for building the LabKey source, as well as a number of open-source executable files used by LabKey. Note that the build process automatically creates the build/deploy/bin, so it may not exist initially. For more information on third-party components used by LabKey, see Third-Party Components and Licenses.Note: Apache Ant is included in the project as a convenience; if you have a recent version of Ant already installed you can use that instead. As of LabKey Server 14.2, Ant 1.9.3 or newer is required to build.For example, on OSX place the environment variables in your .bash_profile:export JAVA_HOME=`/usr/libexec/java_home -v 1.8`export CATALINA_HOME=$HOME/apps/tomcatexport LABKEY_ROOT=$HOME/labkey/trunkexport LABKEY_GWT_USER_OVERRIDE="gwt-user-firefox"export PATH=$LABKEY_ROOT/external/ant/bin:$LABKEY_ROOT/build/deploy/bin:$PATHInstall and Configure IntelliJ IDEAThe LabKey development team develops LabKey using a recent version of IntelliJ IDEA (currently 14.1.x). You can use this tool or a different Java environment if you are planning on modifying or extending the LabKey source code. Here we describe how to configure the IntelliJ development environment, but we recommend employing the same general principles if you are using a different development environment.You can download IntelliJ IDEA for trial or purchase from http://www.jetbrains.com/idea. Since LabKey is an open-source project, if you're doing open-source development you can use the free license that JetBrains makes available to open source developers. To qualify, JetBrains requires that you contribute code back to the project and have been a member of the community for at least three months. The requirements are available on their web site. Contact us for more information.Some users have experimented with Eclipse as the IDE, for set up details, see the Developer Message Board.Follow these steps to configure IntelliJ to build and debug LabKey:Open and Configure the LabKey Project in IntelliJ1. Copy the file /server/LabKey.iws.template to create a new file called /server/LabKey.iws.2. Launch IntelliJ.3. Open the LabKey IntelliJ project file, LabKey.ipr, from the /server directory. IntelliJ will require you set two path variables in order to load the project: Set the CATALINA_HOME path variable to the root directory of your Tomcat installation (e.g., C:tomcat). (If IntelliJ doesn't ask for this path, go to IntelliJ IDE > Preferences. Select Path Variables.)Installing and configuring GWT is required only if you plan to modify existing or develop new Google Web Toolkit (GWT) components.Configure the Target JDKWe recommend that you configure IntelliJ to use the JDK that you installed earlier as the "Project SDK" (Note that IntelliJ uses the term "SDK" to mean the JDK).Configure the target JDK for the IntelliJ project as follows: From the IntelliJ File menu, choose Project Structure. Select Project. Under Project SDK click New. Browse to and select the path of your JDK. Click Edit. Change the Name of the SDK to "labkey". Click Modules. Select the LabKey module, then select the Dependencies tab. Ensure that the Module SDK is set to Project SDK (labkey). Verify that the other modules are also using the project SDK. Click Apply. Click OK.Verify the target JDK for Ant as follows: Display the IntelliJ Ant Build menu, if it's not already displayed, by choosing View| Tool Windows | Ant Build. Right-click on LabKey Build and select Properties. Click the Execution tab. Verify that the Use Project Default Ant option is selected. Verify that in the Run under JDK drop-down, "Project JDK (labkey)" is selected. Click OK.Configure LabKey Development/Debug ConfigurationThe LabKey.iws that you created earlier should include a LabKey Development/Debug configuration that you can use to run and debug LabKey Server from within IntelliJ. In the IntelliJ toolbar you should see a drop-down menu with LabKey Development selected. Click the drop-down (or open the Run menu) and select Edit Configurations to review the configuration.You should be able to use the configuration from LabKey.iws and skip to the next step. However, below are steps you could use to create a new Run/Debug configuration and explanations for each setting: Select the Application tab. Click the + button to add a new configuration, and name it "LabKey Development" or something similar. Set the Main class to "org.apache.catalina.startup.Bootstrap". Set the VM parameters. The LabKey developers use VM parameters similar to the following:-Dcatalina.base="./" -Dcatalina.home="./" -Djava.io.tmpdir="./temp" -Ddevmode=true -ea -Dsun.io.useCanonCaches=false -Xmx1G -classpath "./bin/bootstrap.jar;./bin/tomcat-juli.jar" Note that classpath arguments are separated with a ":" on OSX and a ";" on Windows. For more information on setting Java VM parameters, see the J2SE documentation. For more information on setting the Tomcat system properties, see the Apache Tomcat documentation.
The "-Ddevmode=true" setting runs your LabKey server in development mode, which provides these benefits:
Prevents your server from sending exception and usage reports to labkey.org.
Causes your LabKey instance to access JavaScript files, SQL Scripts, schema XML files, and other resources from the source tree. When you change files of these types, your LabKey instance will incorporate the changes immediately without requiring a rebuild.
Enables dynamic recompilation of JSP files. When you edit a JSP file your server will automatically recompile it the next time it's used, providing much faster turnaround time.
Set the Program parameters to "start".
Set the Working directory to your
يجري ترجمتها، يرجى الانتظار ..
