`

maven 命令

阅读更多

mvn下载源码

dependency:sources

 

下载地址=https://repo.maven.apache.org/maven2/+groupId+artifactId(.变/)

https://repo.maven.apache.org/maven2/net/sf/json-lib/json-lib/2.4/json-lib-2.4-jdk15.jar

<dependency>

    <groupId>net.sf.json-lib</groupId>

    <artifactId>json-lib</artifactId>

    <version>2.4</version> 

</dependency>

 

maven 命令,默认1.5编译。修改为指定的。

<plugins>

<plugin>

<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>

<version>3.1</version>

<configuration>

<source>1.8</source>

<target>1.8</target>

</configuration>

</plugin>

</plugins>

 

http://blog.csdn.net/lzj0470/article/details/42292021 //未验证

<profile>  

    <id>jdk-1.7</id>  

  

    <activation>  

      <jdk>1.7</jdk>  

    </activation>  

  

    <!--<repositories>  

      <repository>  

        <id>jdk17</id>  

        <name>Repository for JDK 1.7 builds</name>  

        <url>http://www.myhost.com/maven/jdk17</url>  

        <layout>default</layout>  

        <snapshotPolicy>always</snapshotPolicy>  

      </repository>  

    </repositories>-->  

 <properties>  

<maven.compiler.source>1.7</maven.compiler.source>  

<maven.compiler.target>1.7</maven.compiler.target>  

<maven.compiler.compilerVersion>1.7</maven.compiler.compilerVersion>  

 </properties>  

  </profile>  

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics