Description

This page describes the issue where you exclude a Maven project from DMT since same Eclipse project exists but the exclusion is not taken into account and the ignored project is still exported to Cast-MS as a duplicate AU.

If you have both Maven and Eclipse projects for the same project, we should be excluding either the Maven or the Eclipse project from the project exclusion.
When packaging is completed we choose to exclude the duplicate maven projects in the project exclusion section in DMT while keeping the Eclipse project as shown below:

The exclusion works as you can see that these excluded jobs are in ignored state when you do the packaging again after exclusion.
But when you deliver it and set as current version from Cast-MS, you can see that the ignored maven project is exported leading to duplicate projects. 

Observed in CAST AIP

 

Release
Yes/No
 8.3.x(tick) 
Observed on RDBMS
 


RDBMS
Yes/No
CSS  (tick)
Step by Step Scenario

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

  • Package your code in DMT.
  • You observed that you have same projects belongng to Maven and Eclipse.
  • Exclude Maven project in the Projects exclusion.
  • Re-package.
  • See that the Maven project is marked as ignored.
  • Deliver.
  • Open Cast-MS and set as current version.
  • Check the Analysis units to discover that the ignored Maven projects have been exported to Cast-MS.
Impact of the Problem

The impact of the problem on the analysis or the dashboard is that we could have duplicate analysis results in the KB and duplicated objects in the dashboard.

Action Plan
  1. In CAST MS, go to the delivery tab
  2. Manage the delivery
  3. Once the DMT is opened, go the package configuration tab
  4. Check in the section Which project should we take into account for the analysis ? > Projects to exclude if the Maven vs Eclipse selection rules are correctly set and are not both unselected as below example :
  5. Go to the package content tab
  6. Check in the alerts if there are ambiguous project reference.
  7. If there are, remediate these alerts
  8. Run the package again
  9. Check in the package content, in the projects found section that the duplicate projects have been removed.
  10. If they have been removed, deliver the source.
  11. If after the set as current version, in the current version tab you still see the duplicate projects:
    1. proceed as follows to set all duplicate AU (Maven Project) to false that have been duplicated by an Eclipse project.
    2. Close Cast-MS if any instance is open in any environment.
      If on Cast Storage Service, open PG Admin and run the below query on your management base:
       

      update cms_j2ee_analysis 
         set active = 0
       where object_id in ( select aumaven.object_id
                  from cms_j2ee_analysis aumaven
                  join CMS_J2ee_project pmaven
                    on pmaven.object_id = aumaven.project_id
                   and pmaven.rootpath like '%pom.xml'
                  join cms_j2ee_analysis aueclipse
                    on aumaven.object_name = aueclipse.object_name
                  join CMS_J2ee_project peclipse
                    on peclipse.object_id = aueclipse.project_id
                   and peclipse.rootpath like '%.project'
                  )
    3. Open Cast-MS and check that the AU corresponding to Maven projects are set to false.



Notes/comments

Related Pages