I created an oracle jet project using ojet create, build, serve commands. Alternatively, I have also created the project using NetBeans 8.2 IDE. I am not able to add open layers as a library. I want to create a web application which would consist of maps.
Not sure why you are not able to add the library, as you haven't specified how you tried to add it and what was the error, if any.
This is what I would do:
ojet create
run the command npm install --save ol
. This adds the library in your node_modules folder and also adds it to your package.json. If you don't want to add it to your package.json use only npm install ol
. Navigate to scripts folder -> config folder -> oraclejet-build.js. See the commented lines 37 to 45? Uncomment those lines and add your own library paths, like this:
copyCustomLibsToStaging: {
fileList: [
{
cwd:'node_modules/ol/',
src: ['*'],
dest: 'web/js/libs/ol'
}
]
},