EnterpriseAnalyzerPlugin implements AnalyzerPlugin { @Override public boolean analyzeJar(Analyzer analyzer) throws Exception { String liferayEnterpriseApp = analyzer.getProperty( "Liferay-Enterprise-App"); if (liferayEnterpriseApp == null) { return false; } String serviceComponent = analyzer.getProperty("Service-Component"); if ((serviceComponent == null) || serviceComponent.isEmpty() || serviceComponent.contains("ModulePortalProfile.xml")) { return false; } _processServiceComponent(analyzer, serviceComponent); _processProvideCapability(analyzer); return true; }  @Override boolean analyzeJar(Analyzer analyzer);  }
@Test public void testAnalyzeJar() throws Exception { _testAnalyzeJar(null, null, false); _testAnalyzeJar("Test Enterprise APP", null, false); _testAnalyzeJar("Test Enterprise APP", "", false); _testAnalyzeJar( "Test Enterprise APP", "ModulePortalProfile.xml", false); _testAnalyzeJar( "Test Enterprise APP", "OSGI-INF/com.liferay.ant.bnd.enterprise.test.internal." + "TestComponent.xml", true); }