几乎是标题问题。我还发现了其他几个问题,但是它们有点老了,我不知道是否有一个值得一提的新解决方案。
因此,我正在使用 tutorials 用于java akka库。我已经复制了该项目,并用Emacs打开了该项目。目前,在 pom.xml
中指定了要运行的主类:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath />
<argument>com.example.AkkaQuickstart</argument> <!-- HERE -->
</arguments>
</configuration>
</plugin>
但是如果我想拥有两个或多个主要类,并像Intellij ?现在,这不是一个糟糕的问题,而是一个小问题,但欢迎提出建议。
- 我应该从命令行指定主类吗?使用
exec:java
或 exec:exec
? pom.xml
的哪些部分我应该发表评论?
- 我应该使用?
- 顺便说一句,由于我想要类似于Intellij的东西,您知道Intellij实际上是如何做到的吗?
感谢您的时间和帮助!
Pretty much the title question. I have found several other questions on SO, but they're a bit old and I don't know if there's a new solution worth mentioning.
So I am working with the tutorials for the Java Akka library. I have copied the project and opened it with Emacs. Right now, the main class to be run is specified in the pom.xml
:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath />
<argument>com.example.AkkaQuickstart</argument> <!-- HERE -->
</arguments>
</configuration>
</plugin>
But what if I wanted to have two or more main classes, and run them separately as in IntelliJ? Now, this is not as much an Emacs question as a Maven one, but suggestions are welcome.
- Should I specify the main class from command line? Using
exec:java
or exec:exec
? What parts of pom.xml
should I comment out?
- Should I use a workaround like in this question?
- By the way, since I want something similar to IntelliJ, do you know how IntelliJ actually does this?
Thanks for your time and help!
发布评论