我正在努力学习本教程:https://docs.jboss.org/author/display/AS7/Helloworld快速入门
但在遵循清理构建包的简单说明时,会出现构建错误:
gert@gert-VirtualBox:~/workspace/jboss-eap-6.1.0。GA quickstarts/helloworld$mvn清洁软件包[信息]项目扫描。。。[错误]生成无法读取1个项目-
我还没有编辑pom。xml文件——这难道不管用吗?
我在谷歌上搜索了一下,发现了这个:https://community.jboss.org/message/762371#762371但我好像哪里都没有设置文件?
求求你,任何帮助都将不胜感激!
格万托
POM文件:
http://maven.apache.org/maven-v4_0_0.xsd"
<groupId>org.jboss.as.quickstarts</groupId>
<artifactId>jboss-as-helloworld</artifactId>
<version>7.1.2-SNAPSHOT</version>
<packaging>war</packaging>
<name>JBoss AS Quickstarts: Helloworld</name>
<description>JBoss AS Quickstarts: Helloworld</description>
<url>http://jboss.org/jbossas</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<distribution>repo</distribution>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
</license>
</licenses>
<properties>
<!-- Explicitly declaring the source encoding eliminates the following
message: -->
<!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- JBoss dependency versions -->
<version.org.jboss.as.plugins.maven.plugin>7.3.Final</version.org.jboss.as.plugins.maven.plugin>
<!-- <version.org.jboss.spec.jboss.javaee.6.0>3.0.2.Final</version.org.jboss.spec.jboss.javaee.6.0>
--
<!-- other plugin versions -->
<version.compiler.plugin>2.3.1</version.compiler.plugin>
<version.war.plugin>2.1.1</version.war.plugin>
<!-- maven-compiler-plugin -->
<maven.compiler.target>1.6</maven.compiler.target>
<maven.compiler.source>1.6</maven.compiler.source>
</properties>
<dependencyManagement>
<dependencies>
<!-- Define the version of JBoss' Java EE 6 APIs we want to use -->
<!-- JBoss distributes a complete set of Java EE 6 APIs including
a Bill of Materials (BOM). A BOM specifies the versions of a "stack" (or
a collection) of artifacts. We use this here so that we always get the correct
versions of artifacts. Here we use the jboss-javaee-6.0 stack (you can
read this as the JBoss stack of the Java EE 6 APIs). You can actually
use this stack with any version of JBoss AS that implements Java EE 6, not
just JBoss AS 7! -->
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>${version.org.jboss.spec.jboss.javaee.6.0}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Import the CDI API, we use provided scope as the API is included in JBoss AS 7 -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the Common Annotations API (JSR-250), we use provided scope
as the API is included in JBoss AS 7 -->
<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.1_spec</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the Servlet API, we use provided scope as the API is included in JBoss AS 7 -->
<dependency>
<groupId>org.jboss.spec.javax.servlet</groupId>
<artifactId>jboss-servlet-api_3.0_spec</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<!-- Set the name of the war, used as the context root when the app
is deployed -->
<finalName>jboss-as-helloworld</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
<configuration>
<!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! -->
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<!-- JBoss AS plugin to deploy war -->
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>${version.org.jboss.as.plugins.maven.plugin}</version>
</plugin>
<!-- Compiler plugin enforces Java 1.6 compatibility and activates
annotation processors -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.compiler.plugin}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
</plugins>
</build>
您可能需要创建一个(有关更多详细信息,请参阅本页):
有两个位置可以设置。xml文件可能存在:
但是我觉得问题是依赖项的版本字符串。硬编码版本,然后再试一次:
<dependency>
<groupId>org.jboss.spec</groupId>
<artifactId>jboss-javaee-6.0</artifactId>
<version>3.0.2.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
取消对以下行的注释也可能有效:
<version.org.jboss.spec.jboss.javaee.6.0>3.0.2.Final
</version.org.jboss.spec.jboss.javaee.6.0>
如果您从github存储库克隆快速入门,例如:
git clone --recursive git://github.com/jboss-jdf/jboss-as-quickstart.git --branch jdf-2.1.9.Final
见:http://www.jboss.org/jdf/quickstarts/get-started/
然后你会发现一个maven设置。根目录中的xml文件(./jboss as quickstart/settings.xml)
对于每个示例,使用该设置文件运行maven:
cd jboss-as-quickstart
cd helloworld
mvn -s ..\settings.xml compile
见:http://www.jboss.org/jdf/quickstarts/jboss-as-quickstart/#configure-马文
好的,下面是修复它的方法:
在pom中注释掉了这一行。xml:(我以为这是一种自动插入/替换为eclipse/something的变量,但事实并非如此):
<!-- <version>${version.org.jboss.spec.jboss.javaee.6.0}</version> -->
替换为:
<version>3.0.2.Final</version>
它现在可以构建了,我可以很好地部署它,感谢Nishant的帮助!
我正在TFS2015中运行一个构建,我得到了这个错误: 在org.apache.maven.lifecycle.internal.mojoexecutor.execute(mojoexecutor.java:217) 原因:org.apache.maven.plugin.MojoExecutionException:编译时出现致命错误 222 2018-07-25T11:22:37.0150577
[错误]D:...\spark-test\java-gett-start\src\main\java\main.java:[73,35]错误:源代码1.5中不支持lambda表达式 这是一个heroku示例java项目,在System.properties文件中设置了java版本:java.runtime.version=1.8 具体行如下:
----maven-enforcer-plugin:1.0.1:enforce(default)@cli---添加ignore:org.eclipse.jetty.spdy.* ----maven-enforcer-plugin:1.0.1:enforce(enforce-bang-dependencies)@cli-- ---build-helper-maven-plugin:1.7:times
我是第一次使用Jenkins/Maven,并遵循这两个教程编写Jenkins插件:https://wiki.jenkins-ci.org/display/JENKINS/Plugin教程和http://cleantestcode.wordpress.com/2013/11/03/how-to-write-a-jenkins-plugin-part-1/. 到目前为止,我在Windows上的提示下输
我正在尝试为我的spring-boot应用程序构建一个docker映像。这是我的DockerFile: 这是我的pom.xml文件,其中有我的io.fabric8插件: 当我试图使用构建docker映像时,我得到一个错误: 无法执行目标IO.fabric8:docker-maven-plugin:0.15.3:在项目详细信息上生成(default-cli)app:执行目标IO.fabric8:do
我正在尝试使用Maven构建Geonetwork。源代码来自这里:https://github.com/geonetwork/core-geonetwork/tree/3.10.x 我按照本教程构建Geonetwork:https://geonetwork-opensource.org/manuals/trunk/eng/users/tutorials/introduction/deploymen