Closed aman048 closed 5 years ago
Its just about passing the blueprint value to sub generators. I'm not sure if it's already done, else I'll do it soon
Actually, this also needs to be supported by jhipster-core in order to be complete
this works as is if the blueprint is already defined in the .yo-rc.json like so:
"blueprint": "generator-jhipster-mine"
then you just call import-jdl like normal without the --blueprint parameter.
Since the blueprint option is available in a JDL application, can this be closed?
@MathieuAA The blueprint option is indeed available, but I don't think it is used. I'll check it later: this ticket is on my TODO list. But I want to work first on another unrelated issue: make sure the upgrade subgenerator behaves as intended when a blueprint is involved.
Already works fine according to my tests.
Sorry guys, but I having the same issue:
The problem happens in the generated index.js: This is a JHipster blueprint and should be used only like...
when trying to override entity-client
specifically.
the jhContext
is undefined.
Any idea on how to fix this please. Thanks
@MathieuAA @murdos
@yelhouti I can't help if you don't provide more information: JHipster version, extract of jdl and blueprint used, ... in order to reproduce the issue.
My bad: .yo-rc
{
"generator-jhipster": {
"promptValues": {
"packageName": "com.elhouti.jhipster.primeng",
"nativeLanguage": "en"
},
"jhipsterVersion": "5.8.1",
"applicationType": "monolith",
"baseName": "jhipster",
"packageName": "com.elhouti.jhipster.primeng",
"packageFolder": "com/elhouti/jhipster/primeng",
"serverPort": "8080",
"authenticationType": "session",
"cacheProvider": "ehcache",
"enableHibernateCache": true,
"websocket": false,
"databaseType": "sql",
"devDatabaseType": "h2Disk",
"prodDatabaseType": "mysql",
"searchEngine": false,
"messageBroker": false,
"serviceDiscoveryType": false,
"buildTool": "gradle",
"enableSwaggerCodegen": false,
"rememberMeKey": "bcb1139466575094fd1c1d5e6ed92729f45e85d751030361e84676761d6c0436190e23fafcd0a3c1d7085651121deae4f329",
"testFrameworks": [],
"jhiPrefix": "jhi",
"entitySuffix": "",
"dtoSuffix": "DTO",
"otherModules": [
{
"name": "generator-jhipster-primeng-blueprint",
"version": "0.0.0"
}
],
"enableTranslation": true,
"clientPackageManager": "npm",
"nativeLanguage": "en",
"languages": ["en", "fr"],
"blueprint": "generator-jhipster-primeng-blueprint",
"blueprintVersion": "0.0.0"
},
"generator-jhipster-primeng-blueprint": {
"jhipsterVersion": "5.8.1",
"applicationType": "monolith",
"baseName": "jhipster",
"clientFramework": "angularX",
"useSass": true,
"clientPackageManager": "npm",
"enableTranslation": true
}
}
jdl:
entity Task {
name String required
}
filter *
paginate * with pagination
Wait, so is there a blueprints option when configuring the application in the JDL? If so, is it just not in the docs? (https://www.jhipster.tech/jdl/applications).
Or do we have to have a valid .yo-rc file and then import a JDL for this to work? If so, what should teams that use JDLs solely for application creation do?
@WiteCastle Hello there. The blueprints
option is yet to be implemented in the JDL.
@MathieuAA Thanks for the response but quick question. Why is this issue closed? Are there plans to enable this feature as discussed earlier in the thread? Or are we waiting for a pull request? I can attempt to help with this (even with my beginner knowledge of yo generators).
This is an old issue, don't worry. Head to the JCore repo instead, you'll find what you need.
And if you wanna work on it you are welcome to do so and would be much appreciated :)
On Fri, 31 Jan 2020, 9:33 am Mathieu ABOU-AICHI, notifications@github.com wrote:
This is an old issue, don't worry. Head to the JCore repo instead, you'll find what you need.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jhipster/generator-jhipster/issues/8610?email_source=notifications&email_token=AAIOKF7ONXQNFE65DCURPOLRAPO5JA5CNFSM4F6AFMSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKN5E6Q#issuecomment-580637306, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIOKF7LQFQQJWDGAXJZRVDRAPO5JANCNFSM4F6AFMSA .
so, to summarize: a "blueprint" (singular) has been in JHipster JDL since v3.something
But for "blueprints" (plural) this is an open issue: https://github.com/jhipster/jhipster-core/issues/415
I'll close the issue as this is implemented.
like: jhipster --blueprint my-generators import-jdl test.jdl