2017-05-29 4 views
1

Ich möchte den Build von ein paar Tycho-Module für ein bestimmtes Profil überspringen, aber offenbar funktioniert der Maven-Weg nicht.Überspringen Build von Tycho Modul

Ich versuchte mvn install -pl "!org.acme.project" aber bekam:

[INFO] Scanning for projects... 
[ERROR] [ERROR] Could not find the selected project in the reactor: org.acme.project @ 
[ERROR] Could not find the selected project in the reactor: org.acme.project -> [Help 1] 
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 
[ERROR] Re-run Maven using the -X switch to enable full debug logging. 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles: 
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException 

(. Was Sinn macht, denn Tycho Artefakte werden nie als Maven Artefakte bekannt, so natürlich Maven sie nicht finden)

Und ich versuchte overridding die Module wie folgt aus:

<modules> 
    <module>org.acme.project</module> 
    <module>org.acme.other</module> 
</modules> 

<profiles> 
    <profile> 
     <id>my-great-profile</id> 

     <modules> 
      <module>org.acme.other</module> 
     </modules> 
    </profile> 
</profiles> 

Aber alle Projekte auf diese Weise gebaut (ich bin nicht sicher, ob das sollte funktionieren, oder wenn ich nur Module auf diese Weise hinzufügen kann).

Das Erstellen eines Standardprofils funktioniert nicht, weil Eclipse mir dann nicht erlaubt, diese Projekte zu importieren.

Ich könnte wahrscheinlich alle verwendeten Maven/Tycho-Plugins manuell deaktivieren, aber das ist mühsam.

Gibt es eine einfache Möglichkeit, Tycho-Module zu überspringen?

Antwort

1

(was Sinn macht, denn Tycho Artefakte werden nie als Maven Artefakte bekannt, so natürlich Maven sie nicht finden.)

Das ist nicht ganz korrekt ist; Tycho-Projekte sind Teil des Maven-Reaktors, auf den -pl wirkt. Punkt dafür: mvn install -pl ":org.acme.project" funktioniert.

Aber beachten Sie den Doppelpunkt in dem obigen Befehl (die AFAICT bedeutet „das Projekt mit org.acme.projectArtefakt ID und jederGruppe ID„). Daher sollte das Folgende für Sie die Lösung sein:

mvn install -pl "!:org.acme.project" 
Verwandte Themen