掲示板

Error when trying to use ant

8年前 に Alex Scotland によって更新されました。

Error when trying to use ant

New Member 投稿: 22 参加年月日: 15/07/10 最新の投稿
When trying to run ant, I get this error:

[javac] 1. ERROR in /opt/liferay-plugins-sdk-6.2/webs/resources-importer-web/docroot/WEB-INF/src/com/liferay/resourcesimporter/util/PluginPackageProperties.java (at line 18)
[javac] import com.liferay.portal.kernel.util.PortalRunMode;
[javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] The import com.liferay.portal.kernel.util.PortalRunMode cannot be resolved
[javac] ----------
[javac] 2. ERROR in /opt/liferay-plugins-sdk-6.2/webs/resources-importer-web/docroot/WEB-INF/src/com/liferay/resourcesimporter/util/PluginPackageProperties.java (at line 84)
[javac] PortalRunMode.isTestMode();
[javac] ^^^^^^^^^^^^^
[javac] PortalRunMode cannot be resolved
[javac] ----------
[javac] 2 problems (2 errors)
[antcall] Exiting /opt/liferay-plugins-sdk-6.2/build.xml.

We went and found the folders com and liferay, but the folder "portal" is missing.
Any idea of why we are getting this error? are we missing something crucial for this to work?
thumbnail
8年前 に David H Nebinger によって更新されました。

RE: Error when trying to use ant

Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
Have you created your build.<username>.properties file and point it at a valid Liferay bundle?
8年前 に Alex Scotland によって更新されました。

RE: Error when trying to use ant

New Member 投稿: 22 参加年月日: 15/07/10 最新の投稿
I have indeed
thumbnail
8年前 に Amos Fong によって更新されました。

RE: Error when trying to use ant

Liferay Legend 投稿: 2047 参加年月日: 08/10/07 最新の投稿
Looks like that class is should be in /shared/portal-compat-shared which all plugins should depend on. Can verify that's been compiled when you compile resource-importer?
thumbnail
6年前 に Bijan Vakili によって更新されました。

RE: Error when trying to use ant

Expert 投稿: 375 参加年月日: 09/03/10 最新の投稿
The issue's still here in SDK; more specific, 6.2 GA6; since PortalRunMode was not in that tag; and was introduced with version 7:
https://github.com/liferay/liferay-portal/commit/7f5a2d786744d823c49e1d3a9da3b34c6df62d38

git tag --contains 7f5a2d786744d823c49e1d3a9da3b34c6df62d38
7.0.0-a1
7.0.0-a2
7.0.0-a3
7.0.0-a4
7.0.0-a5
7.0.0-b1
7.0.0-b2
7.0.0-b3
7.0.0-b4
7.0.0-b5
7.0.0-b6
7.0.0-b7
7.0.0-ga1
7.0.0-m1
7.0.0-m2
7.0.0-m3
7.0.0-m4
7.0.0-m5
7.0.0-m6
7.0.0-m7
7.0.1-ga2
7.0.2-ga3
sync-3.0.0-b1
sync-3.0.1-b2
sync-3.0.10-ga2
sync-3.0.2-b3
sync-3.0.3-b4
sync-3.0.4-b5
sync-3.0.5-b6
sync-3.0.6-b7
sync-3.0.7-b8
sync-3.0.8-b9
sync-3.0.9-ga1
sync-3.1.0-ga1


Workaround is to just compile this class; and add to classpath as workaround.
Or otherwise update following file:
plugins/webs/resources-importer-web/docroot/WEB-INF/src/com/liferay/resourcesimporter/util/PluginPackageProperties.java
To remove all references to it.