Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "SMILA/Development Guidelines/Introduction to make.xml"
m |
m (→make.xml) |
||
(17 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
− | + | === Overview of ant build targets === | |
− | + | ||
− | + | ||
− | === | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
[[Image:build.all.png]] | [[Image:build.all.png]] | ||
'''Build process graph''' | '''Build process graph''' | ||
− | |||
=== make.xml === | === make.xml === | ||
Line 21: | Line 9: | ||
{|width="100%" border="1" | {|width="100%" border="1" | ||
|- | |- | ||
− | | | + | |bgcolor="#f0f0f0" colspan="3" align="center"|'''Targets''' |
− | + | ||
− | + | ||
|- | |- | ||
|bgcolor="#f0f0f0"|'''name''' | |bgcolor="#f0f0f0"|'''name''' | ||
Line 31: | Line 17: | ||
|all | |all | ||
|executes all dependencies, default build target | |executes all dependencies, default build target | ||
− | |clean, fetch, build, | + | |clean, fetch, build, build-jmxclient, final-application, test |
|- | |- | ||
|clean | |clean | ||
− | |deletes the build directory ( | + | |deletes the build directory (smila.build) and the workspace folder under SMILA.builder |
| / | | / | ||
|- | |- | ||
Line 50: | Line 36: | ||
|- | |- | ||
|build.core | |build.core | ||
− | |builds the application (CI. | + | |builds the application (CI.SMILA not final-application) |
| / | | / | ||
+ | |- | ||
+ | |build-jmxclient | ||
+ | |builds the jmxclient tool | ||
+ | | / | ||
|- | |- | ||
|test | |test | ||
|executes all dependencies | |executes all dependencies | ||
− | |build, test.clean | + | |build, test.clean, test.core, report |
|- | |- | ||
|test.clean | |test.clean | ||
− | |deletes the eclipse-test dir under the build directory (eclipse.build) | + | |executes all dependencies, deletes the eclipse-test dir under the build directory (eclipse.build) and unzips CI.SMILA |
− | | | + | |build.test.feature |
|- | |- | ||
− | | | + | |build.test.feature |
− | | | + | |builds the test feature |
− | | / | + | | / |
|- | |- | ||
|test.core | |test.core | ||
Line 71: | Line 61: | ||
|report | |report | ||
|executes all dependencies | |executes all dependencies | ||
− | |test.report, checkstyle, report. | + | |test.report, checkstyle, report.jacoco, pmd, pmd-cpd |
|- | |- | ||
|test.report | |test.report | ||
Line 81: | Line 71: | ||
| / | | / | ||
|- | |- | ||
− | |report. | + | |report.jacoco |
− | |creates | + | |creates jacoco report |
| / | | / | ||
|- | |- | ||
|pmd | |pmd | ||
|scans Java source code and looks for potential problems | |scans Java source code and looks for potential problems | ||
+ | | / | ||
+ | |- | ||
+ | |pmd-cpd | ||
+ | |Runs pmd-cpd (potential duplication) check | ||
| / | | / | ||
|- | |- | ||
|final-application | |final-application | ||
|builds the final application | |builds the final application | ||
− | |build | + | |build, build-jmxclient |
|- | |- | ||
|test.clean2default | |test.clean2default | ||
Line 97: | Line 91: | ||
| / | | / | ||
|- | |- | ||
− | | | + | |all-without-test |
− | | | + | |executes all dependencies (builds the application but omits tests and reports) |
− | | | + | |clean,fetch,build,build-jmxclient,final-application |
|- | |- | ||
− | |bgcolor="#f0f0f0"|''' | + | |} |
− | |bgcolor="#f0f0f0"|''' | + | <br> |
− | |bgcolor="#f0f0f0"| | + | {|width="50%" border="1" |
+ | |bgcolor="#f0f0f0" colspan="2" align="center"|'''Properties''' | ||
+ | |- | ||
+ | |bgcolor="#f0f0f0" width="25%"|'''name''' | ||
+ | |bgcolor="#f0f0f0" width="25%"|'''description''' | ||
|- | |- | ||
|feature-names | |feature-names | ||
|list of all features | |list of all features | ||
− | |||
|- | |- | ||
− | | | + | |} |
− | + | <br> | |
− | |bgcolor="#f0f0f0"| | + | {|width="50%" border="1" |
+ | |bgcolor="#f0f0f0" colspan="2" align="center"|'''Patternsets''' | ||
|- | |- | ||
− | |bgcolor="#f0f0f0"|'''name''' | + | |bgcolor="#f0f0f0" width="25%"|'''name''' |
− | |bgcolor="#f0f0f0"|'''description''' | + | |bgcolor="#f0f0f0" width="25%"|'''description''' |
− | + | ||
|- | |- | ||
|patterns.bundle.all | |patterns.bundle.all | ||
|list of all plugins | |list of all plugins | ||
− | |||
|- | |- | ||
|patterns.bundle.excludes | |patterns.bundle.excludes | ||
|list of all exluded plugins | |list of all exluded plugins | ||
− | |||
|- | |- | ||
− | |bgcolor="#f0f0f0"|'''Dirsets/Restrict''' | + | |} |
− | + | <br> | |
− | + | {|width="50%" border="1" | |
+ | |bgcolor="#f0f0f0" colspan="2" align="center"|'''Dirsets/Restrict''' | ||
|- | |- | ||
− | |bgcolor="#f0f0f0"|'''name''' | + | |bgcolor="#f0f0f0" width="25%"|'''name''' |
− | |bgcolor="#f0f0f0"|'''description''' | + | |bgcolor="#f0f0f0" width="25%"|'''description''' |
− | + | ||
|- | |- | ||
|bundle.dirs.all | |bundle.dirs.all | ||
|list of all plugins (patterns.bundle.all - patterns.bundle.excludes) | |list of all plugins (patterns.bundle.all - patterns.bundle.excludes) | ||
− | | | + | |- |
+ | |bundle.dirs.smila | ||
+ | |list of all SMILA plugins (org.eclipse.smila.* - patterns.bundle.excludes) | ||
+ | |- | ||
+ | |bundle.dirs.3rd | ||
+ | |list of all 3rd party plugins (patterns.bundle.all - patterns.bundle.excludes - org.eclipse.smila.*) | ||
|- | |- | ||
|bundle.dirs.all.test | |bundle.dirs.all.test | ||
|list of all test bundles | |list of all test bundles | ||
− | | | + | |- |
+ | |bundle.dirs.smila.test | ||
+ | |list of all SMILA test bundles | ||
+ | |- | ||
+ | |bundle.dirs.3rd.test | ||
+ | |list of all 3rd party test bundles | ||
+ | |- | ||
|} | |} | ||
Line 148: | Line 154: | ||
!bgcolor="#f0f0f0"|description | !bgcolor="#f0f0f0"|description | ||
|- | |- | ||
− | |M_test.bundle. | + | |M_test.bundle.smila |
− | |executes all tests | + | |executes all tests in a bundle |
|- | |- | ||
|M_dirset2list | |M_dirset2list | ||
|converts a dirset of plugins to a name list | |converts a dirset of plugins to a name list | ||
|} | |} | ||
− | |||
=== Tips and Tricks === | === Tips and Tricks === | ||
− | Our make.xml includes all packages | + | Our make.xml includes all packages that start with specific patterns: |
<source lang="xml"> | <source lang="xml"> | ||
<patternset id='patterns.bundle.all'> | <patternset id='patterns.bundle.all'> | ||
− | + | ... | |
− | + | ||
− | + | ||
− | + | ||
<include name="org.*" /> | <include name="org.*" /> | ||
+ | ... | ||
</patternset> | </patternset> | ||
</source> | </source> | ||
Line 171: | Line 174: | ||
'''Exclude bundles from build''' | '''Exclude bundles from build''' | ||
− | To | + | To exclude a bundle (core or test) from build you have to include your bundle in the '''patterns.bundle.excludes'''-section. |
<source lang="xml"> | <source lang="xml"> | ||
<!-- the follwoing projects are excluded from build --> | <!-- the follwoing projects are excluded from build --> | ||
<patternset id='patterns.bundle.excludes'> | <patternset id='patterns.bundle.excludes'> | ||
− | + | <exclude name="*.feature" /> | |
− | <exclude name=" | + | |
− | + | ||
</patternset> | </patternset> | ||
</source> | </source> | ||
Line 183: | Line 184: | ||
'''Don´t execute a test''' | '''Don´t execute a test''' | ||
− | To don´t execute a test you have to include your test bundle in the '''bundle.dirs.all.test | + | To don´t execute a test you have to include your test bundle in the '''bundle.dirs.all.test'''-section. |
<source lang="xml"> | <source lang="xml"> | ||
Line 192: | Line 193: | ||
<rsel:or> | <rsel:or> | ||
... | ... | ||
− | <rsel:name name="org.eclipse. | + | <rsel:name name="org.eclipse.smila.test" /> |
... | ... | ||
</rsel:or> | </rsel:or> |
Latest revision as of 10:12, 8 April 2013
Overview of ant build targets
Build process graph
make.xml
Targets | ||
name | description | dependencies |
all | executes all dependencies, default build target | clean, fetch, build, build-jmxclient, final-application, test |
clean | deletes the build directory (smila.build) and the workspace folder under SMILA.builder | / |
fetch | copies all features and plugins to the build directory | bundle.names.init |
bundle.names.init | white space delimited list of bundle names (i.e. their dir name) | / |
build | executes all dependencies | fetch, build.core |
build.core | builds the application (CI.SMILA not final-application) | / |
build-jmxclient | builds the jmxclient tool | / |
test | executes all dependencies | build, test.clean, test.core, report |
test.clean | executes all dependencies, deletes the eclipse-test dir under the build directory (eclipse.build) and unzips CI.SMILA | build.test.feature |
build.test.feature | builds the test feature | / |
test.core | executes all dependencies and starts all junit tests | bundle.names.init |
report | executes all dependencies | test.report, checkstyle, report.jacoco, pmd, pmd-cpd |
test.report | collects unit test results | / |
checkstyle | runs all checkstyle checks | / |
report.jacoco | creates jacoco report | / |
pmd | scans Java source code and looks for potential problems | / |
pmd-cpd | Runs pmd-cpd (potential duplication) check | / |
final-application | builds the final application | build, build-jmxclient |
test.clean2default | deletes workspace and configuration folder under eclipse-test and copies default config.in into configuration folder under eclipse-test | / |
all-without-test | executes all dependencies (builds the application but omits tests and reports) | clean,fetch,build,build-jmxclient,final-application |
Properties | |
name | description |
feature-names | list of all features |
Patternsets | |
name | description |
patterns.bundle.all | list of all plugins |
patterns.bundle.excludes | list of all exluded plugins |
Dirsets/Restrict | |
name | description |
bundle.dirs.all | list of all plugins (patterns.bundle.all - patterns.bundle.excludes) |
bundle.dirs.smila | list of all SMILA plugins (org.eclipse.smila.* - patterns.bundle.excludes) |
bundle.dirs.3rd | list of all 3rd party plugins (patterns.bundle.all - patterns.bundle.excludes - org.eclipse.smila.*) |
bundle.dirs.all.test | list of all test bundles |
bundle.dirs.smila.test | list of all SMILA test bundles |
bundle.dirs.3rd.test | list of all 3rd party test bundles |
macros.build.xml
name | description |
---|---|
M_test.bundle.smila | executes all tests in a bundle |
M_dirset2list | converts a dirset of plugins to a name list |
Tips and Tricks
Our make.xml includes all packages that start with specific patterns:
<patternset id='patterns.bundle.all'> ... <include name="org.*" /> ... </patternset>
Exclude bundles from build
To exclude a bundle (core or test) from build you have to include your bundle in the patterns.bundle.excludes-section.
<!-- the follwoing projects are excluded from build --> <patternset id='patterns.bundle.excludes'> <exclude name="*.feature" /> </patternset>
Don´t execute a test
To don´t execute a test you have to include your test bundle in the bundle.dirs.all.test-section.
<restrict id="bundle.dirs.all.test"> <dirset refid="bundle.dirs.all" /> <rsel:name name="*.test" /> <rsel:not> <rsel:or> ... <rsel:name name="org.eclipse.smila.test" /> ... </rsel:or> </rsel:not> </restrict>