- This topic has 11 replies, 6 voices, and was last updated 20 years, 10 months ago by Riyad Kalla.
-
AuthorPosts
-
mrzeldMemberok. i have two web projects currenlty. i am wanting to create some objects that will be used by both of these projects. so i created a third project (plain java project). this third project will create a jar file that needs to be placed into the WEB-INF/lib directories of the two original web projects. how do i get this jar there using ME?
the web projects compile fine in eclipse (i set those projects to depend on the third project). but nothing is being put into the WEB-INF/lib or WEB-INF/classes directory on the web server for either web project. so the web apps don’t work when you access them on the web server.
thanks!
Bill WinspurMemberRight click on the WEB-INF/lib/ directory in the navigator pane and pick the import menu item.
Pick the filesystem source in the resulting import wizard and click next
Click the browse button
Use the import directory dialog to navigate to the directory that has your jar file and click OK
In the right hand pane, of the wizard check the box next to your jar file and clik finish.Your jar should be transferred to WEB-INF/lib/
mrzeldMemberthanks for the suggestion, but it doesn’t solve the problem. doing the import, copies the jar file to the WEB-INF/lib directory in eclipse. and that is it. if i make changes to the jar file then i have to re-import into all my webprojects? there has to be a better way to do this. i can’t be the only person that has wanted to do this.
i could create seperate jar desciptions in the java project and create each into the webapp’s lib directory (inside the tomcat folder) directly , but that isn’t pretty. or is it?
wattypMemberI have the same question…
Is there a way to auto build and link dependent utility jars in web projects, or is the tool deficient in this respect?
[yes] then this needs to be added to the feature list IMHO PDQ!
plus is there any type of workaround
[no] show us how to do it
regards,
Paul.
wattypMembermmm, got my no’s and yes’s the wrong way around 🙂
wattypMembersorry, ignore, just read another post indicating it will be an enhancement in 2.7
mrzeldMemberwattyp,
can you post the link to the other post?
wattypMemberhttps://www.genuitec.com/forums/topic/library-files-in-a-web-project-enhancement/
although, it doesn’t solve anything at the moment…
AFAIS there is also no way to create an utility project that creates an .jar archive as part of the build process automagically, or have I missed something? (apart from using the one shot export menu).
The list of tasks for each new build of an web project utility jar I see as:
1. (re)build utility project
2. manually export a jar to /WEB-INF/lib of all dependent projects
3. once only: add to build path within each of dependent projects this new jar
4. deploy web projects
Do you agree?
Paul.
mrzeldMemberi believe the “hard-to-swallow” solution to this is to edit the build.xml file yourself and make it happen. but for those of us less gifted in the art of ANT, it would be nice for such functionality to be included by ME in some way.
i have enough to learn right now, ANT isn’t up there on the list yet.
thanks
Scott AndersonParticipantWe’ll be adding support for dependent utility projects as part of 2.8. That will allow you to specify projects that should be packaged as jars when your application is deployed. I think this is what you’re after.
James I. FalekMember💡 One work-around (prior to ME 2.8 ) is to add the jars/class directories to the application server paths ( preferences>My Eclipse>Application Servers><<server>>paths ) . It is not pretty, but it may do the trick for you.
Riyad KallaMemberGSX thanks for the followup, I’m sure other users will find it helpful.
-
AuthorPosts