# Help using external dependencies / Including dependencies in plugin bundle

**URL:** <https://forum.universal-robots.com/t/help-using-external-dependencies-including-dependencies-in-plugin-bundle/18004>\
**Category:** URCap Development\
**Created:** [December 6, 2021, 7:19pm UTC](https://forum.universal-robots.com/t/help-using-external-dependencies-including-dependencies-in-plugin-bundle/18004 "2021-12-06T19:19:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anon22196637](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@anon22196637](https://forum.universal-robots.com/u/anon22196637)\
**Post date:** [December 6, 2021, 7:19pm UTC](https://forum.universal-robots.com/t/help-using-external-dependencies-including-dependencies-in-plugin-bundle/18004/1 "2021-12-06T19:19:42Z")

</div>

Hey,

I am trying to use the [j2mod](https://github.com/steveohara/j2mod) dependency in my urcap. I got the latest build form [maven repository](https://mvnrepository.com/artifact/com.ghgande/j2mod/3.0.0), and included the dependency in my pom.xml file.

Then, adding the artifact id to the `<Embed-Dependency>j2mod;scope=compile|runtime</Embed-Dependency>` tag in the maven bundle plugin, and exclude from the `<Import-Package> !com.ghgande.j2mod, com.ur.urcap.api*, *</Import-Package>` tag.

This cases polyscope to want jSerialComm, Slf4j-api, Slf4j-impl… and so on. It seems to be a never ending dependency tree. So far my pom looks like this.

```auto
<Embed-Dependency>j2mod, jSerialComm, slf4j-api, slf4j-log4j12, log4j-core ;scope=compile|runtime</Embed-Dependency>
						<Embed-Transitive>true</Embed-Transitive>
						<Import-Package>
							!com.ghgande.j2mod,
							com.ur.urcap.api*,
							*
						</Import-Package>
					</instructions>
				</configuration>
			</plugin>
			...
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
			<version>4.3.0</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>com.ur.urcap</groupId>
			<artifactId>api</artifactId>
			<version>1.13.0</version>
			<scope>provided</scope>
		</dependency>

		<!-- Extended dependencies -->
		<dependency>
			<groupId>com.ghgande</groupId>
			<artifactId>j2mod</artifactId>
			<version>3.0.0</version>
		</dependency>

		<dependency>
			<groupId>com.fazecast</groupId>
			<artifactId>jSerialComm</artifactId>
			<version>2.7.0</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>1.7.21</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>1.7.25</version>
			<!-- <scope>test</scope> -->
		</dependency>

		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<version>2.14.1</version>
			<!-- <scope>test</scope> -->
		</dependency>

		<!-- test dependencies -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.12</version>
			<scope>test</scope>
		</dependency>
	</dependencies>

```

please help.
