Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #680 #681

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -192,18 +192,17 @@ private void addDependencies() throws Exception {

boolean isSharedModule = false;
Manifest mf = ManifestParser.parseManifestFromJAR( file);
if(mf == null){
throw new Exception("Failed to get Manifest for - "+ file.getName() +". Please verify if jar file is valid, the MANIFEST.MF should be first or second entry in the jar file. Use Command - jar tf <Jar_File_Path> to verify.");
}
for( Object str : mf.getMainAttributes().keySet())
{
getLog().debug( str.toString() );
if( Constants.TIBCO_SHARED_MODULE.equals(str.toString() ))
{
isSharedModule = true;
break;
}
}
if(mf != null){
for( Object str : mf.getMainAttributes().keySet())
{
getLog().debug( str.toString() );
if( Constants.TIBCO_SHARED_MODULE.equals(str.toString() ))
{
isSharedModule = true;
break;
}
}
}
if(!isSharedModule) {
getLog().debug("Dependency added with name " + file.toString());
jarArchiver.addFile(file, "lib/" + file.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,10 @@ private void checkForSharedModule( Map<File,String> artifactFiles) {
continue;
}
boolean isSharedModule = false;
System.out.println("#### " + file.getAbsolutePath());
Manifest mf = ManifestParser.parseManifestFromJAR( file);
if(mf == null){
try {
throw new Exception("Failed to get Manifest for - "+ file.getName() +". Please verify if jar file is valid, the MANIFEST.MF should be first or second entry in the jar file. Use Command - jar tf <Jar_File_Path> to verify.");
} catch (Exception e) {
e.printStackTrace();
}
}
if(mf != null){

for( Object str : mf.getMainAttributes().keySet())
{
if( Constants.TIBCO_SHARED_MODULE.equals(str.toString() ))
Expand All @@ -136,6 +132,7 @@ private void checkForSharedModule( Map<File,String> artifactFiles) {
e.printStackTrace();
}
}
}
}

}
Expand Down