- This topic has 7 replies, 2 voices, and was last updated 12 years, 9 months ago by support-tony.
-
AuthorPosts
-
maiconramonesParticipantHi guys I’m here again…
I have two projects in my workspace. One project is a jar and other is a war.
So the war project depends on jar. But when “Enable Workspace Resolution” is activated the MyEclipse doesn’t export the project as jar (or other form) into Glassfish (3.1.1).
The Glasssfish doesn’t found any class (of jar project) and my web app not was deployed.
The “Enable Worskpace Resolution” is necessary for hot deploy.
Any Idea?
support-tonyKeymastermaiconramones,
When deploying to servers using normal MyEclipse deployment functions, maven isn’t used. Maven functions are only used when building with Maven (such as Run As->Maven Build…) The deployment of dependencies is controlled through preferences. Right click on the web project and select Properties. Now go to the MyEclipse->Web page and the Deployment tab. You can modify how dependent projects are deployed from there.
Let us know how you get on.
maiconramonesParticipantHi guy,
So, what’s the option I should mark to export my jar dependency (project referenced by Maven4MyEclipse -> “Enable Workspace Resolution”)??
Because any combination marked doesn’t work. My referenced project wasn’t deployed as jar.
How to exported my project referenced with “Enable Resolution workpace” marked?
Edit:
Now my new package is not exported to server… 🙁
support-tonyKeymastermaiconramones,
Do you have the dependent project included in the web project’s pom? If not, please add it, using the pom editor or simply right-click on the project and go to Maven4MyEclipse->Add Dependency. Once the dependency is added in the pom, right click on the project again and select Maven4MyEclipse->Update Project Configuration and follow the wizard.
Check that the dependent project is now in the deployment assembly: right click on the project, go to Properties and then the MyEclipse->Deployment Assembly page. The dependent project should be there. Select an appropriate deployment policy, as mentioned previously, and deployment of the dependent project should now work.
Please let us know if this works.
maiconramonesParticipantHi. Sorry for taking so long on answering…
In Web Deployment Assembly I selected my project (jar) to assembly in WEB-INF/lib.
But not assembly my project in WEB-INF/lib.
What can be?
Attachments:
You must be logged in to view attached files.
support-tonyKeymasterMaicon,
I can’t replicate your problem. I don’t have any problem setting up a maven web project with a dependent maven java project and get a successful deployment. Just to confirm what I’ve done –
I created a maven web project. I created a maven java project. I added the maven java project to the maven web project dependencies in the pom. I ensured that the workspace resolution was enabled. I also ensured that the dependent project deployment policy was set to smart deployment (though I don’t think this is necessary). I can now deploy the web project to the glassfish server and can reference classes in the dependent project.
Is it possible for you to send us zipped copies of the two projects that are causing problems, so that we can investigate further? If they are not more than a few megabytes, you can attach them in an email to support@genuitec.com, with “ATTN: Tony” in the subject line and a link to this forum topic in the email. If you can’t send the projects, please attach the poms for the two projects, as that may help.
Also please attach your installation details (which can be found through the menu item MyEclipse->Installation Summary, and then clicking on the Installation Details button.
maiconramonesParticipantHi Tony, thanks for your answers…
I closed and open the MyEclipse and I repeated all steps…
So now it works \o/ but I have one question.
In the page “Web Deploy Assembly” the “Deploy Path” is displayed as WEB-INF/lib/myproject.jar. But not generated the jar in WEB-INF/lib folder.
My project was exploded in WEB-INF/classes.
Question: Whats is the correct? Jar or exploded?
Regards
support-tonyKeymasterMaicon,
I’m glad your deployment is working now.
I just checked and the Web dependent project deployment setting does affect this. Right click on the project and select Properties. Go to the MyEclipse->Web page and click the deployment tab. If the Web Project Deployment Policy is set to “Use workbench default settings”, click on the link, “Configure workspace settings”, to see what the workbench default is. If Smart deployment is being used, then where the dependent project classes are placed depends on how the main project is deployed. I assume you’re using exploded deployment. In this case, the classes of the dependent project are merged into the classes directory of the deployed application. Otherwise, the classes are jar’ed and put in the WEB-INF/lib folder.
You can check this by looking at the deployment location (a quick way to get to that is from the Servers view – expand your server to see your project deployment, right click on the project and select “Browse deployment location”). Check that the dependent project classes are in the classes folder under WEB-INF.
If you alter the Web Project Deployment Policy to “JAR and place them in the /lib directory”, then you’ll get what you expected.
I hope this explains things for you.
-
AuthorPosts