2011-09-22 6 views
1

내가 다음 프로젝트 구조를 구축 구축 할 수 있습니다. 응용 프로그램의 pom.xml 파일 :메이븐의 pom.xml 모듈 + 자기

<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/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 

<parent> 
    <groupId>my-group</groupId> 
    <artifactId>parent-pom</artifactId> 
    <version>1.0.0</version> 
    <relativePath>../parent-pom</relativePath> 
</parent> 

<artifactId>app</artifactId> 
<version>${app-version}</version> 
<packaging>pom</packaging> 
<modules> 
    <module>../module1</module> 
    <module>../module2</module> 
    ... 
    <module>../moduleN</module> 
</modules> 
내가 JasperReports를-받는다는 - 플러그인 프로젝트의 응용 프로그램에 대한를 추가 할

. (자기 빌드가 호출되지 않은) 나는 (<modules> 절 전) 다음 코드를 시도했지만, 그것은 작동하지 않습니다

<build> 
    <plugins> 
     <plugin> 
      <groupId>org.codehaus.mojo</groupId> 
      <artifactId>jasperreports-maven-plugin</artifactId> 
      <configuration> 
       <sourceDirectory>${basedir}/config/templates</sourceDirectory> 
       <outputDirectory>${basedir}/config/templates</outputDirectory> 
      </configuration> 
      <executions> 
       <execution> 
        <goals> 
         <goal>compile-reports</goal> 
        </goals> 
       </execution> 
      </executions> 
      <dependencies> 
       <dependency> 
        <groupId>net.sf.jasperreports</groupId> 
        <artifactId>jasperreports</artifactId> 
        <version>${jasperreports.version}</version> 
       </dependency> 
      </dependencies> 
     </plugin> 
    </plugins> 
</build> 

이 가능 모듈 pom으로하는 자기 빌드를 추가?

답변

0

앱 프로젝트 패키징이 pom으로 설정되어 있으므로 다른 아티팩트가있을 수 없습니다. 재스퍼 보고서를 다른 모듈이나 별도의 모듈 중 하나로 이동해야합니다.