在eclipse中怎么安装maven插件啊,是不是就是网上说的m2eclipse啊

解决方案 »

  1.   

    http://www.open-open.com/open129704.htm  这个网站有说明,去试试看行不行嘛。
      

  2.   

    有直接解压到ECLIPSE里的,也有网上下载自动安装的.
    我觉得不用插件一样用得挺好的.
      

  3.   

    下载maven3.x版本
    正确地配置环境变量M2_HOME,指向maven的安装目录
    将maven安装目录下的bin目录添加到path中
    在maven的本地仓库中建立Settings.xml文件,复制下面代码中的内容到文件中
    <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                          http://maven.apache.org/xsd/settings-1.0.0.xsd">
      <mirrors>
    <mirror>
          <id>Nexus</id>
          <name>Nexus Public Mirror</name>
          <url>http://211.99.148.245:8081/nexus/content/groups/public</url>
          <mirrorOf>*</mirrorOf>
        </mirror>
      </mirrors>  <servers>
    <server>
    <id>snapshot</id>
    <username>deployment</username>
    <password>deploy</password>
    </server> <server>
    <id>internal</id>
    <username>deployment</username>
    <password>deploy</password>
    </server> <server>
    <id>nexus-releases</id>
    <username>deployment</username>
    <password>deploy</password>
    </server> <server>
    <id>nexus-snapshots</id>
    <username>deployment</username>
    <password>deploy</password>
    </server>
    </servers> <profiles>
    <!--定义核心库 maven镜像,由maven-proxy实现 -->
    <profile>
    <id>central-repo</id>
    <repositories>
    <repository>
    <id>central</id>
    <name>Internal Repository</name>
    <url>http://211.99.148.245:8081/nexus/content/groups/public</url>
    </repository>
    </repositories>
    <pluginRepositories>
    <pluginRepository>
    <id>central</id>
    <name>Internal Repository</name>
    <url>http://211.99.148.245:8081/nexus/content/groups/public</url>
    </pluginRepository>
    </pluginRepositories>
    </profile> <!--定义内部库,包括公司的所有release版本 -->
    <profile>
    <id>internal</id>
    <repositories>
    <repository>
    <id>internal</id>
    <name>Internal Repository</name>
    <url>http://211.99.148.245:8081/nexus/content/repositories/releases/</url>
    <releases>
    <enabled>true</enabled>
    <updatePolicy>interval:60</updatePolicy>
    <checksumPolicy>warn</checksumPolicy>
    </releases>
    </repository>
    </repositories>
    <pluginRepositories>
    <pluginRepository>
    <id>internal</id>
    <name>Internal Plugin Repository</name>
    <url>http://211.99.148.245:8081/nexus/content/repositories/releases/</url>
    <releases>
    <enabled>true</enabled>
    <updatePolicy>interval:60</updatePolicy>
    <checksumPolicy>warn</checksumPolicy>
    </releases>
    </pluginRepository>
    </pluginRepositories>
    </profile> <!--定义内部开发库 ,也可以合并snapshot和release -->
    <profile>
    <id>snapshot</id>
    <repositories>
    <repository>
    <id>snapshot</id>
    <name>Internal Repository</name>
    <url>http://211.99.148.245:8081/nexus/content/repositories/snapshots/</url>
    <snapshots>
    <enabled>true</enabled>
    <updatePolicy>interval:60</updatePolicy>
    <checksumPolicy>warn</checksumPolicy>
    </snapshots>
    </repository>
    </repositories>
    <pluginRepositories>
    <pluginRepository>
    <id>snapshot</id>
    <name>Internal Plugin Repository</name>
    <url>http://211.99.148.245:8081/nexus/content/repositories/snapshots/</url>
    <snapshots>
    <enabled>true</enabled>
    <updatePolicy>interval:60</updatePolicy>
    <checksumPolicy>warn</checksumPolicy>
    </snapshots>
    </pluginRepository>
    </pluginRepositories>
    </profile>
    </profiles>

    <!-- 激活相应得配置 -->
    <activeProfiles>
    <activeProfile>central-repo</activeProfile>
    <activeProfile>snapshot</activeProfile>
    <activeProfile>internal</activeProfile>
    </activeProfiles>
    </settings>
    修改eclipse中自带的maven,使其指向自己安装的maven路径
    新建一个target platform,指向
    建立一个新的运行实例
    实例的基本信息和启动参数
    实例的参数信息
    -Ddatasource.url=jdbc:oracle:thin:@127.0.0.1:1521:semip 
    -Dreport.location=D:/Java/OSGI_jars/configuration 
    -Dlog4j.configuration=file:D:/Java/Workspace-bop2/configuration/log4j.properties
    -Dbundles.location=D:/Java/OSGi_Jars2/Bundles
    -Ddatasource.username=user
    -Ddatasource.password=123
    其它信息
    选中Setting页签下的
    运行平台