External Library
Identifier:
org.eclipse.mtj.core.externallibrary
Since:
1.0
Description:
Define the concept of an external library that can be included in a MIDlet project.
A
MIDlet Suite Project will be able to select the different libraries that it wants to use and those libraries will be automatically depployed in the final application bundle.
Configuration Markup:
<!ELEMENT extension (
library+)+>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED
>
<!ELEMENT library (
ClasspathEntry+ ,
License ,
Security?)>
<!ATTLIST library
name CDATA #REQUIRED
version CDATA #REQUIRED
description CDATA #IMPLIED
visibility (PUBLIC|INTERNAL)
>
-
name - The library name
-
version - Version identifier for the library.
Version identifiers have four components.
- Major version. A non-negative integer.
- Minor version. A non-negative integer.
- Micro version. A non-negative integer.
- Qualifier.
Here is the grammar for version strings.
version ::= major('.'minor('.'micro('.'qualifier)?)?)?
major ::= digit+
minor ::= digit+
micro ::= digit+
qualifier ::= (alpha|digit|'_'|'-')+
digit ::= [0..9]
alpha ::= [a..zA..Z]
There must be no whitespace in version.
For more information see org.osgi.framework.Version
-
description - The description for the library.
-
visibility -
<!ELEMENT ClasspathEntry (
AccessRule)*>
<!ATTLIST ClasspathEntry
jarFile CDATA #REQUIRED
javadocPath CDATA #IMPLIED
srcPath CDATA #IMPLIED
>
-
jarFile - The absolute path of the binary archive.
-
javadocPath - The javadoc location.
-
srcPath - Path to the source archive or folder associated with this classpath entry
<!ELEMENT AccessRule EMPTY>
<!ATTLIST AccessRule
kind (ACCESSIBLE|NON_ACCESSIBLE|DISCOURAGED)
pattern CDATA #REQUIRED
>
Describes an access rule to source and class files on a classpath entry.
An access rule is composed of a file pattern and a kind (accessible, non accessible, or discouraged).
See org.eclipse.jdt.core.IAccessRule
for more information about access rules.
-
kind - An access rule kind (accessible, non accessible, or discouraged).
ACCESSIBLE
: indicates that files matching the rule's pattern are accessible.
NON_ACCESSIBLE
: indicates that files matching the rule's pattern are non accessible.
DISCOURAGED
: indicates that access to the files matching the rule's pattern is discouraged.
-
pattern - An access rule file pattern.
Files patterns look like relative file paths with wildcards and are interpreted relative
to each entry's path. File patterns are case-sensitive and they can contain '**', '*' or '?' wildcards (see org.eclipse.jdt.core.IClasspathEntry#getExclusionPatterns()
for the full description of their syntax and semantics).
Note that file patterns must not include the file extension. com/xyz/tests/MyClass
is a valid file pattern, whereas com/xyz/tests/MyClass.class
is not valid.
For example, if one of the entry path is /Project/someLib.jar
,
there are no accessible rules, and there is one non accessible rule whith pattern
com/xyz/tests/**
, then class files
like /Project/someLib.jar/com/xyz/Foo.class
and /Project/someLib.jar/com/xyz/utils/Bar.class
would be accessible,
whereas /Project/someLib.jar/com/xyz/tests/T1.class
and /Project/someLib.jar/com/xyz/tests/quick/T2.class
would not be
accessible.
<!ELEMENT License EMPTY>
<!ATTLIST License
name CDATA #REQUIRED
url CDATA #REQUIRED
>
Licensing information
-
name - The license name
-
url - An valid URL to the license especification.
<!ELEMENT Security EMPTY>
<!ATTLIST Security
ProtectionDomain (MANUFACTURER|OPERATOR|THIRD_PARTY|UNTRUSTED)
Premissions CDATA #IMPLIED
>
Examples:
Example of a declaration of a
externallibrary
named "Sample library":
<extension
point=
"org.eclipse.mtj.core.externallibrary"
>
<library
description=
"This sample library has no actual use and was created to demonstrate the use of org.eclipse.mtj.core.library.externallibrary Extension Point available in org.eclipse.mtj.core.library Plug-in."
name=
"Sample library"
version=
"1.0.0"
visibility=
"PUBLIC"
>
<ClasspathEntry
jarFile=
"lib/SampleLibrary.jar"
javadocPath=
"doc/api/"
srcPath=
"lib_src/"
>
<AccessRule
kind=
"NON_ACCESSIBLE"
pattern=
"org/eclipse/mtj/example/library/internal/NonAccessibleLibraryClass"
>
</AccessRule>
<AccessRule
kind=
"DISCOURAGED"
pattern=
"org/eclipse/mtj/example/library/DiscouragedAccessLibraryClass"
>
</AccessRule>
<AccessRule
kind=
"ACCESSIBLE"
pattern=
"org/eclipse/mtj/example/library/AccessibleLibraryClass"
>
</AccessRule>
</ClasspathEntry>
<License
name=
"Eclipse Public License - v 1.0"
url=
"https://www.eclipse.org/legal/epl-v10.html"
>
</License>
<Security
Premissions=
"org.eclipse.mtj.example.library.permission.read,org.eclipse.mtj.example.library.permission.write"
ProtectionDomain=
"UNTRUSTED"
>
</Security>
</library>
</extension>
Supplied Implementation:
The MTJ itself does not have any public predefined
externallibrary
.
Copyright (c) 2008, 2009 Motorola.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v10.html