3131import org .codehaus .plexus .util .FileUtils ;
3232import org .apache .maven .shared .osgi .DefaultMaven2OsgiConverter ;
3333import org .apache .maven .shared .osgi .Maven2OsgiConverter ;
34- import aQute .lib .osgi .Analyzer ;
34+ import aQute .bnd .osgi .Analyzer ;
3535import java .io .File ;
3636import java .io .IOException ;
3737import java .util .Iterator ;
@@ -52,7 +52,7 @@ public class EbaMojo
5252 extends AbstractMojo
5353{
5454
55-
55+
5656 public static final String APPLICATION_MF_URI = "META-INF/APPLICATION.MF" ;
5757
5858 private static final String [] DEFAULT_INCLUDES = {"**/**" };
@@ -70,12 +70,12 @@ public class EbaMojo
7070 private static final String APPLICATION_EXPORTSERVICE = "Application-ExportService" ;
7171 private static final String APPLICATION_IMPORTSERVICE = "Application-ImportService" ;
7272 private static final String APPLICATION_USEBUNDLE = "Use-Bundle" ;
73-
73+
7474 /**
7575 * Coverter for maven pom values to OSGi manifest values (pulled in from the maven-bundle-plugin)
7676 */
7777 private Maven2OsgiConverter maven2OsgiConverter = new DefaultMaven2OsgiConverter ();
78-
78+
7979 /**
8080 * Single directory for extra files to include in the eba.
8181 *
@@ -167,8 +167,8 @@ public class EbaMojo
167167 *
168168 * @parameter
169169 */
170- private Map instructions = new LinkedHashMap ();;
171-
170+ private Map instructions = new LinkedHashMap ();;
171+
172172 /**
173173 * Adding pom.xml and pom.properties to the archive.
174174 *
@@ -199,9 +199,9 @@ public class EbaMojo
199199
200200 /**
201201 * Define which bundles to include in the archive.
202- * none - no bundles are included
202+ * none - no bundles are included
203203 * applicationContent - direct dependencies go into the content
204- * all - direct and transitive dependencies go into the content
204+ * all - direct and transitive dependencies go into the content
205205 *
206206 * @parameter expression="${archiveContent}" default-value="applicationContent"
207207 */
@@ -226,10 +226,10 @@ public void execute()
226226 if (archiveContent == null ) {
227227 archiveContent = new String ("applicationContent" );
228228 }
229-
230- getLog ().debug ( "archiveContent[" + archiveContent + "]" );
231- getLog ().info ( "archiveContent[" + archiveContent + "]" );
232-
229+
230+ getLog ().debug ( "archiveContent[" + archiveContent + "]" );
231+ getLog ().info ( "archiveContent[" + archiveContent + "]" );
232+
233233 zipArchiver .setIncludeEmptyDirs ( includeEmptyDirs );
234234 zipArchiver .setCompress ( true );
235235 zipArchiver .setForced ( forceCreation );
@@ -258,19 +258,19 @@ public void execute()
258258 // if use transitive is set (i.e. true) then we need to make sure archiveContent does not contradict (i.e. is set
259259 // to the same compatible value or is the default).
260260 if ("none" .equals (archiveContent )) {
261- throw new MojoExecutionException ("<useTransitiveDependencies/> and <archiveContent/> incompatibly configured. <useTransitiveDependencies/> is deprecated in favor of <archiveContent/>." );
261+ throw new MojoExecutionException ("<useTransitiveDependencies/> and <archiveContent/> incompatibly configured. <useTransitiveDependencies/> is deprecated in favor of <archiveContent/>." );
262262 }
263263 else {
264- artifacts = project .getArtifacts ();
264+ artifacts = project .getArtifacts ();
265265 }
266266 } else {
267267 // check that archiveContent is compatible
268268 if ("applicationContent" .equals (archiveContent )) {
269- artifacts = project .getDependencyArtifacts ();
269+ artifacts = project .getDependencyArtifacts ();
270270 }
271271 else {
272272 // the only remaining options should be applicationContent="none"
273- getLog ().info ("archiveContent=none: application arvhive will not contain any bundles." );
273+ getLog ().info ("archiveContent=none: application arvhive will not contain any bundles." );
274274 }
275275 }
276276 if (artifacts != null ) {
@@ -282,7 +282,7 @@ public void execute()
282282 artifact .getScope () + "]" );
283283 zipArchiver .addFile (artifact .getFile (), artifact .getArtifactId () + "-" + artifact .getVersion () + "." + (artifact .getType () == null ? "jar" : artifact .getType ()));
284284 }
285- }
285+ }
286286 }
287287 }
288288 catch ( ArchiverException e )
@@ -362,7 +362,7 @@ public void execute()
362362 "Error generating APPLICATION.MF file: " + fileName , e );
363363 }
364364 }
365-
365+
366366 // Check if connector deployment descriptor is there
367367 File ddFile = new File ( getBuildDir (), APPLICATION_MF_URI );
368368 if ( !ddFile .exists () )
@@ -480,7 +480,7 @@ private void writeApplicationManifest(String fileName)
480480 }
481481
482482 }
483-
483+
484484 // The maven2OsgiConverter assumes the artifact is a jar so we need our own
485485 // This uses the same fallback scheme as the converter
486486 private String getApplicationSymbolicName (Artifact artifact ) {
@@ -489,14 +489,14 @@ private String getApplicationSymbolicName(Artifact artifact) {
489489 }
490490 return artifact .getGroupId () + "." + artifact .getArtifactId ();
491491 }
492-
492+
493493 private String getApplicationVersion () {
494494 if (instructions .containsKey (APPLICATION_VERSION )) {
495495 return instructions .get (APPLICATION_VERSION ).toString ();
496496 }
497- return aQute . lib . osgi . Analyzer .cleanupVersion (project .getVersion ());
497+ return Analyzer .cleanupVersion (project .getVersion ());
498498 }
499-
499+
500500 protected File getBuildDir ()
501501 {
502502 if ( buildDir == null )
@@ -519,16 +519,16 @@ private void includeCustomApplicationManifestFile()
519519 FileUtils .copyFileToDirectory ( appMfFile , metaInfDir );
520520 }
521521 }
522-
522+
523523 /**
524- * Return artifacts in 'compile' or 'runtime' scope only.
524+ * Return artifacts in 'compile' or 'runtime' scope only.
525525 */
526- private Set <Artifact > selectArtifacts (Set <Artifact > artifacts )
526+ private Set <Artifact > selectArtifacts (Set <Artifact > artifacts )
527527 {
528528 Set <Artifact > selected = new LinkedHashSet <Artifact >();
529529 for (Artifact artifact : artifacts ) {
530530 String scope = artifact .getScope ();
531- if (scope == null
531+ if (scope == null
532532 || Artifact .SCOPE_COMPILE .equals (scope )
533533 || Artifact .SCOPE_RUNTIME .equals (scope )) {
534534 selected .add (artifact );
0 commit comments