Domanda

I recently made a project and I used CRUD in it. Now I created another project and wanted to use it as well, but it appears that when I import Crud now the Crud.java is already modified and looks the same way I left it after editing it in the first project. To simply put it, both projects use the same Crud (but obviously shouldn't). CRUD's folder is in fact outside the project directory, and both projects link to that same directory. Is there any way to "elegantly" make different CRUDs for different projects, or I have to copy the CRUD edited after the first project, and then cut it out and put a "fresh" one in the modules folder? I think the same applies to Security module.

È stato utile?

Soluzione

I think by the fact that you have "modified" the distributed crud module that comes packaged with Play!, you have essentially made a "new" module. If you made the change to the crud module because of a bug, you might want to log it.

I'm assuming you haven't made a change to the crud module because of a bug fix because otherwise you will have wanted the change in your second project too. In that case, you might want to take a copy of the crud module (the one in the Play distribution) and place it somewhere else in your hard drive (outside of the Play distribution and you may want to rename the module to something else to distinguish it from Play's actual crud distribution). Now for your first project that references this newly copied (and modified version of the crud module), you can refer to the local copy of this module in your dependencies.yml as described in this google group post.

It is probably best not to copy the modified crud module directly into your projects module folder because if you run this:

play dependencies --sync

the "copied + modified" version of the crud module will be deleted.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top