You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ca...@apache.org on 2007/02/23 02:42:44 UTC
svn commit: r510755 -
/maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java
Author: carlos
Date: Thu Feb 22 17:42:44 2007
New Revision: 510755
URL: http://svn.apache.org/viewvc?view=rev&rev=510755
Log:
Reorganize analyzer property setting
Modified:
maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java
Modified: maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java
URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java?view=diff&rev=510755&r1=510754&r2=510755
==============================================================================
--- maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java (original)
+++ maven/sandbox/trunk/plugins/maven-bundle-plugin/src/main/java/org/apache/felix/tools/maven2/bundleplugin/ManifestPlugin.java Thu Feb 22 17:42:44 2007
@@ -96,27 +96,26 @@
{
PackageVersionAnalyzer analyzer = new PackageVersionAnalyzer();
- analyzer.setProperties( getDefaultProperties( project ) );
- if ( properties != null )
+ Properties props = getDefaultProperties( project );
+ props.putAll( properties );
+
+ if ( !instructions.containsKey( Analyzer.IMPORT_PACKAGE ) )
{
- analyzer.getProperties().putAll( properties );
+ props.put( Analyzer.IMPORT_PACKAGE, "*" );
}
- analyzer.getProperties().putAll( instructions );
+ if ( !instructions.containsKey( Analyzer.PRIVATE_PACKAGE )
+ && !instructions.containsKey( Analyzer.EXPORT_PACKAGE ) )
+ {
+ String export = analyzer.calculateExportsFromContents( analyzer.getJar() );
+ analyzer.setProperty( Analyzer.EXPORT_PACKAGE, export );
+ }
- analyzer.setJar( project.getArtifact().getFile() );
+ props.putAll( instructions );
- if ( analyzer.getProperty( Analyzer.IMPORT_PACKAGE ) == null )
- analyzer.setProperty( Analyzer.IMPORT_PACKAGE, "*" );
+ analyzer.setProperties( props );
- if ( !instructions.containsKey( Analyzer.PRIVATE_PACKAGE ) )
- {
- if ( analyzer.getProperty( Analyzer.EXPORT_PACKAGE ) == null )
- {
- String export = analyzer.calculateExportsFromContents( analyzer.getJar() );
- analyzer.setProperty( Analyzer.EXPORT_PACKAGE, export );
- }
- }
+ analyzer.setJar( project.getArtifact().getFile() );
if ( classpath != null )
analyzer.setClasspath( classpath );