gpt4 book ai didi

maven - Ubuntu 上的 NetBeans : Project's pom. xml 文件包含无效的 xml 内容。请在继续之前修复文件

转载 作者:行者123 更新时间:2023-12-04 18:44:07 25 4
gpt4 key购买 nike

我的名字是 Angela,我正在开发一个 Cytoscape 应用程序。

我正在尝试访问我的 maven 项目属性,但它返回此错误:“项目的 pom.xml 文件包含无效的 xml 内容。请在继续之前修复文件。”
当我构建 jar 文件并在 Cytoscape 上执行它时,我没有任何问题。

你能帮我理解错误是什么吗?

这是我的 pom.xml 文件。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>VF3Plugin</artifactId>
<groupId>org.cytoscape</groupId>
<version>1.0-SNAPSHOT</version>
</parent>

<groupId>org.cytoscape</groupId>
<artifactId>VF3</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>bundle</packaging>

<name>VF3 OSGi Bundle</name>

<properties>
<bundle.symbolicName>org.cytoscape.vf3-bundle</bundle.symbolicName>
<bundle.namespace>org.cytoscape.vf3</bundle.namespace>
<cytoscape.api.version>3.7.2</cytoscape.api.version>

<maven-bundle-plugin.version>2.5.3</maven-bundle-plugin.version>
<osgi.api.version>4.2.0</osgi.api.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<!-- Links to the Cytoscape Maven repositories. -->
<repositories>
<repository>
<id>cytoscape_snapshots</id>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
<name>Cytoscape Snapshots</name>
<url>http://nrnb-nexus.ucsd.edu/repository/cytoscape_snapshots/</url>
</repository>
<repository>
<id>cytoscape_releases</id>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
<name>Cytoscape Releases</name>
<url>http://nrnb-nexus.ucsd.edu/repository/cytoscape_releases/</url>
</repository>
</repositories>

<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.5.3</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-Activator>org.cytoscape.vf3menu.CyActivator</Bundle-Activator>
<Export-Package/>
<Embed-Dependency>*;scope=!provided|test;groupId=!org.cytoscape</Embed-Dependency>
<Embed-Transitive>true</Embed-Transitive>
</instructions>
</configuration>
</plugin>
</plugins>
</build>


<dependencies>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>swing-application-api</artifactId>
<version>${cytoscape.api.version}</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>work-api</artifactId>
<version>${cytoscape.api.version}</version>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>service-api</artifactId>
<version>${cytoscape.api.version}</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-api</artifactId>
<version>1.5.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>service-api</artifactId>
<version>${cytoscape.api.version}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.cytoscape</groupId>
<artifactId>io-api</artifactId>
<version>3.7.1</version>
</dependency>


<dependency>
<groupId>vf3jni</groupId>
<artifactId>vf3jni.vf3jni</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.4</version>
</dependency>

</dependencies>

</project>
<profiles>
<profile>
<id>build-for-felix</id>
<dependencies>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.main</artifactId>
<version>4.0.3</version>
<scope>provided</scope>
</dependency>
<!-- To include a shell:
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.gogo.shell</artifactId>
<version>0.10.0</version>
</dependency>
-->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>compile</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<pathconvert property="plugins.jars" pathsep="${path.separator}">
<path refid="maven.runtime.classpath" />
<map from="${project.build.directory}${file.separator}classes" to="" />
</pathconvert>
<pathconvert pathsep=" " property="bundles">
<path path="${plugins.jars}" />
<mapper>
<chainedmapper>
<flattenmapper />
<globmapper from="*" to="file:modules/*" casesensitive="no" />
</chainedmapper>
</mapper>
</pathconvert>
<propertyfile file="${project.build.directory}/config.properties">
<entry key="felix.auto.start" value="${bundles} file:modules/${project.build.finalName}.jar" />
<entry key="org.osgi.framework.bootdelegation" value="*" />
</propertyfile>
<copy file="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}" tofile="${project.build.directory}/felix.jar" />
</target>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.3</version>
<executions>
<execution>
<id>create-executable-jar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${basedir}/src/main/assembly/felix.xml</descriptor>
</descriptors>
<finalName>${project.build.finalName}</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>run-on-felix</id>
<dependencies>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.main</artifactId>
<version>4.0.3</version>
<scope>provided</scope>
</dependency>
<!-- org.apache.felix:org.apache.felix.gogo.shell:0.6.1 useless from Maven since stdin is swallowed -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<configuration>
<target>
<property name="vm.args" value="" />
<pathconvert property="plugins.jars" pathsep="${path.separator}">
<path refid="maven.runtime.classpath" />
<map from="${project.build.directory}${file.separator}classes" to="" />
</pathconvert>
<makeurl property="urls" separator=" ">
<path path="${plugins.jars}" />
<path location="${project.build.directory}/${project.build.finalName}.jar" />
</makeurl>
<propertyfile file="${project.build.directory}/run.properties">
<entry key="felix.auto.start" value="${urls}" />
<entry key="felix.auto.deploy.action" value="uninstall,install,update,start" />
<entry key="org.osgi.framework.storage" value="${project.build.directory}${file.separator}felix-cache" />
<entry key="org.osgi.framework.bootdelegation" value="*" />
</propertyfile>
<makeurl property="run.properties.url" file="${project.build.directory}/run.properties" />
<java fork="true" jar="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}">
<sysproperty key="felix.config.properties" value="${run.properties.url}" />
<jvmarg line="${vm.args}" />
</java>
</target>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

谢谢你!

最佳答案

快速浏览后,我觉得这很合理。唯一让我印象深刻的是您的 Export-Package 标记,它是完全合法的 XML,但 eclipse 可能不会期望那里有一个空标记。只需删除空标签(因为它无论如何都不做任何事情),看看eclipse是否更快乐。除此之外,我会尝试剥离你的 pom,直到 eclipse 停止提示以确定它不喜欢什么。

- 小型摩托车

关于maven - Ubuntu 上的 NetBeans : Project's pom. xml 文件包含无效的 xml 内容。请在继续之前修复文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61591525/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com