Community
Participate
Working Groups
When creating Application Client 1.4 project the following problems are observed: 1. /META-INF/application-client.xml is missing. 2. /.settings/org.eclipse.wst.common.component is missing 3. Deployment Descriptor tree is not shown 4. API ComponentCore.createComponent(IProject).getRootFolder().getUnderlyingFolder() does not return the appClientModule folder, but the project's root folder. This issue is also valid for Application Client 5 projects. In WTP 1.5 creation of Application Client project is OK. The described problem is observed only in WTP 2.0.
Created attachment 62382 [details] junit test I attach a junit test that tests issue no.4: the ComponentCore.createComponent(IProject).getRootFolder().getUnderlyingFolder() API. The failing tests are "testAppCln14" and "testAppCln50" in the ProjectCreationTest test case. Fixing the problem should make the tests run OK.
Please take a look
Created attachment 62398 [details] patch fixes app client creation
Created attachment 62409 [details] patch fixes the junits for the module creation patch fixes the junits for the module creation, they were not checking correctly for the existence of the deployment descriptor.
checked in patches dated 2007-03-29 12:01 and 2007-03-29 13:47
This made it into the build yesterday
I have checked the fix with the I200703301651 build. The described issues are fixed for AppClient 1.4 projects. There is still one problem available for AppClient 5 projects: 4. API ComponentCore.createComponent(IProject).getRootFolder().getUnderlyingFolder() does not return the appClientModule folder, but the project's root folder. If you run the junit test that I have already attached, you should see that the testAppCln50() test case is still failing.
Hi Kaloyan, We also have Junit tests for the same stuff if you see the class AppClientProjectCreationOperationTest.java in plugin org.eclipse.jst.j2ee.tests (at dev.eclipse.org cvs) and it does not fail.. I looked at your junit test and it looks like you are setting the properties on the top level datamodel, which is incorrect (according to the implementation) In our junit AppClientProjectCreationOperationTest.java we do the following, private void addAppProjectProperties(IDataModel dataModel, String projName, IProjectFacetVersion appFacetVersion){ ... FacetDataModelMap map = (FacetDataModelMap) dataModel .getProperty(IFacetProjectCreationDataModelProperties.FACET_DM_MAP); IDataModel appmodel = (IDataModel) map.get(IAppClientFacetInstallDataModelProperties.APPLICATION_CLIENT); appmodel.setProperty(IFacetInstallDataModelProperties.FACET_VERSION, appFacetVersion); appmodel.setStringProperty(IJ2EEModuleFacetInstallDataModelProperties.CONFIG_FOLDER,"appcc333"); //$NON-NLS-1$ Your code in ProjectCreationOperation does try to set the CONFIG_FOLDER on the top level datamodel provider which is ignored private IFacetedProject.Action setupAppClientInstallAction50( String contentFolder) { IDataModel clientFacetInstallDataModel = DataModelFactory .createDataModel(new AppClientFacetInstallDataModelProvider()); clientFacetInstallDataModel.setProperty( IAppClientFacetInstallDataModelProperties.CONFIG_FOLDER, contentFolder); The right fix is to correct the junit so that you set the config folder on the facet's datamodel.
Raj, I see. Thank you for the clarification.
Closing as already verified.