Fórumok

Error when trying to use ant

Alex Scotland, módosítva 8 év-val korábban

Error when trying to use ant

New Member Bejegyzések: 22 Csatlakozás dátuma: 2015.07.10. Legújabb bejegyzések
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
David H Nebinger, módosítva 8 év-val korábban

RE: Error when trying to use ant

Liferay Legend Bejegyzések: 14915 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Have you created your build.<username>.properties file and point it at a valid Liferay bundle?
Alex Scotland, módosítva 8 év-val korábban

RE: Error when trying to use ant

New Member Bejegyzések: 22 Csatlakozás dátuma: 2015.07.10. Legújabb bejegyzések
I have indeed
thumbnail
Amos Fong, módosítva 8 év-val korábban

RE: Error when trying to use ant

Liferay Legend Bejegyzések: 2047 Csatlakozás dátuma: 2008.10.07. Legújabb bejegyzések
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
Bijan Vakili, módosítva 6 év-val korábban

RE: Error when trying to use ant

Expert Bejegyzések: 375 Csatlakozás dátuma: 2009.03.10. Legújabb bejegyzések
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.