NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
Neibaf
Joined: 18 Aug 2009 Posts: 3
|
Posted: Tue Aug 18, 2009 12:40 pm Post subject: Excluding jar file from build |
|
|
Hi,
I'm new here and I had to exclude a Jar file from my build path.
I working on an existing web application which uses tomcat as application server.
In the tomcat lib directory there is a false .jar which is just a binary file.
So netbeans would like to open it during compilation and an error occurs because it's not a jar
I don't have right to modify or relocate the jar file so, can I tell to netbeans to ignore it in any way?
May be with the ant file or any property for my project ?
I've a poor skill with ant files
Cheers Neibaf |
|
| Back to top |
|
 |
michael Posted via mailing list.
|
Posted: Tue Aug 18, 2009 12:55 pm Post subject: Excluding jar file from build |
|
|
In the projects pane:
1. Right-click your project
2. go tp "properties..."
3. In the left tree, select the "Libraries" node
4. Uncheck the check box next to your library
5. Click "OK"
Done
Michael
-----Original Message-----
From: Neibaf [mailto:address-removed]
Sent: Tuesday, August 18, 2009 3:41 PM
To: address-removed
Subject: [nbj2ee] Excluding jar file from build
Hi,
I'm new here and I had to exclude a Jar file from my build path.
I working on an existing web application which uses tomcat as application server.
In the tomcat lib directory there is a false .jar which is just a binary file.
So netbeans would like to open it during compilation and an error occurs because it's not a jar
I don't have right to modify or relocate the jar file so, can I tell to netbeans to ignore it in any way?
May be with the ant file or any property for my project ?
I've a poor skill with ant files
Cheers Neibaf |
|
| Back to top |
|
 |
Neibaf
Joined: 18 Aug 2009 Posts: 3
|
Posted: Tue Aug 18, 2009 2:38 pm Post subject: |
|
|
Thank you but i'm sorry,
I don't have any Library in the Libraries node (in the property frame).
In my project I have all libraries from java and tomcat/lib folder.
The bad library is not displayed when I expend the "tomcat" node, and it says that it can't open it. |
|
| Back to top |
|
 |
Melongo Annabel Posted via mailing list.
|
Posted: Wed Aug 19, 2009 12:11 am Post subject: Excluding jar file from build |
|
|
I would recommend you use an ant task that would exclude the "bad library" at deploy time. Something like:
<target name="deploy" depends="" description="deploy application">
<copy todir="${deploy.path}" preservelastmodified="true">
<fileset dir=".">
<exclude name="badlibrary.jar"/> // this is where you put the bad library. You can't use many lines of this or you can also use wild characters.
</fileset>
</copy>
</target>
From: Neibaf <address-removed>
To: address-removed
Sent: Tuesday, August 18, 2009 9:38:13 AM
Subject: [nbj2ee] Excluding jar file from build
Thank you but i'm sorry,
I don't have any Library in the Libraries node (in the property frame).
In my project I have all libraries from java and tomcat/lib folder.
The bad library is not displayed when I expend the "tomcat" node, and it says that it can't open it. |
|
| Back to top |
|
 |
Neibaf
Joined: 18 Aug 2009 Posts: 3
|
Posted: Wed Aug 19, 2009 8:48 am Post subject: |
|
|
I've found another solution... but it's dirty.
In the private.properties file in j2ee.platform.classpath property my bad library file appears. I delete it but sometimes it re-appears.
Your solution seems working and it's a clean solution.
Regards,
Neibaf |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|