From 417eb370c31567b9cb070a0f09b9baccf53d5255 Mon Sep 17 00:00:00 2001 From: Sujata <31987978+SujataDarekar@users.noreply.github.com> Date: Mon, 13 Dec 2021 13:14:20 +0530 Subject: [PATCH] Binary project support for custom xpath function project --- .../plugin/module/BWModulePackageMojo.java | 21 +++++++++++++++++-- .../plugin/test/coverage/ProcessParser.java | 1 + 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Source/bw6-maven-plugin/src/main/java/com/tibco/bw/maven/plugin/module/BWModulePackageMojo.java b/Source/bw6-maven-plugin/src/main/java/com/tibco/bw/maven/plugin/module/BWModulePackageMojo.java index b3242804..e036e25e 100644 --- a/Source/bw6-maven-plugin/src/main/java/com/tibco/bw/maven/plugin/module/BWModulePackageMojo.java +++ b/Source/bw6-maven-plugin/src/main/java/com/tibco/bw/maven/plugin/module/BWModulePackageMojo.java @@ -292,7 +292,7 @@ protected FileSet getFileSet(File basedir, List includes, List e includes.remove("target/"); } - if(isSharedModule()){ + if(isSharedModule() ){ //Ensure .project and .config are added if(!includes.contains(".config")){ includes.add(".config"); @@ -311,7 +311,16 @@ protected FileSet getFileSet(File basedir, List includes, List e // } // } } - + if(isCXFProject()) { + if(!includes.contains(".project")){ + includes.add(".project"); + } + + if(!includes.contains("pom.xml")) + { includes.add("pom.xml"); } + + } + if (includes.isEmpty()) { fileSet.setIncludes(new String[] { "" }); } else { @@ -330,6 +339,14 @@ protected boolean isSharedModule(){ return manifest.getMainAttributes().getValue(Constants.TIBCO_SHARED_MODULE) == null ? false : true; } + protected boolean isCXFProject(){ + if(null != manifest.getMainAttributes().getValue("Import-Package")) { + return manifest.getMainAttributes().getValue("Import-Package").equals("com.tibco.xml.cxf.common.annotations") ; + } + else { + return false; + } + } private void updateManifestVersion() { String version = manifest.getMainAttributes().getValue(Constants.BUNDLE_VERSION); String qualifierVersion = VersionParser.getcalculatedOSGiVersion(version, qualifierReplacement); diff --git a/Source/bw6-maven-plugin/src/main/java/com/tibco/bw/maven/plugin/test/coverage/ProcessParser.java b/Source/bw6-maven-plugin/src/main/java/com/tibco/bw/maven/plugin/test/coverage/ProcessParser.java index 690ce17e..1f465645 100644 --- a/Source/bw6-maven-plugin/src/main/java/com/tibco/bw/maven/plugin/test/coverage/ProcessParser.java +++ b/Source/bw6-maven-plugin/src/main/java/com/tibco/bw/maven/plugin/test/coverage/ProcessParser.java @@ -37,6 +37,7 @@ public void startElement(String namespaceURI, String localName, String qName, At case "tibex:activityExtension": case "tibex:receiveEvent": + case "bpws:receive": case "tibex:extActivity": case "bpws:empty": case "bpws:pick":