ホームページ >Java >&#&チュートリアル >Maven プロジェクトで発生する問題を解決する

Maven プロジェクトで発生する問題を解決する

PHP中文网
PHP中文网オリジナル
2017-06-20 16:28:521779ブラウズ

1. 新しく作成したサーブレット ファイル (hibernate.cfg.xml) を開き、ヘッダー ファイルを


"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

2. 開きます。プロジェクトが存在するディレクトリ .settings フォルダー

2.1 プロジェクトの設定を変更し、プロジェクトの .settings ディレクトリにある org.eclipse.jdt.core.prefs を開きます (NOTEPAD++ などのツールを開きます)

1.5 を次のように変更します1.8、例:

1 eclipse.preferences.version=12 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled3 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.84 org.eclipse.jdt.core.compiler.compliance=1.85 org.eclipse.jdt.core.compiler.problem.assertIdentifier=error6 org.eclipse.jdt.core.compiler.problem.enumIdentifier=error7 org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning8 org.eclipse.jdt.core.compiler.source=1.8
コードを表示

2.2org.eclipse.wst.common.project.facet.core.xmlを開く

Put に変更し、 に変更します。 facet="jst.web " version="3.0"/>

1 <?xml  version="1.0" encoding="UTF-8"?>2 <faceted-project>3   <fixed></fixed>4   <installed></installed>5   <installed></installed>6   <installed></installed>7   <installed></installed>8   <installed></installed>9 </faceted-project>
コードを表示

3. 依存関係を保存するpom.xmlファイルを開き、下部を変更します


D5.22hotai

for

 1  <build> 2     <finalname>D5.22hotai</finalname> 3      <plugins>  
 4         <plugin>  
 5             <groupid>org.apache.maven.plugins</groupid>  
 6             <artifactid>maven-compiler-plugin</artifactid>  
 7             <version>3.3</version>  
 8             <configuration>  
 9                 <!-- 指定source和target的版本 -->                 
10                 <source>1.8</source>  
11                 <target>1.8</target>  
12             </configuration>  
13         </plugin>  
14     </plugins>  
15   </build>
コードを表示

4. Eclipseを再起動します。または、右クリックしてプロジェクト Maven→ プロジェクトの更新...を選択します

以上がMaven プロジェクトで発生する問題を解決するの詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。

声明:
この記事の内容はネチズンが自主的に寄稿したものであり、著作権は原著者に帰属します。このサイトは、それに相当する法的責任を負いません。盗作または侵害の疑いのあるコンテンツを見つけた場合は、admin@php.cn までご連絡ください。