holatuwol / liferay-intellij

Tool to build out IntelliJ workspace project for Liferay, originally designed as an introduction to streams concepts for Java developers.
52 stars 51 forks source link

Error running the tool in 7.0.x #6

Closed achaparro closed 5 years ago

achaparro commented 5 years ago

Hi @holatuwol,

First of all, thank you for the tool, it is really useful!

Right now I am having an issue running the tool in the 7.0.x branch:

[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: commons-cli:commons-cli:jar -> duplicate declaration of version 1.3.1 @ line 194, column 15
[ERROR] 'dependencies.dependency.version' for com.liferay:org.elasticsearch:jar must be a valid version but is '${elasticsearchVersion}.LIFERAY-PATCHED-1'. @ line 42, column 13
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: oro:oro:jar -> duplicate declaration of version 2.0.8 @ line 59, column 15
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.liferay:com.liferay.portal.search.elasticsearch:2.1.43 (/home/achaparro/code/7.0.x/modules/apps/foundation/portal-search/portal-search-elasticsearch/pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for com.liferay:org.elasticsearch:jar must be a valid version but is '${elasticsearchVersion}.LIFERAY-PATCHED-1'. @ line 42, column 13
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
Scanning /home/achaparro/code/7.0.x

Do you have any idea about what it is happening?

Thanks!

achaparro commented 5 years ago

Hi @holatuwol,

As a temporary workaround, I replace all uses of the variable: https://github.com/liferay/liferay-portal-ee/blob/7.0.x/modules/apps/foundation/portal-search/portal-search-elasticsearch/build.gradle#L1

Using directly the value instead.

holatuwol commented 5 years ago

@achaparro: My apologies! I wasn't checking the issues section for this project!

Someone reached out to me on Slack regarding this problem, and I resolved it with https://github.com/holatuwol/liferay-intellij/commit/393e9570810ab5ce1bb19ac3ef59b1fd2390b8e2

achaparro commented 5 years ago

No worries @holatuwol, thanks for the fix!