小编Gav*_*n S的帖子

如何从pom编辑器中删除org.apache.maven.plugin.jar.JarMojo错误

我正在使用Spring Tool Suite 3.1.0.RELEASE,我创建的每个项目中的pom.xml文件都有一个名为"org.apache.maven.plugin.jar.JarMojo"的错误.没有进一步的错误细节

创建新的Spring Utility项时,即使在自动生成的pom.xml中也会出现此错误.

它在构建期间不会导致任何错误,它仅显示在IDE中(pom编辑器中的Overview选项卡顶部和pom.xml的第一行).

org.apache.maven.plugin.jar.JarMojo错误截图

以前有人见过这个,知道如何解决它吗?谷歌没有帮助.

这是我的Spring Tool Suite为Spring Utility Project生成的默认pom.xml(它会导致所描述的错误):

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.springframework.samples.spring</groupId>
    <artifactId>spring-utility</artifactId>
    <version>1.0.0.CI-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name>Spring Utility</name>
    <url>http://www.springframework.org</url>
    <description>
        <![CDATA[
      This project is a minimal jar utility with Spring configuration.
    ]]>
    </description>
    <properties>
        <maven.test.failure.ignore>true</maven.test.failure.ignore>
        <spring.framework.version>3.0.6.RELEASE</spring.framework.version>
    </properties>   <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.7</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${spring.framework.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring.framework.version}</version>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.14</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration> …
Run Code Online (Sandbox Code Playgroud)

java spring pom.xml maven

6
推荐指数
1
解决办法
6064
查看次数

从WPF中的包URI打开文件

我希望从应用程序包中打开一个.csv文件来进行一些单元测试.所以,我真的很喜欢,是一些模拟File.ReadAllText(string path)这是不是X.ReadAllText(Uri uri).我还没有找到这个.

有没有人知道是否可以从包中的文件中读取文本/字节(不介意哪些)而不首先将此文件编译到磁盘?

哦,顺便说一句,File.ReadAllText(@"pack://application:,,,/SpreadSheetEngine/Tests/Example.csv")对我来说不起作用..我已经在做var app = new Application()诀窍,以确保我在单元测试期间启动了一个包.

.net c# file-io

5
推荐指数
2
解决办法
8408
查看次数

如何在RenderTargetBitmap中使用PixelFormats.IndexedX?

我期待呈现DrawingVisual(在示例性视觉)到使用位图RenderTargetBitmap的观点来设置此位图作为背景的Canvas,如下:

var bmp = new RenderTargetBitmap(2000, 50, 120, 96, PixelFormats.Indexed2);
bmp.Render(visual);
var brush = new ImageBrush(bmp) { Stretch = Stretch.Fill };
Canvas.Background = brush;
Run Code Online (Sandbox Code Playgroud)

当使用PixelFormats.Default最后一个参数时RenderTargetBitmap,图像按预期呈现.然而,当我选择PixelFormats.Indexed2(或任何的PixelFormats.IndexedX),我的代码似乎退出方法没有例外,该bmp.Render线不会被调用,因此在图像上没有显示Canvas.

如何使用IndexedX像素格式RenderTargetBitmap?或者还有其他方法可以减少图像的内存占用量吗?它只使用三种颜色,所以使用调色板而不是32位RGB似乎是要走的路.

wpf pixelformat rendertargetbitmap

5
推荐指数
1
解决办法
3073
查看次数

标签 统计

.net ×1

c# ×1

file-io ×1

java ×1

maven ×1

pixelformat ×1

pom.xml ×1

rendertargetbitmap ×1

spring ×1

wpf ×1