Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failures when creating subfolder for artifactId that does not match the current folder name #193

Open
binduwavell opened this issue Apr 24, 2018 · 1 comment
Assignees
Labels

Comments

@binduwavell
Copy link
Owner

Tested with latest generator and yo and node 5.5.0

? Which SDK version would you like to use? 3.0.1
basic: The basic structure adds scripts and a folder to hold source amp project templates to the default All-In-One project structure. It
also adds few helpful files.
advanced: The advanced structure extends the basic structure by adding a customizations folder for grouping source modules. The
customizations folder also includes sub-folders for storing pre-built AMPs and JARs.
? Do you want to use the basic or advanced project structure? advanced
? Project groupId? com.customer
? Project artifactId? apimaging
WARN: The artifactId must match the name of the artifact folder. As such, we are going to create a sub-folder in the existing folder named:
"apimaging".
? Do you want to proceed? Yes
? Project version? 1.0.0-SNAPSHOT
? Project package? com.customer
? Would you like to use Community or Enterprise? Enterprise
? Should we remove the default source modules? Yes
INFO: Checking java version for sdk compatibility
INFO: Checking maven version for sdk compatibility
INFO: Attempting to use javascript and the 3.0.1 all-in-one archetype to setup your project.
events.js:154
throw er; // Unhandled 'error' event
^

TypeError: content.split is not a function
at Object.module.exports.filter (/usr/local/lib/node_modules/generator-alfresco/node_modules/generator-alfresco-common/lib/maven-archetype-file-filtering.js:25:25)
at /usr/local/lib/node_modules/generator-alfresco/node_modules/generator-alfresco-common/lib/maven-archetype-generate.js:263:44
at applyProcessingFunc (/usr/local/lib/node_modules/generator-alfresco/node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/copy.js:13:16)
at EditionInterface.exports.copy.options.store.each.exports._copySingle (/usr/local/lib/node_modules/generator-alfresco/node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/copy.js:63:16)
at /usr/local/lib/node_modules/generator-alfresco/node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/copy.js:50:10
at Array.forEach (native)
at EditionInterface.exports.copy.options.store.each.generateDestination [as copy] (/usr/local/lib/node_modules/generator-alfresco/node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/copy.js:49:9)
at copyPom (/usr/local/lib/node_modules/generator-alfresco/node_modules/generator-alfresco-common/lib/maven-archetype-generate.js:73:8)
at Object.module.generate (/usr/local/lib/node_modules/generator-alfresco/node_modules/generator-alfresco-common/lib/maven-archetype-generate.js:39:21)
at AlfrescoGenerator._writingGenerateArchetypeUsingJavaScript (/usr/local/lib/node_modules/generator-alfresco/generators/app/index.js:432:9)

This should have been covered by tests so need to sort those out and then obviously fix the issue.

WORKAROUND:

  • Create a folder named the same as your desired artifactId
  • Run yo alfresco inside that folder
@binduwavell binduwavell self-assigned this Apr 24, 2018
@michaeljmuller
Copy link

Workaround appears to have the same problem:

? Which SDK version would you like to use? 3.0.1
basic: The basic structure adds scripts and a folder to hold source amp project templates to the default All-In-One project structure. It
also adds few helpful files.
advanced: The advanced structure extends the basic structure by adding a customizations folder for grouping source modules. The
customizations folder also includes sub-folders for storing pre-built AMPs and JARs.
? Do you want to use the basic or advanced project structure? advanced
? Project groupId? com.REDACTED
? Project artifactId? apimaging
? Project version? 1.0.0-SNAPSHOT
? Project package? com.REDACTED
? Would you like to use Community or Enterprise? Enterprise
? Should we remove the default source modules? Yes
INFO: Checking java version for sdk compatibility
INFO: Checking maven version for sdk compatibility
INFO: Attempting to use javascript and the 3.0.1 all-in-one archetype to setup your project.
events.js:154
      throw er; // Unhandled 'error' event
      ^

TypeError: content.split is not a function
    at Object.module.exports.filter (/usr/local/lib/node_modules/generator-alfresco/node_modules/generator-alfresco-common/lib/maven-archetype-file-filtering.js:25:25)
    at /usr/local/lib/node_modules/generator-alfresco/node_modules/generator-alfresco-common/lib/maven-archetype-generate.js:263:44
    at applyProcessingFunc (/usr/local/lib/node_modules/generator-alfresco/node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/copy.js:13:16)
    at EditionInterface.exports.copy.options.store.each.exports._copySingle (/usr/local/lib/node_modules/generator-alfresco/node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/copy.js:63:16)
    at /usr/local/lib/node_modules/generator-alfresco/node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/copy.js:50:10
    at Array.forEach (native)
    at EditionInterface.exports.copy.options.store.each.generateDestination [as copy] (/usr/local/lib/node_modules/generator-alfresco/node_modules/yeoman-generator/node_modules/mem-fs-editor/lib/actions/copy.js:49:9)
    at copyPom (/usr/local/lib/node_modules/generator-alfresco/node_modules/generator-alfresco-common/lib/maven-archetype-generate.js:73:8)
    at Object.module.generate (/usr/local/lib/node_modules/generator-alfresco/node_modules/generator-alfresco-common/lib/maven-archetype-generate.js:39:21)
    at AlfrescoGenerator._writingGenerateArchetypeUsingJavaScript (/usr/local/lib/node_modules/generator-alfresco/generators/app/index.js:432:9)
mmuller-mac:apimaging mmuller$ pwd
/Users/mmuller/development/apimaging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants