NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Excluding jar file from build

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
Neibaf



Joined: 18 Aug 2009
Posts: 3

PostPosted: Tue Aug 18, 2009 12:40 pm    Post subject: Excluding jar file from build Reply with quote

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.





PostPosted: Tue Aug 18, 2009 12:55 pm    Post subject: Excluding jar file from build Reply with quote

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

PostPosted: Tue Aug 18, 2009 2:38 pm    Post subject: Reply with quote

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.





PostPosted: Wed Aug 19, 2009 12:11 am    Post subject: Excluding jar file from build Reply with quote

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

PostPosted: Wed Aug 19, 2009 8:48 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
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 cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo