blob: d56002fce957fd85aaff433a6627b5b3487fb447 [file] [log] [blame]
This file contains notes for anyone working on the archetype.
Some things to keep in mind:
* The sample project in `src/brooklyn-sample` is what populates the
archetype source (in `src/main/resources/archetype-resources`,
copied there by the `pom.xml` in this directory, in `clean` phase).
(You can open and edit it in your IDE.)
* That archetype source then becomes the archetype (in `install` phase)
according to the copy and filter rules in `src/main/resources/META-INF/maven/archetype-metadata.xml`
* For any changes to the project:
* ensure `brooklyn-sample` builds as you would like
* ensure the resulting archetype builds as you would like
(should be reasonably safe and automated, but check that the 2 sets of
copy/translation rules above do what you intended!)
* update the `README.*` files in the root of `brooklyn-sample` and the
`src/main/assembly/files` within that
* update the docs under `use/guide/defining-applications/archetype.md` and `use/guide/quickstart/index.md`
To build:
mvn clean install
To test a build:
pushd /tmp
rm -rf brooklyn-sample
export BV=0.8.1-SNAPSHOT # BROOKLYN_VERSION
mvn archetype:generate \
\
-DarchetypeGroupId=org.apache.brooklyn \
-DarchetypeArtifactId=brooklyn-archetype-quickstart \
-DarchetypeVersion=${BV} \
\
-DgroupId=com.acme.sample \
-DartifactId=brooklyn-sample \
-Dversion=0.1.0-SNAPSHOT \
-Dpackage=com.acme.sample.brooklyn \
\
--batch-mode
cd brooklyn-sample
mvn clean assembly:assembly
cd target/brooklyn-sample-0.1.0-SNAPSHOT-dist/brooklyn-sample-0.1.0-SNAPSHOT/
./start.sh launch --cluster --location localhost
References
* http://stackoverflow.com/questions/4082643/how-can-i-test-a-maven-archetype-that-ive-just-created/18916065#18916065
----
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.