小编fhd*_*fhd的帖子

如何在Safari Reader中的每个图像后强制换行?

我无法在本地HTML文件中激活Safari Reader,所以我不能给你一个运行的例子但只描述我的问题:

我的博客文章的标记基本上是这样的:

<div class="post">
 <div class="post-header">Hello, World</div>
 <div class="post-body">
  <p>Look at this picture:</p>
  <p><img src="http://37prime.com/news/wp-content/uploads/2008/03/safari_icon.png"/></p>
  <p>Isn't that a nice picture?</p>
 </div>
</div>
Run Code Online (Sandbox Code Playgroud)

这在所有浏览器中都是预期的,包括Safari.然而,在Safari阅读器中,第三段"这不是一张好照片吗?" 漂浮在图像周围,而不是在它自己的段落上.

有没有人遇到过类似的问题?

html safari

8
推荐指数
3
解决办法
2万
查看次数

如何使用Maven将目录添加到JAR文件?

我正在尝试使用Maven将Web应用程序打包为可运行的JAR文件.该JAR-与依赖性组装照顾,包括所有的相关性,但我仍然需要包括的src/main/webapp的.

我设法使用自定义程序集将目录添加到我的JAR:

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
                              http://maven.apache.org/xsd/assembly-1.1.2.xsd">
    <id>webapp</id>
    <formats>
        <format>jar</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <fileSets>
        <fileSet>
            <directory>src/main/webapp</directory>
            <outputDirectory>/webapp</outputDirectory>
        </fileSet>
    </fileSets> 
</assembly>
Run Code Online (Sandbox Code Playgroud)

它确实有效,甚至可以将这个程序集与jar-with-dependencies一起使用.但是,最终的JAR包含webapp目录和所有依赖项,但不包含项目的类文件.我的装配显然正在移除它们.

我可以在程序集中保留我自己项目的类文件吗?或者是否有另一种方法将目录添加到JAR?

java jar maven

3
推荐指数
1
解决办法
2488
查看次数

标签 统计

html ×1

jar ×1

java ×1

maven ×1

safari ×1