Skip to content

Commit caad568

Browse files
committed
Reduced changes
1 parent eeddd67 commit caad568

File tree

2 files changed

+2
-36
lines changed

2 files changed

+2
-36
lines changed

maven/codenameone-maven-plugin/src/main/java/com/codename1/maven/GenerateAppProjectMojo.java

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ public class GenerateAppProjectMojo extends AbstractMojo {
5050
@Parameter(property="version", defaultValue = "1.0-SNAPSHOT")
5151
private String version;
5252

53-
@Parameter(property="archetypeCatalog", defaultValue = "local")
54-
private String archetypeCatalog;
55-
56-
@Parameter(property = "bootstrapArchetypeVersion", defaultValue = "7.0.204")
57-
private String bootstrapArchetypeVersion;
58-
5953

6054
private Properties loadSourceProjectProperties() throws IOException {
6155
Properties props = new Properties();
@@ -79,14 +73,6 @@ private void generateProject() throws MojoExecutionException{
7973
MavenXpp3Reader reader = new MavenXpp3Reader();
8074
Model model = reader.read(getClass().getResourceAsStream("/META-INF/maven/com.codenameone/codenameone-maven-plugin/pom.xml"));
8175
archetypeVersion = model.getVersion();
82-
if (archetypeVersion != null && archetypeVersion.endsWith("-SNAPSHOT")) {
83-
String bootstrapVersion = bootstrapArchetypeVersion != null ? bootstrapArchetypeVersion.trim() : "";
84-
if (bootstrapVersion.isEmpty()) {
85-
bootstrapVersion = "LATEST";
86-
}
87-
getLog().info("Detected snapshot plugin version " + archetypeVersion + ". Bootstrapping cn1app-archetype using " + bootstrapVersion + ".");
88-
archetypeVersion = bootstrapVersion;
89-
}
9076
} catch (Exception ex) {
9177
getLog().warn("Attempted to read archetype version from embedded pom.xml file but failed", ex);
9278
}
@@ -118,13 +104,6 @@ private void generateProject() throws MojoExecutionException{
118104
}
119105
}
120106

121-
if (archetypeCatalog != null) {
122-
String catalog = archetypeCatalog.trim();
123-
if (!catalog.isEmpty()) {
124-
props.setProperty("archetypeCatalog", catalog);
125-
}
126-
}
127-
128107
if (getLog().isDebugEnabled()) {
129108
request.setDebug(true);
130109
}
@@ -133,19 +112,6 @@ private void generateProject() throws MojoExecutionException{
133112
request.setProperties(props);
134113

135114
Invoker invoker = new DefaultInvoker();
136-
invoker.setInputStream(new ByteArrayInputStream(new byte[0]));
137-
invoker.setOutputHandler(line -> {
138-
if (line == null || line.contains("Progress (")) {
139-
return;
140-
}
141-
getLog().info(line);
142-
});
143-
invoker.setErrorHandler(line -> {
144-
if (line == null || line.contains("Progress (")) {
145-
return;
146-
}
147-
getLog().error(line);
148-
});
149115
try {
150116
InvocationResult result = invoker.execute( request );
151117
if (result.getExitCode() != 0) {

scripts/build-android-app.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ ba_log "Generating Codename One application skeleton via codenameone-maven-plugi
126126
(
127127
cd "$WORK_DIR"
128128
xvfb-run -a "${MAVEN_CMD[@]}" -q \
129-
com.codenameone:codenameone-maven-plugin:"$CN1_VERSION":generate-app-project \
129+
com.codenameone:codenameone-maven-plugin:7.0.204:generate-app-project \
130130
-DgroupId="$GROUP_ID" \
131131
-DartifactId="$ARTIFACT_ID" \
132132
-Dversion=1.0-SNAPSHOT \
133133
-DsourceProject="$SOURCE_PROJECT" \
134-
-Dcn1Version="$CN1_VERSION" \
134+
-Dcn1Version="7.0.204" \
135135
"${EXTRA_MVN_ARGS[@]}"
136136
)
137137

0 commit comments

Comments
 (0)