fabric8io / fabric8

fabric8 is an open source microservices platform based on Docker, Kubernetes and Jenkins
http://fabric8.io/
1.76k stars 504 forks source link

Include quickstarts artifacts for offline mode (1.x) #2001

Open davsclaus opened 10 years ago

davsclaus commented 10 years ago

We have the profiles, but we need to include the pre-build JARs in the system directory so people can install and try the quickstarts in offline mode.

davsclaus commented 10 years ago

The quickstarts for offline makes the system dir increase to 175mb - but then we include all their JARs they need (expect for tomcat/jetty containers itself)

davsclaus commented 10 years ago

The system dir is 91mb by default now

davsclaus commented 10 years ago

Darn the maven-notice-plugin has a problem when we have those extra JARs

davsclaus commented 10 years ago

In quickstarts/pom/xml add this

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${maven-dependency-plugin-version}</version>
          <executions>
            <execution>
             <id>copy-dependencies</id>
                <phase>package</phase>
                <goals>
                  <goal>copy-dependencies</goal>
                </goals>
                <configuration>
                  <outputDirectory>target/quickstarts-repo</outputDirectory>
                  <useRepositoryLayout>true</useRepositoryLayout>
                  <includeScope>runtime</includeScope>
                  <excludeScope>test</excludeScope>
                </configuration>
            </execution>
          </executions>
        </plugin>

And in fabric8-karaf/pom.xml add this

                                 <echo message="Copying quickstart artifacts"/>
                                  <copy todir="target/features-repo/">
                                    <fileset dir="${quickstart.src}" includes="**/target/quickstarts-repo/**"
                                                                     excludes="**/maven-metadata*"/>
                                    <!-- strip off the leading directory -->
                                    <mapper type="regexp" from="^.*/quickstarts-repo/(.*)$" to="\1"/>
                                  </copy>