在我的Eclipse Preferences -> Java -> Editor -> Content Assist -> Advanced设置中,我看到以下内容:
我尝试使用谷歌搜索(单独)"Java非类型提案"和"Java提案(以任务为中心)",但没有找到任何描述它们.
匹配的条目/Java ((Non-)?Type)? Proposals/对我有意义,但其他条目没有.
那么,其他人做了什么?
你好,
我尝试在maven构建过程中运行main方法.因此,我将exec-maven-plugin和以下代码段添加到我的pom.xml中
<plugin>
<!-- http://www.vineetmanohar.com/2009/11/3-ways-to-run-java-main-from-maven/ -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>compile-reports</id>
<phase>compile</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>at.xyz.dls.util.JasperReportCompiler</mainClass>
</configuration>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
当我从命令行调用它时,主类存在并且也被执行:
mvn exec:java -Dexec.mainClass="at.xyz.dls.util.JasperReportCompiler"
Run Code Online (Sandbox Code Playgroud)
我还尝试创建一个空的新项目进行测试,如果pom中的其他依赖性导致问题,但没有成功.在〜/ .m2文件夹的maven settings.xml中,只有镜像条目,但没有可能导致问题的配置文件或其他任何内容.
它只是没有启动它.当我在org.codehouse下删除我的repo中的所有工件时,它没有下载exec-maven-plugin.只有当我进行命令行调用时.
任何提示?提前致谢!
编辑:我忘了提到我用过"mvn clean install".所以它应该已经通过了编译阶段......
编辑:
我做了什么:
据我所知,调用"mvn clean install"应该通过测试阶段(测试执行...),因此应该调用exec-maven-plugin,它应该执行main方法.我对吗?
D:\Eclipse-3.6.1-JSF\ws\exec-test>java -version java version "1.6.0_21" Java(TM) SE Runtime Environment (build 1.6.0_21-b07) Java HotSpot(TM) Client VM (build 17.0-b17, mixed mode, sharing)
D:\Eclipse-3.6.1-JSF\ws\exec-test>mvn -version Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200) Java version: 1.6.0_21 Java home: C:\Programme\Java\jdk1.6.0_21\jre …Run Code Online (Sandbox Code Playgroud)