Skip to Content

Build Seam web application

Posted in

Hello,
I have got a problem with build Seam web application. Application has theese moduls: Web, EJB, EAR, test. In Ecplipse I click on run button and Ecplise do build and copy application to JBoss AS.
Now, I need do build using ant4ecplise. Could you write me any example, how can I do it?

I try use:
[1]: <buildFeature workspaceDirectory="${workspaceDirectory}"
projectName="SeamApp5"
targetplatformid="eclipse"
destination="${destination}" />

In console, there is an error: A precondition has been violated: hasRole(projectRoleClass) on project...

[2]: <buildPlugin ... /> ... same problem as point [1].

[3]: <copy todir="${destination}" overwrite="true">
<ant4eclipse:pdeProjectFileSet workspaceDirectory="${workspaceDirectory}" projectname="SeamApp5"/>
</copy>

In console, there is an error: Project 'SeamApp5' must have role 'PluginProjectRole' or 'FeatureProjectRole'

I don't know, which task can I use. In Eclipse is project type of the project "SeamApp5": Project (right click on project -> properties -> resource).

Any idea? Thank you!

It seems as if you're

It seems as if you're guessing what you're doing. The and macros are PDE related which means that they're meant to build plugins/features/rcp etc.

What you're looking for is WTP support in Ant4Eclipse which isn't available yet. So you need to build the project by yourself. You can still use Ant4Eclipse to fetch the necessary informations like classpathes etc.
But it's up to you to decide whether you will build a war, an ear, an ejb and so on. Basically this is not a big deal as they're all alike (= zip files). The main differences are their inner layout which depends on the module type and slight application server differences (f.e. specific xml descriptors if you're using technologies like openejb without annotations).
Since I'm here at work I can't give you some kind of simple example here.
Nevertheless I'm building web applications myself so I already have such a feature in my focus.

Best regards

Daniel Kasmeroglu (TO)