2016-09-08 7 views
1

많은 수의 프록시 서비스, 시퀀스 등을 포함 할 Maven 다중 모듈 프로젝트를 만들려고합니다. artifact.xml 파일을 만들 때 내 pom.xml과 같은 디렉터. 다음과 같은 오류가 발생합니다.WSO2 ESB 프로젝트에 artifact.xml을 포함 할 때 오류가 발생했습니다.

[ERROR] The goal you specified requires a project to execute but there is no POM in this directory (C:\myproject\target\capp). Please verify you invoked Maven from the correct directory. -> [Help 1] 

이것은 내가 가지고있는 artifact.xml 파일입니다.

<?xml version="1.0" encoding="UTF-8"?><artifacts> 
<artifact name="testTextMessage" groupId="com.example.ReadTest.message-processors" version="1.0.0" type="synapse/message-processors" serverRole="EnterpriseServiceBus"> 
    <file>src/main/synapse-config/message-processors/testTextMessage.xml</file> 
</artifact> 

이 내 pom.xml 파일

누가 물어 전에

<?xml version="1.0" encoding="UTF-8"?> 
 
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" 
 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 
 
    <modelVersion>4.0.0</modelVersion> 
 
    <groupId>com.example.ReadTest</groupId> 
 
    <artifactId>ReadTest</artifactId> 
 
    <version>1.0.0</version> 
 
    <packaging>pom</packaging> 
 
    <name>ReadTest</name> 
 
    <description>ReadTest</description> 
 
    <properties> 
 
    <maven.test.skip>false</maven.test.skip> 
 
    <CApp.type>bpel/workflow=zip,lib/registry/filter=jar,webapp/jaxws=war,lib/library/bundle=jar,service/dataservice=dbs,synapse/local-entry=xml,synapse/proxy-service=xml,carbon/application=car,registry/resource=zip,lib/dataservice/validator=jar,synapse/endpoint=xml,web/application=war,lib/carbon/ui=jar,service/axis2=aar,synapse/sequence=xml,synapse/configuration=xml,wso2/gadget=dar,lib/registry/handlers=jar,lib/synapse/mediator=jar,synapse/task=xml,synapse/api=xml,synapse/template=xml,synapse/message-store=xml,synapse/message-processors=xml,synapse/inbound-endpoint=xml</CApp.type> 
 
    </properties> 
 
    <repositories> 
 
    <repository> 
 
     <releases> 
 
     <enabled>true</enabled> 
 
     <updatePolicy>daily</updatePolicy> 
 
     <checksumPolicy>ignore</checksumPolicy> 
 
     </releases> 
 
     <id>wso2-nexus</id> 
 
     <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url> 
 
    </repository> 
 
    </repositories> 
 
    <pluginRepositories> 
 
    <pluginRepository> 
 
     <releases> 
 
     <enabled>true</enabled> 
 
     <updatePolicy>daily</updatePolicy> 
 
     <checksumPolicy>ignore</checksumPolicy> 
 
     </releases> 
 
     <id>wso2-nexus</id> 
 
     <url>http://maven.wso2.org/nexus/content/groups/wso2-public/</url> 
 
    </pluginRepository> 
 
    </pluginRepositories> 
 
    <build> 
 
    <directory>target/capp</directory> 
 
    <plugins> 
 
     <plugin> 
 
     <groupId>org.codehaus.mojo</groupId> 
 
     <artifactId>exec-maven-plugin</artifactId> 
 
     <version>1.4.0</version> 
 
     <extensions>true</extensions> 
 
     <executions> 
 
      <execution> 
 
      <id>package</id> 
 
      <phase>package</phase> 
 
      <goals> 
 
       <goal>exec</goal> 
 
      </goals> 
 
      <configuration> 
 
       <executable>mvn</executable> 
 
       <workingDirectory>${project.build.directory}</workingDirectory> 
 
       <arguments> 
 
       <argument>clean</argument> 
 
       <argument>package</argument> 
 
       <argument>-Dmaven.test.skip=${maven.test.skip}</argument> 
 
       </arguments> 
 
      </configuration> 
 
      </execution> 
 
      <execution> 
 
      <id>install</id> 
 
      <phase>install</phase> 
 
      <goals> 
 
       <goal>exec</goal> 
 
      </goals> 
 
      <configuration> 
 
       <executable>mvn</executable> 
 
       <workingDirectory>${project.build.directory}</workingDirectory> 
 
       <arguments> 
 
       <argument>clean</argument> 
 
       <argument>install</argument> 
 
       <argument>-Dmaven.test.skip=${maven.test.skip}</argument> 
 
       </arguments> 
 
      </configuration> 
 
      </execution> 
 
      <execution> 
 
      <id>deploy</id> 
 
      <phase>deploy</phase> 
 
      <goals> 
 
       <goal>exec</goal> 
 
      </goals> 
 
      <configuration> 
 
       <executable>mvn</executable> 
 
       <workingDirectory>${project.build.directory}</workingDirectory> 
 
       <arguments> 
 
       <argument>deploy</argument> 
 
       <argument>-Dmaven.test.skip=${maven.test.skip}</argument> 
 
       </arguments> 
 
      </configuration> 
 
      </execution> 
 
     </executions> 
 
     <configuration /> 
 
     </plugin> 
 
     <plugin> 
 
     <artifactId>maven-eclipse-plugin</artifactId> 
 
     <version>2.9</version> 
 
     <configuration> 
 
      <buildcommands /> 
 
      <projectnatures> 
 
      <projectnature>org.wso2.developerstudio.eclipse.esb.project.nature</projectnature> 
 
      </projectnatures> 
 
     </configuration> 
 
     </plugin> 
 
     <plugin> 
 
     <groupId>org.wso2.maven</groupId> 
 
     <artifactId>wso2-esb-messageprocessor-plugin</artifactId> 
 
     <version>1.1.0</version> 
 
     <extensions>true</extensions> 
 
     <executions> 
 
      <execution> 
 
      <id>task</id> 
 
      <phase>process-resources</phase> 
 
      <goals> 
 
       <goal>pom-gen</goal> 
 
      </goals> 
 
      <configuration> 
 
       <artifactLocation>.</artifactLocation> 
 
       <typeList>${artifact.types}</typeList> 
 
      </configuration> 
 
      </execution> 
 
     </executions> 
 
     <configuration /> 
 
     </plugin> 
 
    </plugins> 
 
    </build> 
 
</project>
이다, 그래 내가 올바른 디렉토리에 설치 MVN 호출하고 절대적으로 확신합니다. mvn install은 artifact.xml을 같은 디렉토리에 둘 때까지 제대로 작동합니다.

+0

wso2 사이트에서이 JIRA를 발견했습니다. 문제는 https://wso2.org/jira/browse/TOOLS-3115와 관련이있는 것 같습니다. – user2254180

답변

0

이 문제를 파악했습니다. 내가 겪고있는 문제는 메시지 프로세서와 시퀀스를 다른 프로젝트에서 복사하여 관련 폴더에 놓은 다음 수동으로 artifact.xml에 새 항목을 추가함으로써 발생했습니다. WSO2 빌드 프로세스는 어떤 이유로 든 마음에 들지 않았습니다. 솔루션은 WSO2 내에서 시퀀스 등을 만든 다음 기본 소스 코드를 내 코드로 붙여 넣는 것이 었습니다.

1

이전 질문 이었지만 내 프로젝트에서 비슷한 문제가 발생했습니다. 다른 해결책이있어서 미래에 도움이 될 수있는 경우 여기에서 공유 할 것입니다. 내 경우
, 내 받는다는 멀티 모듈 프로젝트의 하위 프로젝트 중 하나에 대한 치어 파일이 몇 플러그인 누락 된 것으로 나타났습니다 : 그 플러그인을 추가 한 후

... 
<plugin> 
<groupId>org.wso2.maven</groupId> 
<artifactId>wso2-esb-proxy-plugin</artifactId> 
<version>2.1.0</version> 
<extensions>true</extensions> 
<executions> 
    <execution> 
    <id>proxy</id> 
    <phase>process-resources</phase> 
    <goals> 
     <goal>pom-gen</goal> 
    </goals> 
    <configuration> 
     <artifactLocation>.</artifactLocation> 
     <typeList>${artifact.types}</typeList> 
    </configuration> 
    </execution> 
</executions> 
<configuration /> 
</plugin> 
<plugin> 
    <groupId>org.wso2.maven</groupId> 
    <artifactId>wso2-esb-template-plugin</artifactId> 
    <version>2.1.0</version> 
    <extensions>true</extensions> 
    <executions> 
    <execution> 
     <id>template</id> 
     <phase>process-resources</phase> 
     <goals> 
     <goal>pom-gen</goal> 
     </goals> 
     <configuration> 
     <artifactLocation>.</artifactLocation> 
     <typeList>${artifact.types}</typeList> 
     </configuration> 
    </execution> 
    </executions> 
    <configuration /> 
</plugin> 
... 

은 빌드가 성공했다.