[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-4869) cannot mount existing projects with custom dir structure

Snjezana Peco (JIRA) jira-events at lists.jboss.org
Fri Sep 11 18:35:23 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBIDE-4869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12485482#action_12485482 ] 

Snjezana Peco commented on JBIDE-4869:
--------------------------------------

> Issue #1 : We have a dependency on an EJB3 project and those class files never get deployed to the server so the server ends up with 
> ClassNotFoundException(ie. we can't debug unless we do attach source and then hot deploy fails unlike MyEclipse which works like a charm). 

You need to create WAR and EJB project and add them to the EAR project using the Java EE Module Dependencies preference page.
MyEclipse hot-swap debugging is a standard Java hot-swap debugging that will work in any IDE that supports the following: 
- starting the server in debug mode
- deploying an application in an exploded form
- incremental deployment

JBoss Tools server adapters support these features. If you add the EJB project correctly, you will have this kind of deployment. For now, you have to attach your projects to the Source tab of the Launch Configuration editor.

> Issue #2 : As soon as we give jboss tools our webroot which is project/input/webroot/WEB-INF, it copies all the libraries and class files there 
> which is causing havoc with our source control and our ant build system as generated files are NOT suppose to ever be put in project/input 
> directories. We have a special output directory if you need a location OR you could change to the way MyEclipse does it and put it on the 
> server....either way, this should be configurable so it is not screwing with people's build systems.

You can solve the problem in the following way:

- change the Java output directory to some directory using the Build Path property page (build/classes is the default output directory for WTP/JBoss Tools projects)
- create 2 user libraries: LIBEXCLUDE including all the libraries from your libexclude directory and LIBINCLUDE including all the libraries from libinclude. The libinclude/libexclude directories can, but don't have to be within the project
- add these user libraries to the project's build path
- right-click the project and open Properties>Java EE Module Dependencies
- select the Web Libraries tab
- check the LIBINCLUDE user library and uncheck LIBEXCLUDE 
Your .classpath will contain the following lines :
...
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/LIBINCLUDE">
  <attributes>
    <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
  </attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/LIBEXCLUDE"/> 
...

In this way, your output classes will be deployed to the server, but they won't be in the web content folder (webroot). All the libraries from libinclude will be deployed and will be in the classpath of the project. The libraries from libexclude will be in the classpath of the project, but won't be deployed. Your web content folder won't be changed.



> cannot mount existing projects with custom dir structure
> --------------------------------------------------------
>
>                 Key: JBIDE-4869
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-4869
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: Seam
>    Affects Versions: 3.0.0.GA, 3.0.1.GA, 3.1.0.M1, 3.1.0.M2
>         Environment: any
>            Reporter: deanhiller
>
> We currently work in MyEclipse and everything works awesome.  JBoss tools has some other features we want, but alas, we can't set our project up in jboss tools.  There seem to be too many issues.  Not sure if this is a feature request or bug (ie. I can't use the product without this feature so does that make it a bug?)
> Issue #1 : We have a dependency on an EJB3 project and those class files never get deployed to the server so the server ends up with ClassNotFoundException(ie. we can't debug unless we do attach source and then hot deploy fails unlike MyEclipse which works like a charm).
> Issue #2 : As soon as we give jboss tools our webroot which is project/input/webroot/WEB-INF, it copies all the libraries and class files there which is causing havoc with our source control and our ant build system as generated files are NOT suppose to ever be put in project/input directories.  We have a special output directory if you need a location OR you could change to the way MyEclipse does it and put it on the server....either way, this should be configurable so it is not screwing with people's build systems.
> Our custom directory structure works for jar projects and war projects and looks like so
> project
> ---input
> ------javasrc - the *.java files 
> ------libexclude - the jar files that do not go to WEB-INF/lib
> ------libinclude - the jar files that should be put in WEB-INF/lib
> ------webroot - all the xhtml files and jpgs
> ---------WEB-INF - all descriptor files
> jboss tools throws all this junk stuff in WEB-INF/lib and WEB-INF/classes when it should not generate anything unless there is an override for it.  All of this stuff works in MyEclipse and we would love to switch but can't.  I have seen other posts related to this same issue.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list