1 # Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
 2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
 3 #
 4 # This code is free software; you can redistribute it and/or modify it
 5 # under the terms of the GNU General Public License version 2 only, as
 6 # published by the Free Software Foundation.
 7 #
 8 # This code is distributed in the hope that it will be useful, but WITHOUT
 9 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11 # version 2 for more details (a copy is included in the LICENSE file that
12 # accompanied this code).
13 #
14 # You should have received a copy of the GNU General Public License version
15 # 2 along with this work; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 #
18 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 # or visit www.oracle.com if you need additional information or have any
20 # questions.
21 
22 #===============================================================================
23 # Leyden-premain + Micronaut first app
24 #  - https://guides.micronaut.io/latest/creating-your-first-micronaut-app-maven-java.html
25 #  - https://guides.micronaut.io/latest/creating-your-first-micronaut-app-maven-java.zip
26 #
27 # See ../lib/DemoSupport.gmk for the "make" targets that build the demo, run the
28 # demo, and gather benchmarking data.
29 #===============================================================================
30 
31 # The following needs to be defined before including ../lib/DemoSupport.gmk
32 DEMO_NAME       = micronaut-first-app
33 DEMO_SRC        = $(wildcard ./download/src/main/java/example/micronaut/*.java)
34 DEMO_JAR        = download/target/default-0.1.jar
35 DEMO_CMDLINE    = -DautoQuit=true -Dmicronaut.server.port=0 -jar ${DEMO_JAR}
36 # This is for uploading into Artifactory, usually to a path like
37 #    https://xxxx.com/artifactory/yyyy/io/micronaut/micronaut-first-app/1.0.0/micronaut-first-app-1.0.0.zip
38 DEMO_ARTIFACT   = micronaut-first-app-1.0.0.zip
39 
40 include ../lib/DemoSupport.gmk
41 
42 ${DEMO_JAR}: ${DEMO_SRC}
43 	cd download && JAVA_HOME=${BLDJDK_HOME} ${MVN} package
44 
45 ${DEMO_ARTIFACT}: ${DEMO_JAR}
46 	${JAR} cvfM ${DEMO_ARTIFACT} \
47 		-C download/target default-0.1.jar
48 
49 clean: clean0
50 	rm -rf getting-started ${DEMO_ARTIFACT} download/target
51 
52 clean0:
53 	rm -f *.cds *.cds.code *.classlist *.jsa *~ *.log *.log.* hs_err_*
54