我正在使用maven-shade-plugin在我的构建的包阶段重新定位一些包.我也使用maven-bundle-plugin来生成清单.问题是bundle插件在shade插件之前运行(在进程类阶段),并且在生成的manifest的导出中不包含任何阴影包.
我怎样才能使这两个插件彼此玩得很好,这样我的重定位包就像bundle插件一样对待任何其他包?
-
根据要求,我的POM的Shade和bundle部分:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
<configuration>
<filters>
<filter>
<artifact>cglib:cglib</artifact>
<includes>
<include>net/sf/cglib/core/**</include>
<include>net/sf/cglib/proxy/**</include>
</includes>
</filter>
</filters>
<relocations>
<relocation>
<pattern>net.sf.cglib</pattern>
<shadedPattern>org.modelmapper.internal.cglib</shadedPattern>
</relocation>
<relocation>
<pattern>org.objectweb.asm</pattern>
<shadedPattern>org.modelmapper.internal.asm</shadedPattern>
</relocation>
</relocations>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<executions>
<execution>
<id>bundle-manifest</id>
<phase>process-classes</phase>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
<configuration>
<instructions>
<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
<Export-Package>
org.modelmapper,
org.modelmapper.builder,
org.modelmapper.config,
org.modelmapper.convention,
org.modelmapper.spi
</Export-Package>
<Private-Package>
org.modelmapper.internal.**
</Private-Package>
<Import-Package>
*
</Import-Package>
<Include-Resource>
{maven-resources},
{maven-dependencies}
</Include-Resource>
</instructions>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
采取从这里
如何使用共享网络在 docker 容器内端到端地启动 LXC 容器?理想情况下,我想使用 Debian 或 Ubuntu 来完成此操作。我在尝试这样做时发现了一些问题:
lxcbr0永远不会创建桥接器。部分解决方法是手动创建桥。cgroupfs failed to detect cgroup metadata,即使我通过手动挂载 cgroupmount -n -t tmpfs -o uid=0,gid=0,mode=0755 cgroup /sys/fs/cgroup使用Bootstrap 3时,nav-tabs行以最宽行倾向于顶部而较短行位于底部的方式进行换行:
这使得标签看起来很笨拙且不平衡.有没有办法可以修改导航标签,以便行底部更宽?更像是这样的:
这是产生第一张图像的JSFiddle.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<div class="container">
<div class="row">
<div class="col-sm-6">
<ul class="nav nav-tabs">
<li class="active"><a href="#">Foo Bar 1</a></li>
<li><a href="#">FooBar 2</a></li>
<li><a href="#">FooBar 3</a></li>
<li><a href="#">FooBar 4</a></li>
<li><a href="#">FooBar 5</a></li>
<li><a href="#">FooBar 6</a></li>
<li><a href="#">FooBar 7</a></li>
<li><a href="#">FooBar 8</a></li>
<li><a href="#">FooBar 9</a></li>
<li><a href="#">FooBar 10</a></li>
<li><a href="#">FooBar 11</a></li>
<li><a href="#">FooBar 12</a></li>
<li><a href="#">FooBarBaz 13</a></li>
<li><a href="#">FooBarBaz 14</a></li>
</ul>
</div>
</div>
</div>
Run Code Online (Sandbox Code Playgroud)