Maven 例子

<project xmlns="http://maven.apache.org/POM/4.0.0"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 <modelVersion>4.0.0</modelVersion>
 <groupId>com.talgroup</groupId>
 <artifactId>frmwork</artifactId>
        <version>0.2.60</version>
 <name>frmwork</name>
 <packaging>jar</packaging>
 <url>http://com.talgroup.ui</url>
 <build>
 
  <plugins>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
     <source>1.5</source>
     <target>1.5</target>
    </configuration>
   </plugin>

   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-source-plugin</artifactId>
    <executions>
     <execution>
      <id>attach-sources</id>
      <goals>
       <goal>jar</goal>
      </goals>
     </execution>
    </executions>
   </plugin>

   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <configuration>
     <artifactItems>
      <artifactItem>
       <groupId>${project.groupId}</groupId>
       <artifactId>
        ${project.artifactId}
       </artifactId>
       <version>${project.version}</version>
       <type>${project.packaging}</type>
       <overWrite>true</overWrite>
       <outputDirectory>
        ${artifactsDir}
       </outputDirectory>
      </artifactItem>
     </artifactItems>
    </configuration>
   </plugin>
  </plugins>
 </build>
 <dependencies>
  <dependency>
   <groupId>junit</groupId>
   <artifactId>junit</artifactId>
   <version>4.4</version>
   <scope>test</scope>
  </dependency>

  <dependency>
   <groupId>jtestcase</groupId>
   <artifactId>jtestcase</artifactId>
   <version>4.0.0</version>
   <scope>test</scope>
  </dependency>
  <dependency>
   <groupId>jdom</groupId>
   <artifactId>jdom</artifactId>
   <version>1.0</version>
   <scope>test</scope>
  </dependency>
  <dependency>
   <groupId>saxpath</groupId>
   <artifactId>saxpath</artifactId>
   <version>1.0-FCS</version>
   <scope>test</scope>
  </dependency>


  <dependency>
   <groupId>jaxen-jdom</groupId>
   <artifactId>jaxen-jdom</artifactId>
   <version>1.0</version>
   <scope>test</scope>
  </dependency>

  <dependency>
   <groupId>jaxen-core</groupId>
   <artifactId>jaxen-core</artifactId>
   <version>1.0</version>
   <scope>test</scope>
  </dependency>

  <dependency>
   <groupId>jicengine</groupId>
   <artifactId>jicengine</artifactId>
   <version>2.0.0</version>
   <scope>test</scope>
  </dependency>

  <dependency>
   <groupId>easymock</groupId>
   <artifactId>easymock</artifactId>
   <version>2.4</version>
   <scope>test</scope>
  </dependency>

  <!--   
   <dependency>
   <groupId>org.testng</groupId>
   <artifactId>testng</artifactId>
   <version>5.5</version>
   <classifier>jdk15</classifier>
   <scope>test</scope>
   </dependency>   
  -->
  <!--
  <dependency>
   <groupId>activation</groupId>
   <artifactId>activation</artifactId>
   <version>1.1</version>
   <scope>compile</scope>
  </dependency>
  <dependency>
   <groupId>commons-email</groupId>
   <artifactId>commons-email</artifactId>
   <version>1.0</version>
   <scope>compile</scope>
  </dependency>

  <dependency>
   <groupId>mail</groupId>
   <artifactId>mail</artifactId>
   <version>1.0</version>
   <scope>compile</scope>
  </dependency>
   -->
  <dependency>
   <groupId>quartz</groupId>
   <artifactId>quartz</artifactId>
   <version>1.5.2</version>
  </dependency>

  <dependency>
   <groupId>dwr</groupId>
   <artifactId>dwr</artifactId>
   <version>2.0.5</version>
  </dependency>

  <dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring</artifactId>
   <version>2.5</version>
  </dependency>

  <dependency>
   <groupId>org.springframework</groupId>
   <artifactId>spring-test</artifactId>
   <version>2.5</version>
   <scope>test</scope>
  </dependency>

  <dependency>
   <groupId>javax.servlet</groupId>
   <artifactId>servlet-api</artifactId>
   <version>2.4</version>
   <scope>provided</scope>
  </dependency>
  <dependency>
   <groupId>commons-logging</groupId>
   <artifactId>commons-logging</artifactId>
   <version>1.1</version>
   <exclusions>
    <exclusion>
     <groupId>javax.servlet</groupId>
     <artifactId>servlet-api</artifactId>
    </exclusion>
   </exclusions>
  </dependency>
  <dependency>
   <groupId>commons-fileupload</groupId>
   <artifactId>commons-fileupload</artifactId>
   <version>1.2.1</version>
  </dependency>
  <dependency>
   <groupId>commons-io</groupId>
   <artifactId>commons-io</artifactId>
   <version>1.4</version>
  </dependency>

  <dependency>
   <groupId>commons-io</groupId>
   <artifactId>commons-io</artifactId>
   <version>1.4</version>
  </dependency>
  <dependency>
   <groupId>org.apache.tomcat</groupId>
   <artifactId>dbcp</artifactId>
   <version>6.0.13</version>
  </dependency>
  <dependency>
   <groupId>org.acegisecurity</groupId>
   <artifactId>acegi-security</artifactId>
   <version>1.0.5</version>
  </dependency>

  <dependency>
   <groupId>org.richfaces.framework</groupId>
   <artifactId>richfaces-impl</artifactId>
   <version>3.1.6.GA</version>
  </dependency>
  <dependency>
   <artifactId>richfaces-api</artifactId>
   <groupId>org.richfaces.framework</groupId>
   <version>3.1.6.GA</version>
  </dependency>
  <dependency>
   <groupId>org.richfaces.ui</groupId>
   <artifactId>richfaces-ui</artifactId>
   <version>3.1.6.GA</version>
  </dependency>
  <dependency>
   <groupId>com.sun.facelets</groupId>
   <artifactId>jsf-facelets</artifactId>
   <version>1.1.11</version>
   <optional>false</optional>
  </dependency>
  <dependency>
   <groupId>javax.el</groupId>
   <artifactId>el-api</artifactId>
   <version>1.0</version>
  </dependency>
  <dependency>
   <groupId>javax.el</groupId>
   <artifactId>el-ri</artifactId>
   <version>1.2</version>
  </dependency>

  <dependency>
   <groupId>javax.faces</groupId>
   <artifactId>jsf-api</artifactId>
   <version>1.1_02</version>
  </dependency>
  <dependency>
   <groupId>javax.faces</groupId>
   <artifactId>jsf-impl</artifactId>
   <version>1.1_02</version>
   <scope>runtime</scope>
  </dependency>

  <dependency>
   <groupId>javax.annotation</groupId>
   <artifactId>jsr250-api</artifactId>
   <version>1.0</version>
   <scope>provided</scope>
   <optional>true</optional>
  </dependency>
  <dependency>
   <groupId>jstl</groupId>
   <artifactId>jstl</artifactId>
   <version>1.0</version>
  </dependency>
  <dependency>
   <groupId>commons-beanutils</groupId>
   <artifactId>commons-beanutils</artifactId>
   <version>1.7.0</version>
  </dependency>
  <dependency>
   <groupId>commons-digester</groupId>
   <artifactId>commons-digester</artifactId>
   <version>1.8</version>
  </dependency>
  <dependency>
   <groupId>commons-collections</groupId>
   <artifactId>commons-collections</artifactId>
   <version>3.2.1</version>
  </dependency>
  <dependency>
   <groupId>xml-apis</groupId>
   <artifactId>xml-apis</artifactId>
   <version>1.3.03</version>
  </dependency>
  <dependency>
   <groupId>xerces</groupId>
   <artifactId>xercesImpl</artifactId>
   <version>2.8.1</version>
  </dependency>
  <dependency>
   <groupId>nekohtml</groupId>
   <artifactId>nekohtml</artifactId>
   <version>0.9.5</version>
  </dependency>
  <dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate</artifactId>
   <version>3.2.3.ga</version>
  </dependency>
  <dependency>
   <groupId>org.hibernate</groupId>
   <artifactId>hibernate-annotations</artifactId>
   <version>3.3.0.ga</version>
  </dependency>
  <dependency>
   <groupId>ognl</groupId>
   <artifactId>ognl</artifactId>
   <version>2.7.3</version>
  </dependency>

 </dependencies>
 <reporting>
  <outputDirectory>target/site</outputDirectory>
  <plugins>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
   </plugin>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-checkstyle-plugin</artifactId>
    <configuration>
     <configLocation>
      config/sun_checks.xml
     </configLocation>
    </configuration>
   </plugin>
   <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>jxr-maven-plugin</artifactId>
   </plugin>
  </plugins>
 </reporting>

 <distributionManagement>
  <repository>
   <id>releases</id>
   <url>
    dav:http://10.200.0.18:28080/artifactory/libs-releases
   </url>
  </repository>

 </distributionManagement>
</project>

 

 

 

查找maven 的repository  :http://www.mvnrepository.com/search.html

 

                                       http://www.mvnbrowser.com/artifacts-search.htm

 

查找jar:  http://www.findjar.com/class/javax/servlet/jsp/tagext/JspIdConsumer.html

Idea 2020版本是JetBrains(一家软件开发工具公司)推出的一款集成开发环境(IDE)。它可以用于开发各种类型的应用程序,包括Web应用程序。 Maven是一种构建工具,它可以自动管理项目的依赖关系、构建过程和部署。Maven通过一个指定的pom.xml文件中的配置来管理项目,这个文件包含了项目的基本信息、依赖关系、插件等。 在Idea 2020中,可以使用Maven来创建和管理Web应用程序。以下是一个Maven Web项目的例子: 1. 首先,在Idea 2020中创建一个新的Maven项目。选择"Maven"选项,并在"Artifact"中选择"webapp",然后点击"Next"。 2. 在"GroupId"和"ArtifactId"字段中填写项目的信息,点击"Next"。 3. 在"Archetype"中选择"maven-archetype-webapp",然后点击"Next"。 4. 在"Name"字段中填写项目的名称,点击"Finish"。 5. 创建完成后,Idea会自动在项目的根目录中生成一个pom.xml文件,该文件包含了项目的基本配置信息。 6. 在pom.xml文件中,可以添加项目的依赖关系。例如,可以添加一个Servlet依赖: ``` <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> <version>2.5</version> <scope>provided</scope> </dependency> </dependencies> ``` 7. 在src/main目录下创建一个webapp文件夹,并在其中创建一个index.jsp文件作为项目的入口页面。 8. 在Idea的"Run"菜单中选择"Maven build",在"Command line"中输入"tomcat:run",然后点击"Run"。 9. Idea会自动启动Tomcat服务器,并将Web应用程序部署到服务器中。 10. 在浏览器中输入"http://localhost:8080/",即可访问项目的入口页面。 这只是一个简单的Maven Web项目的例子。使用Idea 2020和Maven,开发人员可以更轻松地创建和管理Web应用程序,并且可以借助丰富的工具和功能来提高开发效率。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值