2013-01-11 2 views
0

maven-helper-plugin을 사용하여 사용 가능한 프로필을 지정하고 있습니다.사용할 수있는 프로필이 없습니다.

내 내 자신의 프로필 폴더에 settings.xml 현재 포함되어 다음의 정의 : 나는 다음과 외모를 사용

 <profile> 
      <id>cqDevAuthorProfile</id> 
      <activation> 
       <activeByDefault>true</activeByDefault> 
      </activation> 
      <properties> 
       ... 
      </properties> 
      <repositories> 
       <repository> 
        <id>localinstance</id> 
        ... 
        <releases> 
         <enabled>true</enabled> 
        </releases> 
        <snapshots> 
         <enabled>true</enabled> 
        </snapshots> 
       </repository> 
      </repositories> 
      <pluginRepositories> 
       <pluginRepository> 
        <id>localinstance</id> 
        ... 
        <releases> 
         <enabled>true</enabled> 
        </releases> 
        <snapshots> 
         <enabled>true</enabled> 
        </snapshots> 
       </pluginRepository> 
      </pluginRepositories> 
     </profile> 
     <profile> 
      <id>cqDevPublishProfile</id> 
      <properties> 
          ... 
      </properties> 
      <repositories> 
       <repository> 
        <id>localinstance</id> 
           ... 
        <releases> 
         <enabled>true</enabled> 
        </releases> 
        <snapshots> 
         <enabled>true</enabled> 
        </snapshots> 
       </repository> 
      </repositories> 
      <pluginRepositories> 
       <pluginRepository> 
        <id>localinstance</id> 
           ... 
        <releases> 
         <enabled>true</enabled> 
        </releases> 
        <snapshots> 
         <enabled>true</enabled> 
        </snapshots> 
       </pluginRepository> 
      </pluginRepositories> 
     </profile> 

pom.xml : 그것은 다음과 같은 생산

의 invokation 후
<build> 
    <plugins> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-help-plugin</artifactId> 
      <version>2.1.1</version> 
      <executions> 
       <execution> 
        <phase>validate</phase> 
        <goals> 
         <goal>all-profiles</goal> 
         <goal>active-profiles</goal> 
        </goals> 
        <configuration></configuration> 
       </execution> 
      </executions>   
     </plugin> 
    </plugins> 
</build> 

모든 프로파일 출력 :

[INFO] 
[INFO] --- maven-help-plugin:2.1.1:all-profiles (default) @ maven-multi-enviroment-deployment-plugin --- 
[WARNING] No profiles detected! 

동안 출력 생산 목표 액티브 프로파일 :

[INFO] 
Active Profiles for Project '...:maven-multi-enviroment-deployment-plugin:pom:0.0.1-SNAPSHOT': 

The following profiles are active: 

- cqDevAuthorProfile (source: settings.xml) 

내 질문 : 잘못된 실행 무엇이나 내 실수가이 시점에서입니다?

간단한 대답은 프로파일을 야기하는 다음 코드를 기반으로 기본적으로 활성화되어

답변

0

오늘 다시이 문제에 가서 그들이 경우에만 프로파일, 인쇄 할 것이라는 점을 알 수있다 동일한 pom.xml에서 선언 된 플러그인 호출입니다. documantation에 대한 모든 프로파일은

표시 현재 프로젝트에서 사용 가능한 프로파일의 목록을 말한다.

명령 액티브 프로파일documentation 말한다 동안 :

표시 이 빌드 현재 활성화 된 프로파일의 목록을 표시합니다.

것과 결론이며, 결과는 정확하고 내가 한 missunderstand 설명 ..

0

:

<activation> 
    <activeByDefault>true</activeByDefault> 
</activation> 
+0

불행히도 없습니다. 나는이 매개 변수 없이도 시도했다. – reporter

관련 문제