- This topic has 10 replies, 3 voices, and was last updated 18 years, 11 months ago by
Riyad Kalla.
-
AuthorPosts
-
myeclipseuser1MemberHi,
I have a web application dependent on many jar files. I have them configured in my eclipse as dependent in java build path. But when I publish, it is deploying the dependent libraries also. Is there any way I can instruct myeclipse to deploy only restricted jar file not all.Thanks,
env: tomcat 5.5,myeclipse 4.0
Riyad KallaMemberMyEclipse User,
You can adjust the deployment rules under your Project Properties > MyEclipse-Web > Deployment. Note that you may need to adjust what *kind* of libraries your JARs are if you want some deploying and other’s not. For example, turn on deployment of User Libraries, but turn off External JAR Deployment, then change all your restricted JARs to External JARs.
myeclipseuser1MemberHi Riyad,
Thanks for the suggestion on jar file configuration. In my development environment on building the project the myeclipse generates the class files in WebProject\class directory.On deployment, it copies the files to tomcat webapps directory (due to that 2 copies of the same file exist in the system). Is there any way I can configure myeclipse to remember the deployment for debugging and don’t do deploy any files?
I tried to configure the debugging without deployment config(with tomcat context file point to webproject\ directory). But myeclipse could not recognize the jsp files when multiple files with same name exist in different subdirectories during debugging with break point.
Eg:
\jsp\dir1\success.jsp
\jsp\dir2\success.jspIf I put a break point in jsp file, it could not find the right file and at the break point it stops but it says “source file could not be found”. But it works with after adding deployment .
Could you provide some suggestion?
Thanks
Riyad KallaMemberOn deployment, it copies the files to tomcat webapps directory (due to that 2 copies of the same file exist in the system). Is there any way I can configure myeclipse to remember the deployment for debugging and don’t do deploy any files?
I tried to configure the debugging without deployment config(with tomcat context file point to webproject\ directory). But myeclipse could not recognize the jsp files when multiple files with same name exist in different subdirectories during debugging with break point.
Oh I see, yes just do not create a deployment. We don’t normally suggest people point Tomcat at your project directory like that, but if you want to, there is no need to create a deployment. Just run your app server and start setting break points.
Eg:
\jsp\dir1\success.jsp
\jsp\dir2\success.jspIf I put a break point in jsp file, it could not find the right file and at the break point it stops but it says “source file could not be found”. But it works with after adding deployment .
Very strange, if you point Tomcat back at your /webapps dir and DO create a deployment externally from your project, does it debug correctly? I think the problem above might be like you said, the duplication of files.
majecekMemberHi support-rkalla,
in your first post you suggest “turn off External JAR Deployment”
I cann’t find that. Can you give me advice where it is?Problem overview:
I have some jar files in dependent project, which I don’t want to be deployed, because there are already in jboss default lib folder. (actually I need them there) (If they are deployed it screem about duplication files
I think I have the same problem as myeclipseuser1 had. right?
I need to forbid 2 jar files but allow the rest to be deployed.
Can you help me with that?Thanks in advance
Riyad KallaMemberin your first post you suggest “turn off External JAR Deployment”
I cann’t find that. Can you give me advice where it is?
Open your project properties, go to MyEclipse-Web then the Deployment tab.
I have some jar files in dependent project, which I don’t want to be deployed, because there are already in jboss default lib folder. (actually I need them there) (If they are deployed it screem about duplication files
I think I have the same problem as myeclipseuser1 had. right?
I need to forbid 2 jar files but allow the rest to be deployed.
Can you help me with that?
The issue here is that MyEclipse doesn’t support explicit filtering of deployed resources yet so you need to sort of fudge this. What we do support is turning on/off the deployment of different kinds of JARs depending on where they are from: Your build path, User library, External JAR and so on. What I would suggest is removing the JARs that are already in JBoss from your project, then adding them to your project by using the “External JAR” functionality on your Java Build Path setup, and then go to the MyEclipse Deployment settings and be sure to turn off deployment of external JARs.
majecekMemberI got still problem.
I have found just half way solution for my problem (in a meantime you write your answer 🙂
My problem is more trickier than I thought.
I have 3 projects:
1. projectLib (where are my jar which I use in project)
2. projectWeb (Struts,…) and depend on projectLib
3. projectLogic (EJB,…) and depend on projectLibWhen I have done deploy for projectWeb the projectLib was deployed as well with all its jars. And i needed 2 jars not to be deployed.
Solution:
Create user library in projectLIb and put there those 2 jar files the rest jar files will be along (not in user library).
For projectWeb:
1. Properties of project (ALT + ENTER)
2. MyEclipse-Web -> Deployment
3. uncheck ‘Use workbench default settings’ and also uncheck the last option ‘User library jars exported by dependent Java project’
4. do deploy and the libraries in user-library will not be deployed.My Problem:
How can I do the same for EJB project? Firstly there is not such a option so it always deploy all jar files.
Can you help me out from this?Thanks
majecekMembersupport-rkalla
In your last post i understand everything except the last line
‘and then go to the MyEclipse Deployment settings and be sure to turn off deployment of external JARs.’
Where I turn off deployment of external JARs ?Mine MyEclipse doployment options looks same as this picture (taken from myeclipse doc.)
Riyad KallaMemberMy appologies, I referred to the setting by the wrong name. The setting I was referring to was the first one, the “Jars on the web project build path”. Uncheck that.
majecekMemberSorry to bother you again.
But can you look at my pre-previouse post 🙂Is there way to do it also for EJB projekt?
Thanks
Riyad KallaMemberYou are corect EJB projects do not support this level of deployment control yet.
-
AuthorPosts