`
zhaozhongwei
  • 浏览: 52552 次
  • 性别: Icon_minigender_1
  • 来自: 沈阳
社区版块
存档分类
最新评论

source. and output.

阅读更多
The source and output properties in build.properties control the folders to be compiled and where to place the resulting output. The eclipse help briefly talks about it.
    * source.<library> - lists source folders that will be compiled (e.g. source.xyz.jar=src/, src-ant/). If the library is specified in your plug-in.xml or manifest.mf, the value should match it;
    * output.<library> - lists the output folder receiving the result of the compilation;


Source Folders and Output Folders

Source and Output folder have already been discussed in this post. Only the source folders gets compiled and the generated class files get stored in the corresponding output folder. A project can have one or more source folder. If a source folder does not have a output folder attached to it explicitly, its output will go to the default output folder. The .classpath file stores all this information.

source.. and output..

The real syntax is source.<library> and output.<library> where <library> is generally the name of the jar. Here the second dot signifies the default library. Any source folder assigned to it gets it output reside in the root when the plug-in is build. The output.. entry tells the PDE Build where to pick the classes for source.. from.

Typical entries look like this

source.. = src/
output.. = bin/

 

When a plug-in with above entries is build the structure of the plug-in jar will look like this
org.example.sample_1.0.0
│   plugin.xml
│
├───icons
│       sample.gif
│
├───META-INF
│       MANIFEST.MF
│
└───org
    └───example
        └───sample
            │   Activator.class
            │
            └───actions
                    SampleAction.class

 

More complex plug-ins have more than one source folder. org.eclipse.pde.core is one such plug-in. It is good practice to assign separate output folder for separate source folders. This is not mandatory.
Lets assume src and src_an are the two source folders and their corresponding output folders are bin and bin_ant . Then a build.properties like
source.. = src/
output.. = bin/
source.ant_tasks/anttasks.jar = src_ant/
output.ant_tasks/anttasks.jar = bin_ant/

will create a plug-in which will look something like this

org.example.sample_1.0.0
│   plugin.xml
│
├───ant_tasks
│       anttasks.jar
│
├───icons
│       sample.gif
│
├───META-INF
│       MANIFEST.MF
│
└───org
    └───example
        └───sample
            │   Activator.class
            │
            └───actions
                    SampleAction.class
The contents of the src_ant folder will get compiled and jared in to anttasks.jar inside ant_tasks folder because of the source.ant_tasks/anttasks.jar = src_ant/ entry.


Classpath vs source/output entries

The source folder and output folder information is already available in class path then why source/output entries are needed? The classpath entries are used to compile source code. But the PDE Build relies on the source/output entries while building (or exporting) the plug-ins. Suppose a plug-in A refers to a class C in plug-in B. Then while building the plug-in A PDE Build will look into build.properties of plug-in B to locate the C.class .


Rules of using source. and output. entries

  1. Every source folder should appear in a source. entry.
  2. A source folder can appear in one and only one source. entry.
  3. The source and output folders are specified as their path relative to the root of the project.
  4. All source folders whose output folder is same should belong to same source. entry.
  5. The corresponding output folders should be mentioned in the corresponding output.entry.
Note that should in above rules means that rule is a good practice and not an obligation but if not followed the result of PDE Build might be unexpected.
分享到:
评论

相关推荐

    VBeeJ[VB代码转换工具]

    Select your source files, select the output directory for the converted files, then run. The output directory is the directory where VBeeJ For Java will put the converted files. It defaults to the ...

    FastReport VCL 6.6.12 Enterprise Full Source.rar

    * [Lazarus] Optmized MaxiCode output - Fixed bug with Mercator property * [Lazarus] Fixed modal dialogs in preview under linux GTK - Fixed Detail report bug when rebuilds report using ...

    Debugging with GDB --2007年

    2.1.3 Redirecting WDB input and output to a file . . . . . 2.2 Quitting GDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Shell commands . . . . . . . . . . . ....

    DebuggingWithGDB 6.8-2008

    4.6 Your Program’s Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Debugging an Already-running Process . . . . . . . . . . . . . . . . . . . . . . 4.8 Killing the Child ...

    Computing.With.Python.An.Introduction.to.Python.for.Science.and.Engineer

    Python is a free open-source language and environment that has tremendous potential in the scientific computing domain. Computing with Python presents the programming language in tight connection with...

    Debugging with GDB --2001年5.3

    Your program’s input and output . . . . . . . . . . . . . . . . . . . . . . . . Debugging an already-running process . . . . . . . . . . . . . . . . . . . Killing the child process . . . . . . . . . ...

    cc2530_user_guide

    1.1.1 CPU and Memory ................................................................................................. 21 1.1.2 Clocks and Power Management ...............................................

    Debugging with GDB --2003年6.0

    Your program’s input and output . . . . . . . . . . . . . . . . . . . . . . . . Debugging an already-running process . . . . . . . . . . . . . . . . . . . Killing the child process . . . . . . . . . ...

    最新版的DebuggingWithGDB7.05-2010

    4.6 Your Program’s Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Debugging an Already-running Process . . . . . . . . . . . . . . . . . . . . . . . . 4.8 Killing the ...

    EhLib 6.3 Build 6.3.176 Russian version. Full source included.

    output them on screen and to printer. TPrinterPreview have all functions and properties as in TPrinter object. You can use TPrinterPreview object similarly of TPrinter except some details. In ...

    Error Correction coding——mathematical methods and algorithms

    Error Correction Coding - Mathematical Methods and Algorithms (Source Files Contained).pdf Error Correction Coding Mathematical Methods and Algorithms Todd K. Moon Utah State University @ E ! C I E N...

    iso-iec 14496-10(3rd_2006-03-01)_MPEG4_AVC_H264.pdf

    Contents Page 0 Introduction................................6 Source, coded, decoded and output data formats, scanning processes, and neighbouring relationships.......... 14 6.1 Bitstream formats...........

    440_PLi_23708204_en_0106(参数表).pdf

    Block Diagram and Terminals ....................................................................7 1.1 Block Diagram ...................................................................................

    LVQ学习矢量化算法.rar_LVQ source code_LVQ-EXAMPLE_Vector Quantization_l

    Source code may be found in LVQ.CPP. Sample training data is found in LVQ1.PAT. Sample test data is found in LVQTEST1.TST and LVQTEST2.TST. The LVQ program accepts input consisting of vectors and ...

    Springer.The.Developer’s.Guide.to.Debugging.2008.pdf

    4.5 Combining Memory and Source Code Debuggers . . . . . . 40 4.6 Cutting Down the Noise – Suppressing Errors . . . . . . . 40 4.7 When to Use a Memory Debugger . . . . . . . 41 4.8 Restrictions . . ...

    Microprocessor Design Principles and Practices With VHDL

    2.3 Basic Logic Operators and Logic Expressions...............................................................................................5 2.4 Truth Tables..........................................

    Developing Statistical Software in Fortran 95

    17 2.1.5 Standard Input and Output . . . . . . . . . . . . . . 19 2.1.6 Intrinsic Uniform Generator . . . . . . . . . . . . . . 20 2.1.7 Integer and Real Kinds . . . . . . . . . . . . . . . ...

    Python Tutorial 入门指南3.6英文版

    10.4. Error Output Redirection and Program Termination 112 10.5. String Pattern Matching 112 10.6. Mathematics 113 10.7. Internet Access 114 10.8. Dates and Times 114 10.9. Data Compression 115 10.10....

    Writing Testbenches using System Verilog

    Input and Output Vectors . . . . . . . . . 221 Golden Vectors . . . . 222 Self-Checking Operations . . . . . . . . . 224 Complex Stimulus . . . . . . . . . . . . 227 Feedback Between Stimulus and ...

Global site tag (gtag.js) - Google Analytics