テンプレート処理中にエラーが発生しました。
Java method "com.liferay.portal.json.JSONFactoryImpl.createJSONObject(String)" threw an exception when invoked on com.liferay.portal.json.JSONFactoryImpl object "com.liferay.portal.json.JSONFactoryImpl@6b638fb3"; see cause exception in the Java stack trace.

----
FTL stack trace ("~" means nesting-related):
	- Failed at: navigationJSONObject = jsonFactoryUti...  [in template "8911408109993434201#23484949#LEARN-ARTICLE-NAV" at line 4, column 9]
----
1<#assign 
2	groupFriendlyURL = themeDisplay.getScopeGroup().getFriendlyURL() 
3	groupPathFriendlyURLPublic = themeDisplay.getPathFriendlyURLPublic() + groupFriendlyURL 
4	navigationJSONObject = jsonFactoryUtil.createJSONObject(navigation.getData()) 
5	navigationMenuItems = 
6
7			"Analytics Cloud": { 
8				"image": "/documents/d${groupFriendlyURL}/analytics_c-svg", 
9				"title": "Analytics Cloud", 
10				"url": "analytics-cloud" 
11			}, 
12			"Commerce": { 
13				"image": "/documents/d${groupFriendlyURL}/commerce_product-svg", 
14				"title": "Commerce", 
15				"url": "commerce" 
16			}, 
17			"DXP": { 
18				"image": "/documents/d${groupFriendlyURL}/dxp_p-svg", 
19				"title": "DXP / Portal", 
20				"url": "dxp" 
21			}, 
22			"Liferay Cloud": { 
23				"image": "/documents/d${groupFriendlyURL}/dxp_c-svg", 
24				"title": "Liferay Cloud", 
25				"url": "liferay-cloud" 
26			}, 
27			"Reference": { 
28				"image": "/documents/d${groupFriendlyURL}/reference-svg", 
29				"title": "Reference", 
30				"url": "reference" 
31
32
33 
34	breadcrumbJSONArray = navigationJSONObject.getJSONArray("breadcrumb") 
35	childrenJSONArray = navigationJSONObject.getJSONArray("children") 
36	parentJSONObject = navigationJSONObject.getJSONObject("parent") 
37	productJSONObject = breadcrumbJSONArray.getJSONObject(breadcrumbJSONArray.length()-1)!navigationJSONObject.getJSONObject("self") 
38	siblingsJSONArray = navigationJSONObject.getJSONArray("siblings") 
39/> 
40 
41<div class="learn-article-nav"> 
42	<#if productJSONObject?has_content && productJSONObject.getString("title")?has_content && navigationMenuItems[productJSONObject.getString("title")]?has_content && navigationMenuItems[productJSONObject.getString("title")].title?has_content> 
43		<div 
44			class="dropdown learn-article-nav-root learn-dropdown" 
45
46			<div class="learn-article-nav-item"> 
47				<div class="d-flex"> 
48					<div class="learn-article-nav-image"> 
49						<img 
50							class="lexicon-icon lexicon-icon-caret-bottom product-icon" 
51							role="presentation" 
52							src='${navigationMenuItems[productJSONObject.getString("title")].image}' 
53							viewBox="0 0 512 512" 
54						/> 
55					</div> 
56 
57					<span class="learn-article-nav-text">${navigationMenuItems[productJSONObject.getString("title")].title}</span> 
58				</div> 
59 
60				<div id="dropdown-icon"> 
61					<svg 
62						class="lexicon-icon lexicon-icon-caret-bottom" 
63						role="presentation" 
64						viewBox="0 0 512 512" 
65
66						<use xlink:href="/o/admin-theme/images/clay/icons.svg#caret-bottom"></use> 
67					</svg> 
68				</div> 
69			</div> 
70 
71			<ul class="dropdown-menu learn-dropdown-menu"> 
72				<#list navigationMenuItems as key, value> 
73					<li> 
74						<a 
75							class="dropdown-item learn-article-nav-item" 
76							href="/w/${navigationMenuItems[key].url}/index" 
77							tabindex="4" 
78
79							<span class="d-flex"> 
80								<span class="learn-article-nav-image"> 
81									<img 
82										class="lexicon-icon lexicon-icon-caret-bottom product-icon mt-0 mr-2" 
83										role="presentation" 
84										src="${value.image}"height: 25px; margin-left: 5px; max-width: none; width: 25px; 
85										viewBox="0 0 512 512" 
86									/> 
87								</span> 
88								<span class="learn-article-nav-text">${value.title}</span> 
89							</span> 
90 
91							<#if navigationMenuItems[productJSONObject.getString("title")].url == value.url> 
92								<span> 
93									<@clay["icon"] symbol="check" /> 
94								</span> 
95							</#if> 
96						</a> 
97					</li> 
98				</#list> 
99			</ul> 
100		</div> 
101	</#if> 
102 
103	<div class="learn-article-nav-content"> 
104		<#if parentJSONObject?has_content && parentJSONObject.getString("url")?has_content> 
105			<div class="learn-article-nav-item learn-article-nav-parent liferay-nav-item p-2"> 
106				<div class="mr-2"> 
107					<a 
108						href='${parentJSONObject.getString("url")}' 
109
110						<svg 
111							class="lexicon-icon lexicon-icon-angle-left" 
112							role="presentation" 
113							viewBox="0 0 512 512" 
114
115							<use xlink:href="/o/admin-theme/images/clay/icons.svg#angle-left"></use> 
116						</svg> 
117					</a> 
118				</div> 
119 
120				<span>${parentJSONObject.getString("title")}</span> 
121			</div> 
122		</#if> 
123 
124		<#if childrenJSONArray.length() gt 0> 
125			<ul class="m-0 p-2"> 
126				<#list 0..childrenJSONArray.length()-1 as i> 
127					<li class="learn-article-nav-item"> 
128						<a 
129							class='liferay-nav-item ${(navigationJSONObject.getJSONObject("self").url == childrenJSONArray.getJSONObject(i).url)?then("selected", "")}' 
130							href="${childrenJSONArray.getJSONObject(i).url}" 
131
132							<span>${childrenJSONArray.getJSONObject(i).getString("title")}</span> 
133						</a> 
134					</li> 
135				</#list> 
136			</ul> 
137		<#elseif siblingsJSONArray.length() gt 0> 
138			<ul class="m-0 p-2"> 
139				<#list 0..siblingsJSONArray.length()-1 as i> 
140					<li class="learn-article-nav-item"> 
141						<a 
142							class='liferay-nav-item ${(navigationJSONObject.getJSONObject("self").url == siblingsJSONArray.getJSONObject(i).url)?then("selected", "")}' 
143							href="${siblingsJSONArray.getJSONObject(i).url}" 
144
145							<span>${siblingsJSONArray.getJSONObject(i).getString("title")}</span> 
146						</a> 
147					</li> 
148				</#list> 
149			</ul> 
150		</#if> 
151	</div> 
152</div> 

Ignoring Files and Folders

Liferay Cloud allows subscribers to determine which files and folders should be ignored before deploying a service. This is done by creating a .lcpignore file and placed inside the top level of the project folder (for example: /etc/lfrlearn/ where lfrlearn is the project name). By placing the file here, the ignore rules can be shared with other users.

Using the .lcpignore File

  1. Navigate to the location of the project folder.
  2. Create a file called .lcpignore.
  3. Modify the file accordingly.
  4. Run lcp deploy on a terminal to deploy your service with the new .lcpignore rules.

LCP Ignore Patterns

The .lcpignore file uses globbing patterns to match against file names. (These are the same patterns used in a .gitignore file.) Administrators can construct such patterns using various symbols:

PatternExample matchesExplanation*
**/serviceservice/file.txt, or, service/monday/foo.bar, or build/service/file.txtPrepending a pattern with a double asterisk matches folders anywhere in the repository.
**/service/file.txtservice/file.txt; or build/service/file.txt but not service/build/file.txtUsing a double asterisk matches files based on their name and the name of their parent folder.
*.txtfile.txt, foo.txt, .txt, or, service/file.txtAn asterisk is a wildcard that matches zero or more characters.
*.txt or !important.txtfile.txt, trace.txt but not important.txt, service/important.txtPrepending an exclamation mark to a pattern negates it. If a file matches a pattern, but also matches a negating pattern defined later in the file, it will not be ignored.
*.txt or !important/*.txt or trace.*file.txt important/trace.txt but not important/file.txtPatterns defined after a negating pattern ignores any previously negated files.
/file.txtfile.txt, but not service/file.txtPrepending a slash matches files only in the repository root.
file.txtfile.txt, or service/file.txtBy default, patterns match files in any folder
file?.txtfileo.txt, files.txt but not file10.txtUsing a question mark matches exactly one character.
file[0-9].txtfile0.txt, file1.txt, but not file10.txtUsing square brackets matches a single character from a specified range.
file[01].txtfile0.txt, file1.txt, but not file2.txt nor file01.txtUsing square brackets matches a single character from the specified set.
file[!01].txtfile2.txt, but not file0.txt, nor file1.txt, nor file01.txtUsing an exclamation mark matches any character except one from the specified set.
file[a-z].txtfilea.txt, fileb.txt, but not file1.txtRanges can be numeric or alphabetic.
txtstxts, txt/file.txt, txts/latest/foo.bar, build/txts, build/txts/file.txtIf a slash is not appended, the pattern will match both files and the contents of folders with that name. In the example matches on the left, both folders and files named txts are ignored.
txts/txts/file.txt, txts/latest/foo.bar, build/txts/foo.bar, build/txts/latest/file.txtAppending a slash indicates the pattern is a folder. The entire contents of any folder in the repository matching that name – including all of its files and subfolders – will be ignored.
txts/**/file.txttxts/file.txt, txts/monday/file.txt, or txts/monday/pm/file.txtA double asterisk matches zero or more folders.
txts/*day/file.txttxts/monday/file.txt or txts/tuesday/file.txt, but not txts/latest/file.txtWildcards can be used in folder names as well.
txts/file.txttxts/file.txt, but not file.txt build/txts/file.txtPatterns specifying a file in a particular folder are relative to the repository root. Note that prepending a slash has no effect.

As best practice, keep the .lcpignore file in the top level folder of your project. If your repository has multiple .lcpignore files (not recommended), Liferay Cloud will read them as a unified document.

Note

If a file or folder has been deployed and administrators want to ignore it later, Liferay Cloud will not ignore the file if a subsequent rule tries to include that file or folder. Rather, that file or folder will not be updated.