0

I Build a multi module project having name ThreadPool-Maven

ThreadPool-Maven contains two projects ThreadPool-Implementation and ThreadPool-Evaluator.

Both are interdependent, ThreadPool-Evaluator project are dependendent on ThreadPool-Implementation project.

ThreadPool-Implementation contains three java files.

  1. ThreadPool.java
  2. WorkerThreadPool.java
  3. Done.java

ThreadPool-Evaluator contains two java files.

  1. TestThreadPool.java
  2. TestWorkerThread.java

These are my work till now. Now I want to build a bundle of ThreadPool-Implementation and ThreadPool-Evaluator and these bundles are used by ThreadPool-Maven to perform same task. Help me to do that.

POMS are as follows:-

ThreadPool-Maven :-

<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.xyz.intern.multiple_project</groupId>
    <version>0.8-SNAPSHOT</version>
    <artifactId>ThreadPool-Maven</artifactId>
    <packaging>pom</packaging>
    <name>Simple Parent Project ThreadPool-Maven</name>

    <modules>
        <module>ThreadPool-Implementation</module>
        <module>ThreadPool-Evaluator</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>3.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

</project>

ThreadPool-Implementation

<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>com.xyz.intern.multiple_project</groupId>
    <artifactId>ThreadPool-Maven</artifactId>
    <version>0.8-SNAPSHOT</version>
  </parent>

  <artifactId>ThreadPool-Implementation</artifactId>
  <packaging>jar</packaging>

  <name>ThreadPool-Implementation </name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

</project>

ThreadPool-Evaluator

<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>com.xyz.intern.multiple_project</groupId>
    <artifactId>ThreadPool-Maven</artifactId>
    <version>0.8-SNAPSHOT</version>
  </parent>
  <artifactId>ThreadPool-Evaluator</artifactId>
  <packaging>jar</packaging>

  <name>ThreadPool-Evaluation</name>
  <url>http://maven.apache.org</url>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <dependencies>
    <dependency>
        <groupId>com.xyz.intern.multiple_project</groupId>
        <artifactId>ThreadPool-Implementation</artifactId>
        <version>${project.version}</version>
    </dependency>
  </dependencies>

</project>
devsda
  • 4,112
  • 9
  • 50
  • 87

1 Answers1

0

The Maven bundle plugin is used for generating OSGi compatible bundle JAR files. Check out the Apache Felix Maven Bundle Plugin for more info.

John Haager
  • 2,107
  • 1
  • 17
  • 22