我打包我的基于Maven的Spring应用程序:
mvn install-DskipTests -Peverything.
Run Code Online (Sandbox Code Playgroud)
出现了一些奇怪的事情.在生成的jar的META-INF中,我找到了重复的pom.xml和pom.properties文件.有人可以解释一下吗?谢谢.

这是提取的pom.xml
<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>
<groupId>com.abc.xyz</groupId>
<artifactId>migrate-app</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>migrate-app</name>
<url>http://maven.apache.org</url>
<dependencies>
..
</dependencies>
<profiles>
<profile>
<id>everything</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
Run Code Online (Sandbox Code Playgroud)
命令输出:
mvn -version
Run Code Online (Sandbox Code Playgroud)
Apache Maven 3.0.4(r1232337; 2012-01-17 15:44:56 + 0700)Maven home:C:\ apache-maven-3.0.4\bin .. Java版本:1.6.0_30,供应商:Sun Microsystems Inc .Java home:C:\ Program Files(x86)\ Java\jdk1.6.0_30\jre默认语言环境:en_US,平台编码:Cp1252操作系统名称:"windows 7",版本:"6.1",arch:"x86",家庭:"窗户"
在Eclipse中,如何在编辑器(PyDev插件)中更改Python代码的默认字体?
我导航到菜单窗口 → 首选项 → 常规 → 外观 → 颜色和字体,但我找不到哪个项会影响Python代码字体.
我在命令行中运行"mvn install"并被下面的错误卡住了.
Caused by: org.apache.maven.project.DependencyResolutionException: Could not resolve dependencies for project com.detux.vios:common-entity:jar:2_0_0:
Could not find artifact org.hibernate:hibernate-entitymanager:jar:3.6.2.FINAL in central (http://repo.maven.apache.org/maven2)
Run Code Online (Sandbox Code Playgroud)
我检查m2\repository\org\hibernate\hibernate-entitymanager\3.6.2.FINAL \,这里是它的内容

我还尝试将新的远程存储库添加到pom.xml,但它仍然无效
<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>common</artifactId>
<groupId>com.detux.vios</groupId>
<version>2_0_0</version>
</parent>
<groupId>com.detux.vios</groupId>
<artifactId>common-entity</artifactId>
<version>${common.version}</version>
<name>Vios Common entity</name>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>com.detux.vios</groupId>
<artifactId>common-util</artifactId>
<version>${common.version}</version>
</dependency>
</dependencies>
<properties>
</properties>
<repositories>
<repository>
<id>repository.jboss.org-public</id>
<name>JBoss repository</name>
<url>http://repository.jboss.org/nexus/content/groups/public</url>
</repository>
</repositories>
</project>
Run Code Online (Sandbox Code Playgroud)
下面是父项目的pom.xml
<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>
<groupId>com.detux.vios</groupId>
<artifactId>common</artifactId>
<version>2_0_0</version>
<packaging>pom</packaging>
<name>Vios Common</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId> …Run Code Online (Sandbox Code Playgroud) 我正在使用hsqldb作为基于Spring的java webapp.我将数据库文件(mydb.lck,mydb.properties,..)放在src\main\java\data文件夹中,以便它们发布到WEB-INF\classes\data中.
在数据源配置中,我指定了JVM工作目录的这个相对路径.按照hsqldb文档中的指导.
portal.jdbc.url=jdbc:hsqldb:file:/data/mydb (这个分隔符适合Windows吗?)
但是,Spring似乎没有找到这条道路而且坚持要求
java.sql.SQLSyntaxErrorException: user lacks privilege or object not found: CUSTOMER
org.hsqldb.jdbc.Util.sqlException(Unknown Source)
但是,如果我指定一个绝对路径,它可以完美地工作
portal.jdbc.url=jdbc:hsqldb:file:d:\\TomcatServer\\apache-tomcat-7.0.10\\wtpwebapps\\myportal-app\\data\\mydb
我是否应该错过了解Web应用程序上的JVM工作目录?任何帮助表示赞赏.