Haven't seen this email since was deep, deep in debugger and fixed this issue the same way, but couple hours later :(

Thanks
Denis


On 07/16/2010 03:02 PM, Snjezana Peco wrote:
Hi,


Attached is a patch that works correctly for WAR and EAR projects.


Andersen Max wrote:
 
9. JBoss Tools 3.2 Issue:
web.xml: All comments are stripped after project import, must restore original web.xml from svn
(not an issue with JBoss Tools 3.1).
     
This problem is related to webtools and is described in https://jira.jboss.org/browse/JBIDE-6228.
The problem was also existing in JBoss Tools 3.1 when the JBoss Maven Seam Configurator was included.
   

Do we ensure we don't touch the web.xml if we don't need to ? I would expect that this maven project is already "seamified" ?

 

The JBoss Maven Seam Configuraator doesn't change web.xml, but adds Seam facet that changes web.xml. See https://jira.jboss.org/browse/JBIDE-6228?focusedCommentId=12529695&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#action_12529695


10. m2eclipse issues:
     
The version of JRE isn't important for EAR project because an EAR project doesn't contain Java sources.
The problem related to application.xml is described in https://jira.jboss.org/browse/JBIDE-4809
There is a patch for it.
   

Could we follow up with m2eclipse/Fred B. on these so we get this fixed in m2eclipse ?
 

Fred B. knows about this problem. I suppose that Java was added because the Maven classpath conatainer was necessary to deploy libraries.



11. JBoss Tools (or m2eclipse?) issue:
The EAR module's src/application folder should be source folder.
     
Since EAR projects don't contain Java source files, that is unnecessary. JBoss Tools doesn't configure Java capabilities for any project, so that is related to m2eclipse.
   

do they enable java on the ear project !?

 

A non-mavenized JBoss Seam EAR project has the Java nature/builder. Seam facet enables it.


12. JBoss Tools issue:
Schema validation for some resource files fails due to use of Maven property placeholders. The > target resource files should be correct, so they are the files that should be validated.
     
This problem can be fixed in the following way:

- add the components.properties file to the classpath which contains all required maven properties. In the component.xml file, those properties should be declared as "@property_name@"
   

that would only work for the component.xml I reckon..?

 

The components.xml file is the only file that contains errors.


"Duplicate component" errors are marked correctly because there are several same components declared in ejb and war projects.
   

 
13. EAR Deployment assembly
JBoss Tools 3.2 Issues:
         * seam-tutorial-ejb module has wrong naming: seam-tutorial-ejb.ejb. Should be named
seam-tutorial-ejb.jar
   * Resource files should be published from the EAR target folder due to filtering of
resource files and generating of application.xml and jboss.app.xml during the Maven
generate-sources goal.
     
This issue is related to https://jira.jboss.org/browse/JBIDE-4809. You can use the bundleFileName element as a workaround. The problem is an m2eclipse problem.
   

looks like the .ejb issue is fixed in 0.10.1 ? https://issues.sonatype.org/browse/MNGECLIPSE-2155
 

Will check.


14. Web Deployment assembly
JBoss Tools 3.2 Issue:
Resource files should be published from WAR target folder due to filtering of resource files
during the Maven generate-sources goal.
     
The WTP configurator publishes war projects. It is part of m2eclipse. Anyway, resources are published to WEB-INF/classes and exist in the classpath of the application which is correct in my opinion. The messages_xx.properties files have to be in the classpath, for instance.
   

But m2eclipse doesn't put them there (i.e. WebContent/WEB-INF/classes) does it ?
 

It does, m2eclipse puts them to WebContent/WEB-INF/classes

Snjeza


/max
 
Snjeza

Andersen Max wrote:
   
hi,

@leifoolsen posted this http://www.glxn.net/seam-maven-refimpl/doc/tutorial/05-eclipse-3.6-worklog.html

this is him explaining how to use JBoss Tools + Maven on a seam project.

The walkthrough illustrates how resource filtering in maven + the WTP assembly is fighting against each other ;(

it also shows that he also bumped into JBIDE-6596 with respect to lib/jboss-seam.jar.

Its an excellent read to see some of the problems we are facing....

/max
_______________________________________________
jbosstools-dev mailing list
jbosstools-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jbosstools-dev
 
     
### Eclipse Workspace Patch 1.0
#P org.jboss.ide.eclipse.as.core
Index: jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java
===================================================================
--- jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java    (revision 23095)
+++ jbosscore/org/jboss/ide/eclipse/as/core/publishers/PublishUtil.java    (working copy)
@@ -22,6 +22,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jst.server.core.IEnterpriseApplication;
+import org.eclipse.jst.server.core.IJ2EEModule;
import org.eclipse.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.internal.DeletedModule;
@@ -37,11 +38,11 @@
import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.xpl.ModulePackager;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
-import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
-import org.jboss.ide.eclipse.as.core.util.IWTPConstants;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentModulePrefs;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentPreferences;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentTypePrefs;
+import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
+import org.jboss.ide.eclipse.as.core.util.IWTPConstants;

public class PublishUtil {
    public static int countChanges(IModuleResourceDelta[] deltas) {
@@ -126,7 +127,11 @@
    public static IPath getDeployPath(IModule[] moduleTree, String deployFolder) {
        IPath root = new Path( deployFolder );
        String type, modName, name, uri, suffixedName;
-        for( int i = 0; i < moduleTree.length; i++ ) {
+        for( int i = 0; i < moduleTree.length; i++ ) {   
+            IJ2EEModule j2eeModule = (IJ2EEModule) moduleTree[i].loadAdapter(IJ2EEModule.class, null);
+            if (j2eeModule != null && j2eeModule.isBinary()) {
+                continue;
+            }
            type = moduleTree[i].getModuleType().getId();
            modName = moduleTree[i].getName();
            name = new Path(modName).lastSegment();
Index: jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java    (revision 23095)
+++ jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java    (working copy)
@@ -22,6 +22,7 @@
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jst.server.core.IJ2EEModule;
import org.eclipse.osgi.util.NLS;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
@@ -107,8 +108,13 @@
        IModuleResource[] members = getResources(module);

        ArrayList<IStatus> list = new ArrayList<IStatus>();
+        IJ2EEModule j2eeModule = (IJ2EEModule) module.loadAdapter(IJ2EEModule.class, null);
+        boolean delete = true;
+        if (j2eeModule != null && j2eeModule.isBinary()) {
+            delete = false;
+        }
        // if the module we're publishing is a project, not a binary, clean it's folder
-        if( !(new Path(module.getName()).segmentCount() > 1 ))
+        if( !(new Path(module.getName()).segmentCount() > 1 ) && delete)
            list.addAll(Arrays.asList(localSafeDelete(deployPath)));

        if( !deployPackaged(moduleTree) && !isBinaryObject(moduleTree)) {
   

 

_______________________________________________ jbosstools-dev mailing list jbosstools-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jbosstools-dev