Page tree
Skip to end of metadata
Go to start of metadata
Description

This page troubleshoots alerts related to missing source folder for Maven projects.

The standard directory layout for a Maven Project is shown below :

Application source code : src/main/java
Web application sources : src/main/webapp

In the pom.xml file, the sourceDirectory>

 

Observed in CAST AIP

 

Release
Yes/No
8.3.x(tick)
8.2.x(tick)
8.1.x(tick)
8.0.x(tick)
7.3.x(tick)
Observed on RDBMS
RDBMS
Yes/No
Oracle Server (tick)
Microsoft SQL Server (tick)
CSS2 (tick)
Step by Step Scenario

Below is the step-by-step scenario leading to the problem:

  1. Package the Maven source in DMT.
  2. Check the Packaging Content Tab for alerts.
Impact of the Problem

The impact of the problem on the analysis or the dashboard is:  Since the packaging is returning alerts you will not be able to analyze the alert files.

Action Plan
  1. Check in the application source code, for the Maven project that has a missing folder alert which says that the missing folder exists.
  2. If it does not exist :
    1. If the missing folder is a webapp folder as shown in the below screenshot :


      1. Open the pom.xml file
      2. If CAST-AIP version is lower than 8.3.1:
        1. Check that the pom.xml has a plugin section, followed by a configuration sub-section which contains a webresources section (plugin→configuration→webresources hierarchy in the pom.xml). This is shown in the example portion of a pom.xml file: the webresources section contains the webapp folder location.


        2. If it does, then add a warsourcedirectory line inside the configuration section which has the web application directory associated with the webResources section and locate this line before the webResources section like in the below example portion of a pom.xml file:

        3. If the webresources section does not contain the path to the webapp folder, then we expect to see the webapp folder in the path src/main/webapp. If it is not there, then the source code to deliver is not complete.
      3. If CAST-AIP version is 8.3.1 or above, If the webresources section does not contain the path to the webapp folder, then we expect to see the webapp folder in the path src/main/webapp. If it is not the case, the source code is not complete.

    2. If the missing folder is a java source folder as shown in the below screenshot :
      1. Open the maven project file
      2. Check if inside the build section there is a section sourceDirectory similar to what is shown in the below screenshot :


      3. If there is no section named sourceDirectory, then the java source code must be located in the folder src/main/java.
      4. If the section sourceDirectory exists :
        1. Check that the source path defined in the sourceDirectory section has no variable like below screenshot :
        2. If it does, the variable may not have been resolved. Replace this variable by the real path of the src folder.
        3. If there is no variable and the sourceDirectory has a value, check that the defined path really exists.
        4. If the path does not exist, the alert is expected.
  3. If the above does not help you to remediate this alert, contact CAST Technical Support with the Relevant Input in order to reproduce the issue.
Notes/comments
 Ticket # 5094
Related Pages

 

  • No labels