3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

MavenでJDKを指定する

Posted at
pom.xml
  <profiles>
    <profile>
      <id>profile_id_01</id>
      <activation>
        <jdk>1.7</jdk>
      </activation>
    </profile>
  </profiles>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

プロファイルとは環境に依存する設定をするためのもの。
activation:このプロファイルが有効になる条件
build:ビルド時の設定
maven-compiler-plugin:maven-compiler-pluginの詳細な説明
このプラグインでビルド時のJDKを設定できるみたい。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?