December 14, 2018 at 9:30 am #605017
I would like to create a project mixing angular and Java in a webapp. I know it’s possible to do with le Maven frontend-maven-plugin: https://github.com/eirslett/frontend-maven-plugin
But the plugin use a different structure of the project: the package.json file can’t be at the root of the project. How to change the package.json location with CodeMix ?
StefDecember 14, 2018 at 9:47 am #605019
CodeMix does not have any constraints for package.json location. Of course we do use a default one in our project wizards as those are mostly dedicated to web applications. It is possible to, e.g. put an angular app inside a frontend folder in your project.
If I miss something then please provide some more details about an exact scenario when CodeMix does not behave as expected.
Wojciech GalanciakDecember 14, 2018 at 4:22 pm #605033
What is the good practice if I want to import this project https://github.com/daggerok/frontend-maven-plugin-example/ ?
Finally I imported it with CodeMix. I imported it with “Maven existing projects” and after I imported “Angular project” selecting the folder with the package.json. Is it correct ? It’s strange for me to have 2 projects in my workspace when one project in inner the second project.
StefDecember 14, 2018 at 5:12 pm #605034
can you please provide a screen shot of your projects final structure after the import? We would like to see what is your scenario to provide you with the right directions.
Hugo Herrera.December 18, 2018 at 12:57 pm #605209
I did this video. You will see I can’t add the angular project of the Maven module because the OK button is disabled:
StefDecember 18, 2018 at 1:10 pm #605210
Sorry, I made a mistake during the video try to create the angular project when I wanted to import it. I will create another video.December 19, 2018 at 1:32 am #605325
Here, the video showing how I’m importing the angular project from the Maven module using frontend-maven-plugin. It’s working fine:
And now a video showing I can’t create an angular project inside the Maven module with CodeMix because the button is disabled.
StefDecember 19, 2018 at 4:28 am #605331
Thanks for the video.
I notice, in the second video, that you are trying to use the New>Angular Project wizard. This is why the Finish button was not available (the Angular project already exists). However, as the Angular project already exists, you should be using the Import wizard. Go to File>Import>Angular>Angular Project and then browse to, and select, the location of the existing source for the project, fill in the Node.js and Npm versions that you want to use and click Finish.
This will create a separate workspace project, so you will be able to see the source in both the new project and the original project. However it’s possible to configure the project explorer to see the Angular project in the parent project. Click the View Menu icon in the Project Explorer toolbar and then select “Filters and Customization”. In the
Filterstab, select the
Nested Projects: hide folders when project is shown as nestedoption. In the
Nested Projectsthen click OK. You should now see the project appearing as a separate node under
src\main, in the parent project and as a separate project in its own right.
Please let us know how you get on with this or if you have further questions.December 19, 2018 at 12:26 pm #605378
In the second video in my post #605325, I’m creating a new Angular project in the Maven module. The js folder is empty (i renamed the previous js to js.old). But CodeMix can’t enable the Finish button.
StefDecember 19, 2018 at 12:54 pm #605380
I double checked your video and replicated the issue at my end. It turns out there is indeed a bug in our logic for when selecting a non default location. I will raise a request for the dev team to work on this and I will let you know when a fix is available.
As a workaround, if you want to create a project at a non default location you can try this:
1. Create a new Angular project by using default location
2. Delete the project from the workspace using the project explorer view but do not remove files from disk.
3. Move the project to the desired location by using your system’s files explorer. (You might need to close Eclipse first as the directory might get locked)
4. Import it by using our import wizard
import > Angular Project.
Sorry for the inconveniences caused and thanks for reporting this issue!
Aaron LaraDecember 20, 2018 at 2:05 am #605474
I followed your workaround and it worked fine.
Thank you very much !
StefFebruary 15, 2019 at 4:41 am #608985
Our latest CodeMix 3 release is out and we have added support for creating Angular projects in a non default location. Please update and let us know if you see any issues.
How to use CodeMix and frontend-maven-plugin together ?
- This topic has 11 replies, 6 voices, and was last updated 3 years, 11 months ago by .
Viewing 12 posts - 1 through 12 (of 12 total)
Viewing 12 posts - 1 through 12 (of 12 total)