Skip to content

Commit

Permalink
fix deployment of eclipse plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
maybeec committed Jul 15, 2021
1 parent 8cae6dd commit 4f4be77
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 65 deletions.
8 changes: 4 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ log_step() {
BATCH_MODE="-Djansi.force=true -Djansi.passthrough=true -B"

log_step "Cleanup Projects"
mvn clean -P!p2-build $PARALLELIZED $BATCH_MODE $DEBUG
mvn clean $PARALLELIZED $BATCH_MODE $DEBUG

log_step "Build & Test Core"
mvn install -f cobigen --projects !cobigen-core-systemtest $ENABLED_TEST $DEBUG $PARALLELIZED $BATCH_MODE
Expand All @@ -62,13 +62,13 @@ log_step "Build & Test Core Plugins"
mvn install -f cobigen-plugins $ENABLED_TEST $DEBUG $PARALLELIZED $BATCH_MODE

log_step "Build Core Plugins - P2 Update Sites"
mvn package bundle:bundle -Pp2-bundle -DskipTests -f cobigen-plugins --projects !cobigen-javaplugin-parent/cobigen-javaplugin-model,!cobigen-openapiplugin-parent/cobigen-openapiplugin-model,!:plugins-parent,!cobigen-javaplugin-parent,!cobigen-openapiplugin-parent,!cobigen-templateengines $DEBUG $PARALLELIZED $BATCH_MODE -Dupdatesite.repository=test
mvn install bundle:bundle -Pp2-bundle -DskipTests p2:site -f cobigen-plugins --projects !cobigen-javaplugin-parent/cobigen-javaplugin-model,!cobigen-openapiplugin-parent/cobigen-openapiplugin-model,!:plugins-parent,!cobigen-javaplugin-parent,!cobigen-openapiplugin-parent,!cobigen-templateengines $DEBUG $PARALLELIZED $BATCH_MODE -Dupdatesite.repository=test
mvn package bundle:bundle -Pp2-build,p2-bundle -DskipTests -f cobigen-plugins --projects !cobigen-javaplugin-parent/cobigen-javaplugin-model,!cobigen-openapiplugin-parent/cobigen-openapiplugin-model,!:plugins-parent,!cobigen-javaplugin-parent,!cobigen-openapiplugin-parent,!cobigen-templateengines $DEBUG $PARALLELIZED $BATCH_MODE -Dupdatesite.repository=test
mvn install bundle:bundle -Pp2-build,p2-bundle -DskipTests p2:site -f cobigen-plugins --projects !cobigen-javaplugin-parent/cobigen-javaplugin-model,!cobigen-openapiplugin-parent/cobigen-openapiplugin-model,!:plugins-parent,!cobigen-javaplugin-parent,!cobigen-openapiplugin-parent,!cobigen-templateengines $DEBUG $PARALLELIZED $BATCH_MODE -Dupdatesite.repository=test

log_step "Package & Run E2E Tests"
mvn test -f cobigen/cobigen-core-systemtest $ENABLED_TEST $DEBUG $BATCH_MODE
mvn install -f cobigen-cli $ENABLED_TEST $DEBUG $BATCH_MODE
mvn install -f cobigen-maven $ENABLED_TEST $DEBUG $BATCH_MODE
mvn install -f cobigen-templates $ENABLED_TEST $DEBUG $BATCH_MODE
mvn install -f cobigen-eclipse $ENABLED_TEST $DEBUG $BATCH_MODE
mvn install -f cobigen-eclipse -Pp2-build $ENABLED_TEST $DEBUG $BATCH_MODE

7 changes: 0 additions & 7 deletions cobigen-eclipse/cobigen-eclipse-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@
<profiles>
<profile>
<id>p2-build</id>
<activation>
<!-- activation by default not usable https://issues.apache.org/jira/browse/MNG-4917 -->
<!-- <activeByDefault>true</activeByDefault> -->
<file>
<exists>pom.xml</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
Expand Down
43 changes: 43 additions & 0 deletions cobigen-eclipse/cobigen-eclipse-updatesite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,47 @@
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>p2-deploy</id>
<activation>
<property>
<name>updatesite.repository</name>
</property>
</activation>
<build>
<plugins>
<!-- update site -->
<!-- copy to gh-pages folder next to this repository checked out gh-pages branch -->
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-p2-extras-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<id>mirror-files-build-to-upload-dir</id>
<phase>deploy</phase>
<goals>
<goal>mirror</goal>
</goals>
<configuration>
<skip>${skip.deployment}</skip>
<source>
<repository>
<url>file:///${p2.repository.build.dir.url}</url>
<layout>p2</layout>
</repository>
</source>
<destination>${p2.repository.upload.dir.plugin}</destination>
<xzCompress>false</xzCompress>
<append>true</append>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
7 changes: 0 additions & 7 deletions cobigen-eclipse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,6 @@
<profiles>
<profile>
<id>p2-build</id>
<activation>
<!-- activation by default not usable https://issues.apache.org/jira/browse/MNG-4917 -->
<!-- <activeByDefault>true</activeByDefault> -->
<file>
<exists>pom.xml</exists>
</file>
</activation>
<repositories>
<repository>
<id>htmlplugin</id>
Expand Down
43 changes: 42 additions & 1 deletion cobigen-plugins/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
<Bundle-Name>${project.name}</Bundle-Name>
<Bundle-License>https://github.com/devonfw/cobigen/blob/v${project.version}/LICENSE-BUNDLE.txt</Bundle-License>
<Include-Resource>
{maven-resources}, {maven-dependencies}, {META-INF/LICENSE.txt=src/main/resources/META-INF/LICENSEP2BUNDLE.txt}
{maven-resources}, {maven-dependencies},
{META-INF/LICENSE.txt=src/main/resources/META-INF/LICENSEP2BUNDLE.txt}
</Include-Resource>
<niceManifest>true</niceManifest>
<Import-Package></Import-Package>
Expand Down Expand Up @@ -98,6 +99,46 @@
</plugins>
</build>
</profile>
<profile>
<id>p2-deploy</id>
<activation>
<property>
<name>updatesite.repository</name>
</property>
</activation>
<build>
<plugins>
<!-- update site -->
<!-- copy to gh-pages folder next to this repository checked out gh-pages branch -->
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-p2-extras-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<id>mirror-files-build-to-upload-dir</id>
<phase>deploy</phase>
<goals>
<goal>mirror</goal>
</goals>
<configuration>
<skip>${skip.deployment}</skip>
<source>
<repository>
<url>file:///${p2.repository.build.dir.url}</url>
<layout>p2</layout>
</repository>
</source>
<destination>${p2.repository.upload.dir.plugin}</destination>
<xzCompress>false</xzCompress>
<append>true</append>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<reporting>
Expand Down
22 changes: 11 additions & 11 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,25 +150,25 @@ BATCH_MODE="-Djansi.force=true -Djansi.passthrough=true -B"
DEPLOY_SIGN="-Poss -Dgpg.keyname=$GPG_KEYNAME -Dgpg.executable=gpg"

log_step "Cleanup Projects"
doRunCommand "mvn clean -P!p2-build $PARALLELIZED $BATCH_MODE"
doRunCommand "mvn clean $PARALLELIZED $BATCH_MODE"

log_step "Build & Test Core"
# need to exclude cobigen-core-systemtest as of https://issues.sonatype.org/browse/NEXUS-19853 for deployment only!
doRunCommand "mvn deploy -f cobigen --projects !cobigen-core-systemtest -P!p2-build $ENABLED_TEST $DEBUG $PARALLELIZED $BATCH_MODE $DEPLOY_SIGN"
doRunCommand "mvn deploy -f cobigen --projects !cobigen-core-systemtest $ENABLED_TEST $DEBUG $PARALLELIZED $BATCH_MODE $DEPLOY_SIGN"

log_step "Build & Test Core Plugins"
doRunCommand "mvn deploy -f cobigen-plugins -P!p2-build $ENABLED_TEST $DEBUG $PARALLELIZED $BATCH_MODE $DEPLOY_SIGN"
doRunCommand "mvn deploy -f cobigen-plugins $ENABLED_TEST $DEBUG $PARALLELIZED $BATCH_MODE $DEPLOY_SIGN"

log_step "Build Core Plugins - P2 Update Sites"
doRunCommand "mvn package bundle:bundle -Pp2-bundle -DskipTests -f cobigen-plugins --projects !cobigen-javaplugin-parent/cobigen-javaplugin-model,!cobigen-openapiplugin-parent/cobigen-openapiplugin-model,!:plugins-parent,!cobigen-javaplugin-parent,!cobigen-openapiplugin-parent,!cobigen-templateengines $DEBUG $PARALLELIZED $BATCH_MODE -Dupdatesite.repository=$DEPLOY_UPDATESITE "
doRunCommand "mvn install bundle:bundle -Pp2-bundle -DskipTests p2:site -f cobigen-plugins --projects !cobigen-javaplugin-parent/cobigen-javaplugin-model,!cobigen-openapiplugin-parent/cobigen-openapiplugin-model,!:plugins-parent,!cobigen-javaplugin-parent,!cobigen-openapiplugin-parent,!cobigen-templateengines $DEBUG $PARALLELIZED $BATCH_MODE -Dupdatesite.repository=$DEPLOY_UPDATESITE "
doRunCommand "mvn deploy -Pp2-bundle -DskipTests -f cobigen-plugins --projects !cobigen-javaplugin-parent/cobigen-javaplugin-model,!cobigen-openapiplugin-parent/cobigen-openapiplugin-model,!:plugins-parent,!cobigen-javaplugin-parent,!cobigen-openapiplugin-parent,!cobigen-templateengines $DEBUG $PARALLELIZED $BATCH_MODE -Dupdatesite.repository=$DEPLOY_UPDATESITE"
doRunCommand "mvn package bundle:bundle -Pp2-build,p2-bundle -DskipTests -f cobigen-plugins --projects !cobigen-javaplugin-parent/cobigen-javaplugin-model,!cobigen-openapiplugin-parent/cobigen-openapiplugin-model,!:plugins-parent,!cobigen-javaplugin-parent,!cobigen-openapiplugin-parent,!cobigen-templateengines $DEBUG $PARALLELIZED $BATCH_MODE -Dupdatesite.repository=$DEPLOY_UPDATESITE "
doRunCommand "mvn install bundle:bundle -Pp2-build,p2-bundle -DskipTests p2:site -f cobigen-plugins --projects !cobigen-javaplugin-parent/cobigen-javaplugin-model,!cobigen-openapiplugin-parent/cobigen-openapiplugin-model,!:plugins-parent,!cobigen-javaplugin-parent,!cobigen-openapiplugin-parent,!cobigen-templateengines $DEBUG $PARALLELIZED $BATCH_MODE -Dupdatesite.repository=$DEPLOY_UPDATESITE "
doRunCommand "mvn deploy -Pp2-build,p2-bundle -DskipTests -f cobigen-plugins --projects !cobigen-javaplugin-parent/cobigen-javaplugin-model,!cobigen-openapiplugin-parent/cobigen-openapiplugin-model,!:plugins-parent,!cobigen-javaplugin-parent,!cobigen-openapiplugin-parent,!cobigen-templateengines $DEBUG $PARALLELIZED $BATCH_MODE -Dupdatesite.repository=$DEPLOY_UPDATESITE"

log_step "Package & Run E2E Tests"
doRunCommand "mvn test -f cobigen/cobigen-core-systemtest -P!p2-build $ENABLED_TEST $DEBUG $BATCH_MODE"
doRunCommand "mvn test -f cobigen/cobigen-core-systemtest $ENABLED_TEST $DEBUG $BATCH_MODE"
# need to exclude cli-systemtest as of https://issues.sonatype.org/browse/NEXUS-19853 for deployment only!
doRunCommand "mvn deploy -f cobigen-cli --projects !cli-systemtest -P!p2-build $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
doRunCommand "mvn deploy -f cobigen-cli --projects !cli-systemtest $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
# need to exclude cobigen-maven-systemtest as of https://issues.sonatype.org/browse/NEXUS-19853 for deployment only!
doRunCommand "mvn deploy -f cobigen-maven --projects !cobigen-maven-systemtest -P!p2-build $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
doRunCommand "mvn deploy -f cobigen-templates -P!p2-build $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
doRunCommand "mvn deploy -f cobigen-eclipse -DskipTests $ENABLED_TEST $DEBUG $BATCH_MODE -Dupdatesite.repository=$DEPLOY_UPDATESITE --projects cobigen-eclipse-updatesite"
doRunCommand "mvn deploy -f cobigen-maven --projects !cobigen-maven-systemtest $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
doRunCommand "mvn deploy -f cobigen-templates $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
doRunCommand "mvn deploy -f cobigen-eclipse -Pp2-build -DskipTests $ENABLED_TEST $DEBUG $BATCH_MODE -Dupdatesite.repository=$DEPLOY_UPDATESITE"
35 changes: 0 additions & 35 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,6 @@
</profile>
<profile>
<id>p2-build</id>
<activation>
<!-- activation by default not usable https://issues.apache.org/jira/browse/MNG-4917 -->
<!-- <activeByDefault>true</activeByDefault> -->
<file>
<exists>pom.xml</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -539,34 +532,6 @@
</execution>
</executions>
</plugin>
<!-- update site -->
<!-- copy to gh-pages folder next to this repository checked out gh-pages branch -->
<plugin>
<groupId>org.eclipse.tycho.extras</groupId>
<artifactId>tycho-p2-extras-plugin</artifactId>
<version>${tycho.version}</version>
<executions>
<execution>
<id>mirror-files-build-to-upload-dir</id>
<phase>deploy</phase>
<goals>
<goal>mirror</goal>
</goals>
<configuration>
<skip>${skip.deployment}</skip>
<source>
<repository>
<url>file:///${p2.repository.build.dir.url}</url>
<layout>p2</layout>
</repository>
</source>
<destination>${p2.repository.upload.dir.plugin}</destination>
<xzCompress>false</xzCompress>
<append>true</append>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down

0 comments on commit 4f4be77

Please sign in to comment.