How do I get Netbeans to add javamail.providers
into the META-INF folder (which I manually added) without getting into the weeds in the ant build file?
It's kinda odd, because manifest.mf ends up in the META-INF folder in the resulting jar (correctly) but resides outsid the META-INF folder (which I manually added):
thufir@dur:~/NetBeansProjects/gnumail-providers$
thufir@dur:~/NetBeansProjects/gnumail-providers$ ll META-INF/
total 12
drwxrwxr-x 2 thufir thufir 4096 Mar 21 04:02 ./
drwxr-xr-x 8 thufir thufir 4096 Mar 21 04:15 ../
-rw-rw-r-- 1 thufir thufir 868 Mar 21 04:02 javamail.providers
thufir@dur:~/NetBeansProjects/gnumail-providers$
thufir@dur:~/NetBeansProjects/gnumail-providers$ ll manifest.mf
-rw-rw-r-- 1 thufir thufir 82 Mar 21 03:18 manifest.mf
thufir@dur:~/NetBeansProjects/gnumail-providers$
Here is the project:
thufir@dur:~/NetBeansProjects/gnumail-providers$
thufir@dur:~/NetBeansProjects/gnumail-providers$ tree -L 2
.
├── build
│ ├── built-jar.properties
│ ├── classes
│ ├── empty
│ └── generated-sources
├── build.xml
├── dist
│ ├── gnu
│ ├── gnumail-providers.jar
│ ├── META-INF
│ ├── net
│ ├── providers
│ ├── treeutil
│ └── usenet.properties
├── javamail.providers
├── manifest.mf
├── META-INF
│ └── javamail.providers
├── nbproject
│ ├── build-impl.xml
│ ├── genfiles.properties
│ ├── private
│ ├── project.properties
│ └── project.xml
└── src
├── gnu
├── net
├── providers
├── treeutil
└── usenet.properties
18 directories, 12 files
thufir@dur:~/NetBeansProjects/gnumail-providers$
And here is the resulting JAR which Netbeans builds:
thufir@dur:~/NetBeansProjects/gnumail-providers/dist$
thufir@dur:~/NetBeansProjects/gnumail-providers/dist$ ll
total 228
drwxrwxr-x 3 thufir thufir 4096 Mar 21 04:15 ./
drwxr-xr-x 8 thufir thufir 4096 Mar 21 04:15 ../
-rw-rw-r-- 1 thufir thufir 213021 Mar 21 04:15 gnumail-providers.jar
drwxrwxr-x 2 thufir thufir 4096 Mar 21 04:15 lib/
-rw-rw-r-- 1 thufir thufir 1332 Mar 21 04:15 README.TXT
thufir@dur:~/NetBeansProjects/gnumail-providers/dist$
thufir@dur:~/NetBeansProjects/gnumail-providers/dist$ jar -xf gnumail-providers.jar
thufir@dur:~/NetBeansProjects/gnumail-providers/dist$
thufir@dur:~/NetBeansProjects/gnumail-providers/dist$ ll
total 252
drwxrwxr-x 8 thufir thufir 4096 Mar 21 04:15 ./
drwxr-xr-x 8 thufir thufir 4096 Mar 21 04:15 ../
drwxrwxr-x 3 thufir thufir 4096 Mar 21 04:15 gnu/
-rw-rw-r-- 1 thufir thufir 213021 Mar 21 04:15 gnumail-providers.jar
drwxrwxr-x 2 thufir thufir 4096 Mar 21 04:15 lib/
drwxrwxr-x 2 thufir thufir 4096 Mar 21 04:15 META-INF/
drwxrwxr-x 3 thufir thufir 4096 Mar 21 04:15 net/
drwxrwxr-x 9 thufir thufir 4096 Mar 21 04:15 providers/
-rw-rw-r-- 1 thufir thufir 1332 Mar 21 04:15 README.TXT
drwxrwxr-x 2 thufir thufir 4096 Mar 21 04:15 treeutil/
-rw-rw-r-- 1 thufir thufir 70 Mar 21 04:15 usenet.properties
thufir@dur:~/NetBeansProjects/gnumail-providers/dist$
thufir@dur:~/NetBeansProjects/gnumail-providers/dist$ ll META-INF/
total 12
drwxrwxr-x 2 thufir thufir 4096 Mar 21 04:15 ./
drwxrwxr-x 8 thufir thufir 4096 Mar 21 04:15 ../
-rw-rw-r-- 1 thufir thufir 339 Mar 21 04:15 MANIFEST.MF
thufir@dur:~/NetBeansProjects/gnumail-providers/dist$
This is in response to GNU packaging suggestion.
See also:
http://article.gmane.org/gmane.comp.java.netbeans.user/176994
right click on project/select Properties. in the Source nod:click add Folder. in the build node,the web node,select META-INF ==>click ok