我有父母的pom,我的孩子pom定位像一个模块。
在我的孩子包里,我有这样的东西
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<instructions>
<Bundle-SymbolicName>...</Bundle-SymbolicName>
<Bundle-Description>...</Bundle-Description>
<Bundle-Activator>...</Bundle-Activator>
<Import-Package>
oracle.sql,
oracle.jdbc,
javax.jws,
javax.jws.soap,
javax.xml.bind,
javax.xml.bind.annotation,
javax.xml.namespace,
javax.xml.ws,
*
</Import-Package>
<Export-Package>
</Export-Package>
</instructions>
</configuration>
</plugin>但在“宣言”里我得到了这样的东西
javax.jws,
javax.jws.soap,
javax.xml.bind,
javax.xml.bind.annotation,
javax.xml.bind.annotation.adapters,
javax.xml.datatype,
javax.xml.namespace但我没有拿到我的oracle.sql和oracle.jdbc。
当我从父文件夹生成mvn clean install时,就会发生这种情况。如果我在我的子pom所在的目录中创建mvn clean install,那么一切都正常。但当我看到詹金的构建不包括甲骨文的包后,问题就发生了。
有一个有趣的例子,我有其他模块,其中包括*甲骨文的**包,并在构建后,他们的清单有它。
发布于 2019-07-09 06:36:36
我发现了我的错误。我在里面有那个插件,但是Jenkins创建了没有任何配置文件的包,所以它没有我的Import就生成了。
看起来像是
<profiles>
<profile>
<id>My-Own-Profile</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<instructions>
<Bundle-SymbolicName>...</Bundle-SymbolicName>
<Bundle-Description>...</Bundle-Description>
<Bundle-Activator>...</Bundle-Activator>
<Import-Package>
oracle.sql,
oracle.jdbc,
javax.jws,
javax.jws.soap,
javax.xml.bind,
javax.xml.bind.annotation,
javax.xml.namespace,
javax.xml.ws,
*
</Import-Package>
<Export-Package>
</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>但我应该让它像
<profiles>
<profile>
<id>My-Own-Profile</id>
<build>
<plugins>
<plugin>
**SOME PLUGIN FOR THAT PROFILE**
</plugin>
</plugins>
</build>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<instructions>
<Bundle-SymbolicName>...</Bundle-SymbolicName>
<Bundle-Description>...</Bundle-Description>
<Bundle-Activator>...</Bundle-Activator>
<Import-Package>
oracle.sql,
oracle.jdbc,
javax.jws,
javax.jws.soap,
javax.xml.bind,
javax.xml.bind.annotation,
javax.xml.namespace,
javax.xml.ws,
*
</Import-Package>
<Export-Package>
</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>发布于 2019-05-21 15:26:20
请在依赖项部分的pom.xml中添加以下依赖项。
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.4.0</version>
</dependency>在那之后你可以检查。
https://stackoverflow.com/questions/56239054
复制相似问题