Include META-INF resources in a javadoc jar in gradle -


i have gradle project , create regular classes jar, , javadoc , sources jar.

in 3 need include meta-inf folder includes license , notice file.

i have folder files under src/main/resources/

the classes jar , sources jar work correctly need them added javadoc jar.

how can fix javadocjar task include meta-inf folder?

// custom tasks creating source/javadoc jars task sourcesjar(type: jar, dependson:classes) {     classifier = 'sources'     sourcesets.main.allsource }  task javadocjar(type: jar, dependson:javadoc) {     classifier = 'javadoc'     javadoc.destinationdir }  // add javadoc/source jar tasks artifacts artifacts {     archives sourcesjar     archives javadocjar } 

i did needed adding copy task if select meta-inf directory in case add more directories under resources.

// custom tasks creating source/javadoc jars task sourcesjar(type: jar, dependson:classes) {     classifier = 'sources'     sourcesets.main.allsource }  task copyresources(type: copy, dependson:javadoc) {     javadoc.destinationdir     sourcesets.main.resources }  task javadocjar(type: jar, dependson:copyresources) {     classifier = 'javadoc'     javadoc.destinationdir } 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -