我是Java的新手
我一直在尝试编译我的开源应用程序
具有提供的步骤
Import Project from Maven
1. Start IntelliJ IDEa.
2. In the "Quick Start" menu, select "Import Project".
This will open a "Select File or Directory to Import" dialog.
3. Browse to your local cTakes repository root directory and select the pom.xml file.
4. Click "Ok".
This will open an "Import Project from Maven" dialog.
5. Make sure the "Search for projects recursively" box is selected, just in case any cTakes modules are not in the pom.
6. Make sure that "Create IntelliJ IDEa modules for aggregator projects" is not selected.
If you plan to add new module, 'disable' a present cTakes module or make other changes to the main pom.xml, check the "Import Maven projects automatically" box.
See also: http://www.jetbrains.com/idea/webhelp/maven-importing.html
7. Make sure that "Create module rgoups for multi-module Maven projects" is not selected.
8. Make sure that "Keep source and test folders on reimport is selected.
9. Make sure that "Exclude build directory (%PROJECT_ROOT%/target)" is selected.
10. Make sure that "Use Maven output directories" is selected.
11. Make sure that the "Generated sources folders" option "Detect automatically" is selected.
12. For the "Phase to be used for folders update" the default option "process-resources" should be fine.
13. For the "Automatically download" options, you may select what you like, but be wary that if broken code has been checked in you may need to revert manually.
14. The default "Dependency types" are fine.
15. Click "Environment settings...".
This will open a dialog that can be used to set options about the Maven environment.
16. The default maven environment settings should be fine. If $M2_HOME is not set in your environment you may select a "Maven home directory", but it is better to set $M2_HOME in your environment.
17. Click "Next".
This will inspect the cTakes Maven settings and search for profiles. It should display a dialog with the possible cTakes profiles.
If you plan to run the UIMA CVD or CPE then select the appropriate profile. Neither is necessary
18. Click "Next".
This will open an "Import" dialog with the current version of cTakes displayed.
19. Click "Next".
This will open a dialog allowing you to select a Java SDK version.
20. Click the "+" button in the top left.
This will display a drop-down box with options for an SDK.
21. Select "JDK".
This will open a dialog to select a Java JDK directory.
22. Navigate to a directory with a JDK version 1.8 or later and click "Ok".
This will display a listing of the file paths associated with the selected JDK.
23. Click "Next".
24. Click "Ok/Next"
The project will load. This may take a while.
25. Important: If you are asked about adding any .iml files to svn, click "No".
26. You should now see the full cTakes project structure in IntelliJ.
我完成了第4步
但在我的情况下,步骤5不存在
我的意思是在第5步
5。确保已选中“递归搜索项目”框,以防万一cTakes模块不在pom中。
我没有选择,它立即将我带到IntelliJ项目
我得到这个屏幕
我完成后,它会带我到这里
我使用的是旧版本吗?或做错了什么?
如何按照说明建议获取Maven选项?
答案 0 :(得分:2)
您似乎处在一个独特的位置,其中项目的导入和递归扫描都具有适用于您的用例的Just Worked™。
鉴于IntelliJ IDEA 2019.3于2019年11月底发布,我没有理由确信这些说明是在11月底到现在之间编写或修改的,因此很可能是如果您看到的说明过时了。
可以肯定的是,您的子项目也可以构建。在右侧,您有一个Maven项目列表。其中任何一个都应该是子项目。确保任何Maven构建命令(例如public class MainActivity extends AppCompatActivity {
// Set the dimensions from the webView page
@JavascriptInterface
public void showToast(int width, int height) {
Toast.makeText(this, "" + width + "x" + height, Toast.LENGTH_SHORT).show();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
WebView webView = findViewById(R.id.main_web_view);
WebSettings webSettings = webView.getSettings();
webSettings.setJavaScriptEnabled(true);
webView.addJavascriptInterface(this, "Android");
}
}
)都在该子项目的上下文中执行。