jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.56k stars 4.02k forks source link

how to use import jdl and blueprint together #8610

Closed aman048 closed 5 years ago

aman048 commented 6 years ago

like: jhipster --blueprint my-generators import-jdl test.jdl

deepu105 commented 6 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

deepu105 commented 6 years ago

Actually, this also needs to be supported by jhipster-core in order to be complete

brunnels commented 6 years ago

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.

MathieuAA commented 5 years ago

Since the blueprint option is available in a JDL application, can this be closed?

murdos commented 5 years ago

@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.

murdos commented 5 years ago

Already works fine according to my tests.

yelhouti commented 5 years ago

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

murdos commented 5 years ago

@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.

yelhouti commented 5 years ago

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
Ebsan commented 4 years ago

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?

MathieuAA commented 4 years ago

@WiteCastle Hello there. The blueprints option is yet to be implemented in the JDL.

Ebsan commented 4 years ago

@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).

MathieuAA commented 4 years ago

This is an old issue, don't worry. Head to the JCore repo instead, you'll find what you need.

deepu105 commented 4 years ago

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 .

62mkv commented 4 years ago

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

MathieuAA commented 4 years ago

I'll close the issue as this is implemented.