Skip to content

Commit

Permalink
Now always include Keycloak in the build + development scripts... (ec…
Browse files Browse the repository at this point in the history
…lipse-che#195)

* Now always include Keycloak in the build + development scripts since Keycloak is enabled / disabled at runtime through a property.
* Use the INFO log level instead of DEBUG by default.

Signed-off-by: David Festal <dfestal@redhat.com>
  • Loading branch information
davidfestal committed Jul 13, 2017
1 parent 8bb83a6 commit 0d62f72
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 273 deletions.
37 changes: 18 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

The RedHat distribution of Eclipse Che is a RedHat-specific packaging of Che assemblies
that adds some RedHat specific plugins / behaviors up to the standard upstream Che
distribution. It is currently based on the `openshift-connector` branch of the upstream
distribution. It is currently based on the `openshift-connector-wip` branch of the upstream
Che repository. The RedHat distribution powers [openshift.io](https://openshift.io) developers workspaces.

RedHat modifications against the upstream Che include:
Expand All @@ -24,12 +24,12 @@ RedHat modifications against the upstream Che include:
### Build prerequisites

* Install Che development prerequisites
* Clone the upstream Che git repository and checkout the `openshift-connector` branch:
* Clone the upstream Che git repository and checkout the `openshift-connector-wip` branch:

```bash
git clone https://github.com/eclipse/che
cd che
git checkout openshift-connector
git checkout openshift-connector-wip
```
* You should have built the upstream Che at least once. In the che git repository,
run the following command:
Expand Down Expand Up @@ -79,10 +79,6 @@ upstream Che repositories.
- `-Dpl` and `-Damd` to build only some modules of the RedHat Che distribution
- `clean` as the optional last argument of the build to run `clean` before the `install`

__Note__: The `-DwithoutKeycloak` arguments
are added automatically to the scripts. To explicitly activate the Keycloak support, just add the
`-DwithoutKeycloak=false` argument.

### Update Upstream Che Openshift Connector

To rebuild only the Openshift connector related plugins in the upstream Che,
Expand Down Expand Up @@ -182,6 +178,14 @@ You can even override the name of the docker image with the `CHE_IMAGE_REPO` var
bash -c "export CHE_IMAGE_REPO=rhche/che-server ; export CHE_IMAGE_TAG=nightly ; dev-scripts/minishift_deploy.sh"
```

By default, Che is deployed on minishift with the Keycloak integration *disabled*.

However, to explicitly enable the Keycloak integration, you can override the `CHE_KEYCLOAK_DISABLED` variable:

```bash
bash -c "export CHE_KEYCLOAK_DISABLED=false ; dev-scripts/minishift_deploy.sh"
```

__Warning__: If you are deploying the RH distribution build, ensure that you created / tagged the Che docker images
*in the Minishift docker environment* (see [previous section](#in-the-minishift-docker-environment)).
If you want to build and deploy the RH distribution to Minishift in one go, you can use the
Expand Down Expand Up @@ -247,7 +251,8 @@ the minishift docker daemon,
The RedHat Che distribution maven build does the following:
- Checks out the upstream GitHub `che-dependencies` and `che` repositories into folder
`target/export`, based on a given fork (`eclipse` by default) and branch
(`openshift-connector` by default),
(by default the `master` branch for the `che-dependencies` repository,
and the `openshift-connector-wip` for the `che` repository),
- Builds the upstream repositories first as a pre-step,
- Then builds the RedHat distribution maven sub-project based on this upstream build.

Expand All @@ -258,19 +263,19 @@ is reused, which make the RedHat Che distribution build much faster.

The version of the RedHat Che distribution assembly and dashboard artifacts is derived from
the version of the upstream Che project. For example, if upstream version is:
`5.6.0-openshift-connector-SNAPSHOT`,
`5.15.0-SNAPSHOT`,
then the version of the generated RedHat Che distribution will be:
`5.6.0-openshift-connector-fabric8-SNAPSHOT`
`5.15.0-fabric8-SNAPSHOT`
and the result of the RedHat Che distribution build will be available at the following location:

rh-che/target/builds/fabric8/fabric8-che/assembly/assembly-main/target/eclipse-che-5.6.0-openshift-connector-fabric8-SNAPSHOT
rh-che/target/builds/fabric8/fabric8-che/assembly/assembly-main/target/eclipse-che-5.15.0-fabric8-SNAPSHOT

Alternatively, if the option to remove the Dashboard has been enabled then the version of the
generated RedHat Che distribution will be:
`5.6.0-openshift-connector-fabric8-without-dashboard-SNAPSHOT` .
`5.15.0-fabric8-without-dashboard-SNAPSHOT` .
and the result of the RedHat Che distribution build will be available at the following location:

rh-che/target/builds/fabric8-without-dashboard/fabric8-che/assembly/assembly-main/target/eclipse-che-5.6.0-openshift-connector-fabric8-without-dashboard-SNAPSHOT
rh-che/target/builds/fabric8-without-dashboard/fabric8-che/assembly/assembly-main/target/eclipse-che-5.15.0-fabric8-without-dashboard-SNAPSHOT


The build is started by running *maven* in the root of the current git repository,
Expand Down Expand Up @@ -320,12 +325,6 @@ that contains your fork of Che, you can use the following options:
By default the Che Dashboard is part of the RedHat Che distribution.
Howvever it can removed by with the `-DwithoutDashboard` argument

##### Enabling / Disabling the Keycloak integration

By default the Keycloak integration is part of the RedHat Che distribution.
However it can be removed with the `-DwithoutKeycloak` argument.


##### Enabling / Disabling the checks and tests

By default the build conyains various validation checks and tests, which make it slow.
Expand Down
60 changes: 6 additions & 54 deletions builds/fabric8-che/assembly/assembly-ide-war/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
<original-project-name>assembly-ide-war</original-project-name>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.redhat.che</groupId>
<artifactId>che-keycloak-plugin-ide</artifactId>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
Expand Down Expand Up @@ -328,60 +334,6 @@
</plugins>
</build>
<profiles>
<profile>
<id>withKeycloak</id>
<activation>
<property>
<name>withoutKeycloak</name>
<value>!true</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.redhat.che</groupId>
<artifactId>che-keycloak-plugin-ide</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>withoutKeycloak</id>
<activation>
<property>
<name>withoutKeycloak</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>Remove Keycloak Patches</id>
<phase>process-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target name="copy all original Che files">
<delete
verbose="true">
<fileset
dir="${project.build.directory}/prepared-patches">
<include name="src.main.webapp.IDE.jsp.patch" />
<include name="src.main.webapp.META-INF.context.xml.patch" />
<include name="src.main.webapp.WEB-INF.web.xml.patch" />
</fileset>
</delete>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>withDashboard</id>
<activation>
Expand Down
39 changes: 0 additions & 39 deletions builds/fabric8-che/assembly/dashboard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -169,43 +169,4 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>withoutKeycloak</id>
<activation>
<property>
<name>withoutKeycloak</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>Remove Keycloak Patches</id>
<phase>process-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target name="copy all original Che files">
<delete
verbose="true">
<fileset
dir="${project.build.directory}/prepared-patches">
<include name="*.patch" />
</fileset>
</delete>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
33 changes: 0 additions & 33 deletions builds/fabric8-che/plugins/keycloak-plugin-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,37 +67,4 @@
</resource>
</resources>
</build>
<profiles>
<profile>
<id>withoutKeycloak</id>
<activation>
<property>
<name>withoutKeycloak</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>analyze</id>
<configuration>
<ignoredUnusedDeclaredDependencies>
<!-- Required because in the case of withoutKeycloak profile, these dependencies are not used anymore -->
<ignoredUnusedDeclaredDependency>org.keycloak:keycloak-servlet-filter-adapter:jar:</ignoredUnusedDeclaredDependency>
<ignoredUnusedDeclaredDependency>javax.validation:validation-api:jar:</ignoredUnusedDeclaredDependency>
</ignoredUnusedDeclaredDependencies>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<src.java.dir>src-without-keycloak/main/java</src.java.dir>
</properties>
</profile>
</profiles>
</project>

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 0d62f72

Please sign in to comment.