-
-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add testcase for conditional packages with bnd-process
This adds a testacse where conditional package is used with bnd-process Signed-off-by: Christoph Läubrich <laeubi@laeubi-soft.de>
- Loading branch information
Showing
6 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
maven-plugins/bnd-maven-plugin/src/it/bnd-process-conditional/README.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
This is an example bundle that used bnd-process together with conditional package. | ||
|
||
Points of interest: | ||
|
||
* the conditional packages apaer in the maven output folder |
7 changes: 7 additions & 0 deletions
7
maven-plugins/bnd-maven-plugin/src/it/bnd-process-conditional/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
invoker.goals=--no-transfer-progress package | ||
|
||
# Run mvn with --debug for debug logging | ||
#invoker.debug=true | ||
|
||
# Run mvn in debugging mode and wait for a debugger to attach | ||
#invoker.environmentVariables.MAVEN_DEBUG_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000 |
1 change: 1 addition & 0 deletions
1
maven-plugins/bnd-maven-plugin/src/it/bnd-process-conditional/other.bnd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-conditionalpackage: com.google.common.cache |
37 changes: 37 additions & 0 deletions
37
maven-plugins/bnd-maven-plugin/src/it/bnd-process-conditional/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>biz.aQute.bnd-test</groupId> | ||
<artifactId>test</artifactId> | ||
<version>0.0.2</version> | ||
<relativePath>../process-parent</relativePath> | ||
</parent> | ||
<artifactId>test-bnd-process-conditional</artifactId> | ||
<version>0.0.1-SNAPSHOT</version> | ||
<licenses> | ||
<license> | ||
<name>Apache License, Version 2.0</name> | ||
<url>http://www.opensource.org/licenses/apache2.0.php</url> | ||
<distribution>repo</distribution> | ||
</license> | ||
</licenses> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
<version>32.0.1-jre</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>biz.aQute.bnd</groupId> | ||
<artifactId>bnd-maven-plugin</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
6 changes: 6 additions & 0 deletions
6
maven-plugins/bnd-maven-plugin/src/it/bnd-process-conditional/postbuild.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import java.util.jar.JarFile; | ||
import java.util.jar.JarEntry | ||
|
||
JarFile jar = new JarFile( new File(basedir, 'target/test-bnd-process-conditional-0.0.1-SNAPSHOT.jar')) | ||
JarEntry entry = jar.getEntry('com/google/common/cache/Cache.class') | ||
assert entry != null |
13 changes: 13 additions & 0 deletions
13
...nd-maven-plugin/src/it/bnd-process-conditional/src/main/java/org/example/impl/Config.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package org.example.impl; | ||
|
||
import java.util.concurrent.TimeUnit; | ||
|
||
import com.google.common.cache.Cache; | ||
import com.google.common.cache.CacheBuilder; | ||
|
||
public class Config { | ||
public static void main(String[] args) { | ||
Cache<String, String> myCache = CacheBuilder.newBuilder().maximumSize(100) | ||
.expireAfterWrite(30, TimeUnit.SECONDS).build(); | ||
} | ||
} |