Skip to content

Commit 4f4be77

Browse files
committed
fix deployment of eclipse plugin
1 parent 8cae6dd commit 4f4be77

File tree

7 files changed

+100
-65
lines changed

7 files changed

+100
-65
lines changed

build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ log_step() {
5353
BATCH_MODE="-Djansi.force=true -Djansi.passthrough=true -B"
5454

5555
log_step "Cleanup Projects"
56-
mvn clean -P!p2-build $PARALLELIZED $BATCH_MODE $DEBUG
56+
mvn clean $PARALLELIZED $BATCH_MODE $DEBUG
5757

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

6464
log_step "Build Core Plugins - P2 Update Sites"
65-
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
66-
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
65+
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
66+
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
6767

6868
log_step "Package & Run E2E Tests"
6969
mvn test -f cobigen/cobigen-core-systemtest $ENABLED_TEST $DEBUG $BATCH_MODE
7070
mvn install -f cobigen-cli $ENABLED_TEST $DEBUG $BATCH_MODE
7171
mvn install -f cobigen-maven $ENABLED_TEST $DEBUG $BATCH_MODE
7272
mvn install -f cobigen-templates $ENABLED_TEST $DEBUG $BATCH_MODE
73-
mvn install -f cobigen-eclipse $ENABLED_TEST $DEBUG $BATCH_MODE
73+
mvn install -f cobigen-eclipse -Pp2-build $ENABLED_TEST $DEBUG $BATCH_MODE
7474

cobigen-eclipse/cobigen-eclipse-test/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,6 @@
8484
<profiles>
8585
<profile>
8686
<id>p2-build</id>
87-
<activation>
88-
<!-- activation by default not usable https://issues.apache.org/jira/browse/MNG-4917 -->
89-
<!-- <activeByDefault>true</activeByDefault> -->
90-
<file>
91-
<exists>pom.xml</exists>
92-
</file>
93-
</activation>
9487
<build>
9588
<plugins>
9689
<plugin>

cobigen-eclipse/cobigen-eclipse-updatesite/pom.xml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,47 @@
3939
</plugin>
4040
</plugins>
4141
</build>
42+
43+
<profiles>
44+
<profile>
45+
<id>p2-deploy</id>
46+
<activation>
47+
<property>
48+
<name>updatesite.repository</name>
49+
</property>
50+
</activation>
51+
<build>
52+
<plugins>
53+
<!-- update site -->
54+
<!-- copy to gh-pages folder next to this repository checked out gh-pages branch -->
55+
<plugin>
56+
<groupId>org.eclipse.tycho.extras</groupId>
57+
<artifactId>tycho-p2-extras-plugin</artifactId>
58+
<version>${tycho.version}</version>
59+
<executions>
60+
<execution>
61+
<id>mirror-files-build-to-upload-dir</id>
62+
<phase>deploy</phase>
63+
<goals>
64+
<goal>mirror</goal>
65+
</goals>
66+
<configuration>
67+
<skip>${skip.deployment}</skip>
68+
<source>
69+
<repository>
70+
<url>file:///${p2.repository.build.dir.url}</url>
71+
<layout>p2</layout>
72+
</repository>
73+
</source>
74+
<destination>${p2.repository.upload.dir.plugin}</destination>
75+
<xzCompress>false</xzCompress>
76+
<append>true</append>
77+
</configuration>
78+
</execution>
79+
</executions>
80+
</plugin>
81+
</plugins>
82+
</build>
83+
</profile>
84+
</profiles>
4285
</project>

cobigen-eclipse/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -236,13 +236,6 @@
236236
<profiles>
237237
<profile>
238238
<id>p2-build</id>
239-
<activation>
240-
<!-- activation by default not usable https://issues.apache.org/jira/browse/MNG-4917 -->
241-
<!-- <activeByDefault>true</activeByDefault> -->
242-
<file>
243-
<exists>pom.xml</exists>
244-
</file>
245-
</activation>
246239
<repositories>
247240
<repository>
248241
<id>htmlplugin</id>

cobigen-plugins/pom.xml

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
<Bundle-Name>${project.name}</Bundle-Name>
6767
<Bundle-License>https://github.com/devonfw/cobigen/blob/v${project.version}/LICENSE-BUNDLE.txt</Bundle-License>
6868
<Include-Resource>
69-
{maven-resources}, {maven-dependencies}, {META-INF/LICENSE.txt=src/main/resources/META-INF/LICENSEP2BUNDLE.txt}
69+
{maven-resources}, {maven-dependencies},
70+
{META-INF/LICENSE.txt=src/main/resources/META-INF/LICENSEP2BUNDLE.txt}
7071
</Include-Resource>
7172
<niceManifest>true</niceManifest>
7273
<Import-Package></Import-Package>
@@ -98,6 +99,46 @@
9899
</plugins>
99100
</build>
100101
</profile>
102+
<profile>
103+
<id>p2-deploy</id>
104+
<activation>
105+
<property>
106+
<name>updatesite.repository</name>
107+
</property>
108+
</activation>
109+
<build>
110+
<plugins>
111+
<!-- update site -->
112+
<!-- copy to gh-pages folder next to this repository checked out gh-pages branch -->
113+
<plugin>
114+
<groupId>org.eclipse.tycho.extras</groupId>
115+
<artifactId>tycho-p2-extras-plugin</artifactId>
116+
<version>${tycho.version}</version>
117+
<executions>
118+
<execution>
119+
<id>mirror-files-build-to-upload-dir</id>
120+
<phase>deploy</phase>
121+
<goals>
122+
<goal>mirror</goal>
123+
</goals>
124+
<configuration>
125+
<skip>${skip.deployment}</skip>
126+
<source>
127+
<repository>
128+
<url>file:///${p2.repository.build.dir.url}</url>
129+
<layout>p2</layout>
130+
</repository>
131+
</source>
132+
<destination>${p2.repository.upload.dir.plugin}</destination>
133+
<xzCompress>false</xzCompress>
134+
<append>true</append>
135+
</configuration>
136+
</execution>
137+
</executions>
138+
</plugin>
139+
</plugins>
140+
</build>
141+
</profile>
101142
</profiles>
102143

103144
<reporting>

deploy.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -150,25 +150,25 @@ BATCH_MODE="-Djansi.force=true -Djansi.passthrough=true -B"
150150
DEPLOY_SIGN="-Poss -Dgpg.keyname=$GPG_KEYNAME -Dgpg.executable=gpg"
151151

152152
log_step "Cleanup Projects"
153-
doRunCommand "mvn clean -P!p2-build $PARALLELIZED $BATCH_MODE"
153+
doRunCommand "mvn clean $PARALLELIZED $BATCH_MODE"
154154

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

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

162162
log_step "Build Core Plugins - P2 Update Sites"
163-
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 "
164-
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 "
165-
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"
163+
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 "
164+
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 "
165+
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"
166166

167167
log_step "Package & Run E2E Tests"
168-
doRunCommand "mvn test -f cobigen/cobigen-core-systemtest -P!p2-build $ENABLED_TEST $DEBUG $BATCH_MODE"
168+
doRunCommand "mvn test -f cobigen/cobigen-core-systemtest $ENABLED_TEST $DEBUG $BATCH_MODE"
169169
# need to exclude cli-systemtest as of https://issues.sonatype.org/browse/NEXUS-19853 for deployment only!
170-
doRunCommand "mvn deploy -f cobigen-cli --projects !cli-systemtest -P!p2-build $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
170+
doRunCommand "mvn deploy -f cobigen-cli --projects !cli-systemtest $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
171171
# need to exclude cobigen-maven-systemtest as of https://issues.sonatype.org/browse/NEXUS-19853 for deployment only!
172-
doRunCommand "mvn deploy -f cobigen-maven --projects !cobigen-maven-systemtest -P!p2-build $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
173-
doRunCommand "mvn deploy -f cobigen-templates -P!p2-build $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
174-
doRunCommand "mvn deploy -f cobigen-eclipse -DskipTests $ENABLED_TEST $DEBUG $BATCH_MODE -Dupdatesite.repository=$DEPLOY_UPDATESITE --projects cobigen-eclipse-updatesite"
172+
doRunCommand "mvn deploy -f cobigen-maven --projects !cobigen-maven-systemtest $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
173+
doRunCommand "mvn deploy -f cobigen-templates $ENABLED_TEST $DEBUG $BATCH_MODE $DEPLOY_SIGN"
174+
doRunCommand "mvn deploy -f cobigen-eclipse -Pp2-build -DskipTests $ENABLED_TEST $DEBUG $BATCH_MODE -Dupdatesite.repository=$DEPLOY_UPDATESITE"

pom.xml

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -494,13 +494,6 @@
494494
</profile>
495495
<profile>
496496
<id>p2-build</id>
497-
<activation>
498-
<!-- activation by default not usable https://issues.apache.org/jira/browse/MNG-4917 -->
499-
<!-- <activeByDefault>true</activeByDefault> -->
500-
<file>
501-
<exists>pom.xml</exists>
502-
</file>
503-
</activation>
504497
<build>
505498
<plugins>
506499
<plugin>
@@ -539,34 +532,6 @@
539532
</execution>
540533
</executions>
541534
</plugin>
542-
<!-- update site -->
543-
<!-- copy to gh-pages folder next to this repository checked out gh-pages branch -->
544-
<plugin>
545-
<groupId>org.eclipse.tycho.extras</groupId>
546-
<artifactId>tycho-p2-extras-plugin</artifactId>
547-
<version>${tycho.version}</version>
548-
<executions>
549-
<execution>
550-
<id>mirror-files-build-to-upload-dir</id>
551-
<phase>deploy</phase>
552-
<goals>
553-
<goal>mirror</goal>
554-
</goals>
555-
<configuration>
556-
<skip>${skip.deployment}</skip>
557-
<source>
558-
<repository>
559-
<url>file:///${p2.repository.build.dir.url}</url>
560-
<layout>p2</layout>
561-
</repository>
562-
</source>
563-
<destination>${p2.repository.upload.dir.plugin}</destination>
564-
<xzCompress>false</xzCompress>
565-
<append>true</append>
566-
</configuration>
567-
</execution>
568-
</executions>
569-
</plugin>
570535
</plugins>
571536
</build>
572537
</profile>

0 commit comments

Comments
 (0)