holatuwol / liferay-intellij Goto Github PK
View Code? Open in Web Editor NEWTool to build out IntelliJ workspace project for Liferay, originally designed as an introduction to streams concepts for Java developers.
Tool to build out IntelliJ workspace project for Liferay, originally designed as an introduction to streams concepts for Java developers.
Hi @holatuwol ,
I am finding errors when I try to build the portal project in current master, this is the output:
ij .
[09:32:10] Running npm to update script dependencies
audited 49 packages in 0.654s
found 2 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
[09:32:12] Building /Users/jose/code/portal ls-files cache to speed up directory scanning
[09:32:13] Building /Users/jose/code/portal ls-files cache to speed up directory scanning
[09:32:15] Missing clone of https://github.com/liferay/liferay-binaries-cache-2017
[09:32:15] Missing clone of https://github.com/liferay/liferay-binaries-cache-2020
[09:32:15] Retrieving dependency libraries using Maven
[9:32:15 AM] Scanning /Users/jose/code/portal ls-files cache for legacy plugins
[9:32:15 AM] Located 14 legacy plugins folders in /Users/jose/code/portal
[9:32:15 AM] Scanning /Users/jose/code/portal/modules ls-files cache for modules
[9:32:15 AM] Located 1492 modules folders in /Users/jose/code/portal
[9:32:15 AM] Extracting metadata from module build files
[9:32:17 AM] Extracting metadata from root level folder build files
[9:32:17 AM] Extracting metadata from legacy plugin build files
[9:32:17 AM] Checking for Git roots, Gradle caches, and Maven caches
[9:32:18 AM] Remembering 3351 artifacts found in .gradle/caches/modules-2/files-2.1
[9:32:18 AM] Remembering 253 artifacts found in /Users/jose/.gradle/caches/modules-2/files-2.1
[9:32:19 AM] Remembering 5483 artifacts found in /Users/jose/.m2/repository
[9:32:19 AM] Analyzing existing IntelliJ breakpoints
/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/traversal.js:22
exports.getName = function(elem){
^
RangeError: Maximum call stack size exceeded
at Object.exports.getName (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/traversal.js:22:27)
at tag (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/cheerio/node_modules/css-select/lib/general.js:21:11)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:87:6)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.257 s
[INFO] Finished at: 2019-10-29T09:32:20+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:go-offline (default-cli): Goal requires a project to execute but there is no POM in this directory (/Users/jose/code/portal). Please verify you invoked Maven from the correct directory. -> [Help 1]
[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/MissingProjectException
grep: pom.xml: No such file or directory
rm: pom.xml: No such file or directory
[9:32:25 AM] Scanning . ls-files cache for legacy plugins
[9:32:25 AM] Located 14 legacy plugins folders in .
[9:32:25 AM] Scanning modules ls-files cache for modules
[9:32:25 AM] Located 1492 modules folders in modules
[9:32:25 AM] Scanning /Users/jose/code/portal ls-files cache for legacy plugins
[9:32:25 AM] Located 14 legacy plugins folders in /Users/jose/code/portal
[9:32:25 AM] Scanning /Users/jose/code/portal/modules ls-files cache for modules
[9:32:25 AM] Located 1492 modules folders in /Users/jose/code/portal
[9:32:25 AM] Extracting metadata from module build files
[9:32:27 AM] Extracting metadata from root level folder build files
[9:32:27 AM] Extracting metadata from legacy plugin build files
[9:32:27 AM] Checking for Git roots, Gradle caches, and Maven caches
[9:32:28 AM] Remembering 3351 artifacts found in .gradle/caches/modules-2/files-2.1
[9:32:28 AM] Remembering 253 artifacts found in /Users/jose/.gradle/caches/modules-2/files-2.1
^C%
jose@xcmp [09:32:30] [~/code/portal] [master *]
-> % ij .
[09:33:06] Running npm to update script dependencies
audited 49 packages in 0.547s
found 2 high severity vulnerabilities
run `npm audit fix` to fix them, or `npm audit` for details
[09:33:07] Building /Users/jose/code/portal ls-files cache to speed up directory scanning
[09:33:08] Building /Users/jose/code/portal ls-files cache to speed up directory scanning
[09:33:10] Missing clone of https://github.com/liferay/liferay-binaries-cache-2017
[09:33:10] Missing clone of https://github.com/liferay/liferay-binaries-cache-2020
[09:33:10] Retrieving dependency libraries using Maven
[9:33:10 AM] Scanning /Users/jose/code/portal ls-files cache for legacy plugins
[9:33:10 AM] Located 14 legacy plugins folders in /Users/jose/code/portal
[9:33:10 AM] Scanning /Users/jose/code/portal/modules ls-files cache for modules
[9:33:10 AM] Located 1492 modules folders in /Users/jose/code/portal
[9:33:10 AM] Extracting metadata from module build files
[9:33:11 AM] Extracting metadata from root level folder build files
[9:33:11 AM] Extracting metadata from legacy plugin build files
[9:33:11 AM] Checking for Git roots, Gradle caches, and Maven caches
[9:33:12 AM] Remembering 3351 artifacts found in .gradle/caches/modules-2/files-2.1
[9:33:12 AM] Remembering 253 artifacts found in /Users/jose/.gradle/caches/modules-2/files-2.1
[9:33:12 AM] Remembering 5483 artifacts found in /Users/jose/.m2/repository
[9:33:12 AM] Analyzing existing IntelliJ breakpoints
/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/traversal.js:22
exports.getName = function(elem){
^
RangeError: Maximum call stack size exceeded
at Object.exports.getName (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/traversal.js:22:27)
at tag (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/cheerio/node_modules/css-select/lib/general.js:21:11)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:87:6)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.195 s
[INFO] Finished at: 2019-10-29T09:33:13+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:go-offline (default-cli): Goal requires a project to execute but there is no POM in this directory (/Users/jose/code/portal). Please verify you invoked Maven from the correct directory. -> [Help 1]
[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/MissingProjectException
grep: pom.xml: No such file or directory
rm: pom.xml: No such file or directory
[9:33:17 AM] Scanning . ls-files cache for legacy plugins
[9:33:17 AM] Located 14 legacy plugins folders in .
[9:33:17 AM] Scanning modules ls-files cache for modules
[9:33:17 AM] Located 1492 modules folders in modules
[9:33:17 AM] Scanning /Users/jose/code/portal ls-files cache for legacy plugins
[9:33:17 AM] Located 14 legacy plugins folders in /Users/jose/code/portal
[9:33:17 AM] Scanning /Users/jose/code/portal/modules ls-files cache for modules
[9:33:17 AM] Located 1492 modules folders in /Users/jose/code/portal
[9:33:17 AM] Extracting metadata from module build files
[9:33:19 AM] Extracting metadata from root level folder build files
[9:33:19 AM] Extracting metadata from legacy plugin build files
[9:33:19 AM] Checking for Git roots, Gradle caches, and Maven caches
[9:33:20 AM] Remembering 3351 artifacts found in .gradle/caches/modules-2/files-2.1
[9:33:20 AM] Remembering 253 artifacts found in /Users/jose/.gradle/caches/modules-2/files-2.1
[9:33:20 AM] Remembering 5483 artifacts found in /Users/jose/.m2/repository
[9:33:20 AM] Analyzing existing IntelliJ breakpoints
/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domelementtype/index.js:12
isTag: function(elem){
^
RangeError: Maximum call stack size exceeded
at isTag (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domelementtype/index.js:12:17)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:86:7)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
at findAll (/Users/jose/code/util/holatuwol/liferay-intellij/node_modules/domutils/lib/querying.js:90:27)
Hi Minhchau,
looks like io.netty:netty-codec-http2:4.1.0.Final
has 151920 entries inside.
Calling push.apply()
liferay-intellij/streams0/streams9.js
Line 354 in 6571ed0
╭╴ 10:58:33 (7.0.x) /opt/liferay.git/portal-7.0.x
╰╴ ij /opt/liferay.git/portal-7.0.x-private/
Running npm/yarn to update script dependencies
npm WARN package.json liferay-intellij@1.0.0 No repository field.
Scanning /opt/liferay.git/portal-7.0.x-private/
Scanning /opt/liferay.git/portal-7.0.x
Processing dependency versions
Processing dependency artifacts
Generating IntelliJ workspace
events.js:141
throw er; // Unhandled 'error' event
^
RangeError: Maximum call stack size exceeded
at getLibraryTableXML (/opt/liferay-intellij.git/streams0/streams9.js:354:24)
at getLibraryXML (/opt/liferay-intellij.git/streams0/streams9.js:384:12)
at /opt/liferay-intellij.git/node_modules/highland/lib/index.js:1714:25
at Stream.s._send (/opt/liferay-intellij.git/node_modules/highland/lib/index.js:1285:9)
at Stream.write (/opt/liferay-intellij.git/node_modules/highland/lib/index.js:1375:18)
at Stream._send (/opt/liferay-intellij.git/node_modules/highland/lib/index.js:761:26)
at push (/opt/liferay-intellij.git/node_modules/highland/lib/index.js:1250:19)
at /opt/liferay-intellij.git/node_modules/highland/lib/index.js:1719:13
at Stream.s._send (/opt/liferay-intellij.git/node_modules/highland/lib/index.js:1285:9)
at Stream.write (/opt/liferay-intellij.git/node_modules/highland/lib/index.js:1375:18)
I looked into what it contains and there are many duplicates inside binaryPaths
variable.
Hey @holatuwol ,
Thanks for continously improving this project, it saves a lot of time for us :) I've found a problem with the recent version of the tool, could you please check what goes wrong on Windows? :/
Using the latest HEAD (42ba5e5) stops adding modules
module group in the workspace for liferay portal thus many modules are missing.
Everything works fine with (79157a3)
I use the script this way https://github.com/holatuwol/liferay-intellij#id6 to have both the portal and the commerce artifacts in one workspace.
OS: Win10 with Gitbash
zolta@Dev-E6540 MINGW64 /d/GitHub/liferay-portal ((7.1.0-ga1))
$ ij /d/GitHub/com-liferay-commerce /d/GitHub/com-liferay-commerce-private/
Hi Minhchau,
The problem lies here:
liferay-intellij/streams9/streams9.js
Line 506 in 4bcdbcd
The tool expects 7.0.x-private branch to be fresh fetched (up-to-date with upstream) which is not the case for 7.2.x-private and 7.1.x-private branches. I guess there's a reason the tool doesn't read the file directly from the disk?
Thanks.
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!
EDIT : actually I probably ran it wrong
[11:15:37] Processing BOM dependencies
events.js:183
throw er; // Unhandled 'error' event
^
TypeError: Path must be a string. Received undefined
at assertPath (path.js:28:11)
at Object.dirname (path.js:728:5)
at gatherMavenBomDependencies (C:\Users\liferay\Desktop\liferay-intellij\streams0\streams0.js:644:47)
at gatherMavenBomDependencies (C:\Users\liferay\Desktop\liferay-intellij\streams0\streams0.js:655:2)
at C:\Users\liferay\Desktop\liferay-intellij\streams0\node_modules\highland\lib\index.js:1750:9
at C:\Users\liferay\Desktop\liferay-intellij\streams0\node_modules\highland\lib\index.js:1714:25
at Stream.s._send (C:\Users\liferay\Desktop\liferay-intellij\streams0\node_modules\highland\lib\index.js:1285:9)
at Stream.write (C:\Users\liferay\Desktop\liferay-intellij\streams0\node_modules\highland\lib\index.js:1375:18)
at Stream._send (C:\Users\liferay\Desktop\liferay-intellij\streams0\node_modules\highland\lib\index.js:761:26)
at Stream._readFromBuffer (C:\Users\liferay\Desktop\liferay-intellij\streams0\node_modules\highland\lib\index.js:8
96:18)
Works successfully without 393e957
liferay-intellij/streams0/streams0.js
Line 644 in 79012d4
Hi!
We are getting this error:
[ERROR] The build could not read 3 projects -> [Help 1]
[ERROR]
[ERROR] The project com.liferay:@webassemblyjs/helper-module-context:1.5.13 (/Users/alejandrotardin/Projects/liferay-ce/liferay-portal/modules/apps/frontend-js/frontend-js-web/node_modules/@webassemblyjs/helper-module-context/pom.xml) has 1 error
[ERROR] 'artifactId' with value '@webassemblyjs/helper-module-context' does not match a valid id pattern. @ line 5, column 14
[ERROR]
[ERROR] The project com.liferay:@webassemblyjs/ieee754:1.5.13 (/Users/alejandrotardin/Projects/liferay-ce/liferay-portal/modules/apps/frontend-js/frontend-js-web/node_modules/@webassemblyjs/ieee754/pom.xml) has 1 error
[ERROR] 'artifactId' with value '@webassemblyjs/ieee754' does not match a valid id pattern. @ line 5, column 14
[ERROR]
[ERROR] The project com.liferay:@webassemblyjs/utf8:1.5.13 (/Users/alejandrotardin/Projects/liferay-ce/liferay-portal/modules/apps/frontend-js/frontend-js-web/node_modules/@webassemblyjs/utf8/pom.xml) has 1 error
[ERROR] 'artifactId' with value '@webassemblyjs/utf8' does not match a valid id pattern. @ line 5, column 14
[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
When running ij
in the root folder of liferay-portal/master. Everything seems to work fine though.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.