Skip to content

Commit a5cdbe8

Browse files
committed
[MAINTENANCE] Update bndlib artifact name in plugins
1 parent d02eafa commit a5cdbe8

File tree

6 files changed

+43
-42
lines changed

6 files changed

+43
-42
lines changed

eba-maven-plugin/pom.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.aries</groupId>
2626
<artifactId>parent</artifactId>
27-
<version>2.0.1</version>
27+
<version>2.1.2-SNAPSHOT</version>
2828
<relativePath>../parent/pom.xml</relativePath>
2929
</parent>
3030

@@ -42,10 +42,10 @@
4242
</scm>
4343

4444
<properties>
45-
<bndlib.version>0.0.357</bndlib.version>
45+
<biz.aQute.bndlib.version>6.4.1</biz.aQute.bndlib.version>
4646
<maven-archiver.version>2.3</maven-archiver.version>
4747
<maven-artifact.version>2.0.4</maven-artifact.version>
48-
<maven-bundle-plugin.version>2.0.0</maven-bundle-plugin.version>
48+
<maven-bundle-plugin.version>5.1.9</maven-bundle-plugin.version>
4949
<maven-invoker-plugin.version>3.9.0</maven-invoker-plugin.version>
5050
<maven-model.version>3.9.9</maven-model.version>
5151
<maven-plugin-api.version>2.0</maven-plugin-api.version>
@@ -58,9 +58,9 @@
5858

5959
<dependencies>
6060
<dependency>
61-
<groupId>biz.aQute</groupId>
62-
<artifactId>bndlib</artifactId>
63-
<version>${bndlib.version}</version>
61+
<groupId>biz.aQute.bnd</groupId>
62+
<artifactId>biz.aQute.bndlib</artifactId>
63+
<version>${biz.aQute.bndlib.version}</version>
6464
</dependency>
6565
<dependency>
6666
<groupId>org.apache.felix</groupId>

eba-maven-plugin/src/main/java/org/apache/aries/plugin/eba/EbaMojo.java

+26-26
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
import org.codehaus.plexus.util.FileUtils;
3232
import org.apache.maven.shared.osgi.DefaultMaven2OsgiConverter;
3333
import org.apache.maven.shared.osgi.Maven2OsgiConverter;
34-
import aQute.lib.osgi.Analyzer;
34+
import aQute.bnd.osgi.Analyzer;
3535
import java.io.File;
3636
import java.io.IOException;
3737
import 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);

esa-maven-plugin/pom.xml

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<parent>
2525
<groupId>org.apache.aries</groupId>
2626
<artifactId>parent</artifactId>
27-
<version>2.0.0</version>
27+
<version>2.1.2-SNAPSHOT</version>
2828
<relativePath>../parent/pom.xml</relativePath>
2929
</parent>
3030

@@ -42,10 +42,10 @@
4242
</scm>
4343

4444
<properties>
45-
<bndlib.version>0.0.357</bndlib.version>
45+
<biz.aQute.bndlib.version>6.4.1</biz.aQute.bndlib.version>
4646
<maven-archiver.version>2.3</maven-archiver.version>
4747
<maven-artifact.version>2.0.4</maven-artifact.version>
48-
<maven-bundle-plugin.version>2.0.0</maven-bundle-plugin.version>
48+
<maven-bundle-plugin.version>5.1.9</maven-bundle-plugin.version>
4949
<maven-model.version>3.9.9</maven-model.version>
5050
<maven-plugin-api.version>2.0</maven-plugin-api.version>
5151
<maven-plugin-testing-harness.version>1.1</maven-plugin-testing-harness.version>
@@ -63,9 +63,9 @@
6363
<version>${org.apache.aries.util.version}</version>
6464
</dependency>
6565
<dependency>
66-
<groupId>biz.aQute</groupId>
67-
<artifactId>bndlib</artifactId>
68-
<version>${bndlib.version}</version>
66+
<groupId>biz.aQute.bnd</groupId>
67+
<artifactId>biz.aQute.bndlib</artifactId>
68+
<version>${biz.aQute.bndlib.version}</version>
6969
</dependency>
7070
<dependency>
7171
<groupId>org.apache.felix</groupId>

esa-maven-plugin/src/main/java/org/apache/aries/plugin/esa/ContentInfo.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import java.util.zip.ZipEntry;
2828
import java.util.zip.ZipFile;
2929

30-
import aQute.lib.osgi.Analyzer;
30+
import aQute.bnd.osgi.Analyzer;
3131

3232
import org.apache.maven.artifact.Artifact;
3333
import org.apache.maven.artifact.versioning.VersionRange;

esa-maven-plugin/src/main/java/org/apache/aries/plugin/esa/EsaMojo.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.util.Map;
3131
import java.util.Set;
3232

33+
import aQute.bnd.osgi.Analyzer;
3334
import org.apache.aries.util.manifest.BundleManifest;
3435
import org.apache.maven.archiver.PomPropertiesUtil;
3536
import org.apache.maven.artifact.Artifact;
@@ -504,7 +505,7 @@ private String getSubsystemVersion() {
504505
if (instructions.containsKey(Constants.SUBSYSTEM_VERSION)) {
505506
return instructions.get(Constants.SUBSYSTEM_VERSION).toString();
506507
}
507-
return aQute.lib.osgi.Analyzer.cleanupVersion(project.getVersion());
508+
return Analyzer.cleanupVersion(project.getVersion());
508509
}
509510

510511
private String getSubsystemName() {

esa-maven-plugin/src/test/java/org/apache/aries/plugin/esa/EsaMojoTest.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
import org.codehaus.plexus.archiver.zip.ZipEntry;
3535
import org.codehaus.plexus.archiver.zip.ZipFile;
3636

37-
import aQute.lib.osgi.Analyzer;
37+
import aQute.bnd.osgi.Analyzer;
3838

3939
/**
4040
* @author <a href="mailto:aramirez@apache.org">Allan Ramirez</a>
@@ -227,7 +227,7 @@ private Map<String, Map<String, String>> getHeader(Manifest mf, String header) {
227227
Attributes attributes = mf.getMainAttributes();
228228
String value = attributes.getValue(header);
229229
assertNotNull("Header " + header + " not found", value);
230-
return Analyzer.parseHeader(value, null);
230+
return Analyzer.parseHeader(value, null).toBasic();
231231
}
232232

233233
private void testForHeader(ZipFile esa, String header, String exactEntry) throws Exception {

0 commit comments

Comments
 (0)