public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) {
            return; // Skip non web deployments
        }

        WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
        assert warMetaData != null;
        Map<String, WebMetaData> annotationsMetaData = warMetaData.getAnnotationsMetaData();
        if (annotationsMetaData == null) {
            annotationsMetaData = new HashMap<String, WebMetaData>();
            warMetaData.setAnnotationsMetaData(annotationsMetaData);
        }
        Map<ResourceRoot, Index> indexes = AnnotationIndexUtils.getAnnotationIndexes(deploymentUnit);

        // Process lib/*.jar
        for (final Entry<ResourceRoot, Index> entry : indexes.entrySet()) {
            final Index jarIndex = entry.getValue();
            annotationsMetaData.put(entry.getKey().getRootName(), processAnnotations(jarIndex));
        }

        Map<ModuleIdentifier, CompositeIndex> additionalModelAnnotations = deploymentUnit.getAttachment(Attachments.ADDITIONAL_ANNOTATION_INDEXES_BY_MODULE);
        if (additionalModelAnnotations != null) {
            final List<WebMetaData> additional = new ArrayList<WebMetaData>();
            for (Entry<ModuleIdentifier, CompositeIndex> entry : additionalModelAnnotations.entrySet()) {
                for(Index index : entry.getValue().getIndexes()) {
                    additional.add(processAnnotations(index));
                }
            }
            warMetaData.setAdditionalModuleAnnotationsMetadata(additional);
        }
    }
public void deploy(final DeploymentPhaseContext phaseContext) throws DeploymentUnitProcessingException {
        final DeploymentUnit deploymentUnit = phaseContext.getDeploymentUnit();
        if (!DeploymentTypeMarker.isType(DeploymentType.WAR, deploymentUnit)) {
            return; 
        }

        WarMetaData warMetaData = deploymentUnit.getAttachment(WarMetaData.ATTACHMENT_KEY);
        assert warMetaData != null;
        Map<String, WebMetaData> annotationsMetaData = warMetaData.getAnnotationsMetaData();
        if (annotationsMetaData == null) {
            annotationsMetaData = new HashMap<String, WebMetaData>();
            warMetaData.setAnnotationsMetaData(annotationsMetaData);
        }
        Map<ResourceRoot, Index> indexes = AnnotationIndexUtils.getAnnotationIndexes(deploymentUnit);

        
        for (final Entry<ResourceRoot, Index> entry : indexes.entrySet()) {
            final Index jarIndex = entry.getValue();
            annotationsMetaData.put(entry.getKey().getRootName(), processAnnotations(jarIndex));
        }

        Map<ModuleIdentifier, CompositeIndex> additionalModelAnnotations = deploymentUnit.getAttachment(Attachments.ADDITIONAL_ANNOTATION_INDEXES_BY_MODULE);
        if (additionalModelAnnotations != null) {
            final List<WebMetaData> additional = new ArrayList<WebMetaData>();
            for (Entry<ModuleIdentifier, CompositeIndex> entry : additionalModelAnnotations.entrySet()) {
                for(Index index : entry.getValue().getIndexes()) {
                    additional.add(processAnnotations(index));
                }
            }
            warMetaData.setAdditionalModuleAnnotationsMetadata(additional);
        }
    }
public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! DeploymentTypeMarker . isType ( DeploymentType . WAR , deploymentUnit ) ) { return ; // Skip non web deployments } WarMetaData warMetaData = deploymentUnit . getAttachment ( WarMetaData . ATTACHMENT_KEY ) ; assert warMetaData != null ; Map < String , WebMetaData > annotationsMetaData = warMetaData . getAnnotationsMetaData ( ) ; if ( annotationsMetaData == null ) { annotationsMetaData = new HashMap < String , WebMetaData > ( ) ; warMetaData . setAnnotationsMetaData ( annotationsMetaData ) ; } Map < ResourceRoot , Index > indexes = AnnotationIndexUtils . getAnnotationIndexes ( deploymentUnit ) ; // Process lib/*.jar for ( final Entry < ResourceRoot , Index > entry : indexes . entrySet ( ) ) { final Index jarIndex = entry . getValue ( ) ; annotationsMetaData . put ( entry . getKey ( ) . getRootName ( ) , processAnnotations ( jarIndex ) ) ; } Map < ModuleIdentifier , CompositeIndex > additionalModelAnnotations = deploymentUnit . getAttachment ( Attachments . ADDITIONAL_ANNOTATION_INDEXES_BY_MODULE ) ; if ( additionalModelAnnotations != null ) { final List < WebMetaData > additional = new ArrayList < WebMetaData > ( ) ; for ( Entry < ModuleIdentifier , CompositeIndex > entry : additionalModelAnnotations . entrySet ( ) ) { for ( Index index : entry . getValue ( ) . getIndexes ( ) ) { additional . add ( processAnnotations ( index ) ) ; } } warMetaData . setAdditionalModuleAnnotationsMetadata ( additional ) ; } }
Process web annotations.
Process web annotations .