Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id E1DC1200C29 for ; Tue, 28 Feb 2017 22:29:54 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id E04E6160B7C; Tue, 28 Feb 2017 21:29:54 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A26CB160B59 for ; Tue, 28 Feb 2017 22:29:52 +0100 (CET) Received: (qmail 34414 invoked by uid 500); 28 Feb 2017 21:29:46 -0000 Mailing-List: contact commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list commits@maven.apache.org Received: (qmail 34224 invoked by uid 99); 28 Feb 2017 21:29:46 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Feb 2017 21:29:46 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9F8D2DFF47; Tue, 28 Feb 2017 21:29:46 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rfscholte@apache.org To: commits@maven.apache.org Date: Tue, 28 Feb 2017 21:29:48 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [3/5] maven-archetype git commit: [ARCHETYPE-522] Introduce MRM for archetype-maven-plugin ITs archived-at: Tue, 28 Feb 2017 21:29:55 -0000 http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/mrm/settings.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/mrm/settings.xml b/maven-archetype-plugin/src/it/mrm/settings.xml new file mode 100644 index 0000000..9c21101 --- /dev/null +++ b/maven-archetype-plugin/src/it/mrm/settings.xml @@ -0,0 +1,71 @@ + + + + + + + + mrm-maven-plugin + Mock Repository Manager + @repository.proxy.url@ + * + + + + + it-repo + + true + + + + snapshots + @repository.proxy.url@ + + true + ignore + never + + + true + ignore + always + + + + + + snapshots + @repository.proxy.url@ + + true + ignore + never + + + true + ignore + always + + + + + + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/pom.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/pom.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/pom.xml new file mode 100644 index 0000000..661c8bc --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/pom.xml @@ -0,0 +1,46 @@ + + + + 4.0.0 + + + org.apache.maven.plugins.archetype.its + archetype241-parent + 1.0-SNAPSHOT + + archetype241-archetype + maven-archetype + + + + + org.apache.maven.plugins + maven-archetype-plugin + true + + src/main/resources + + + + + + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000..c3e354d --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + src/main/java + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__projectName__-test2/pom.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__projectName__-test2/pom.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__projectName__-test2/pom.xml new file mode 100644 index 0000000..05d0416 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__projectName__-test2/pom.xml @@ -0,0 +1,33 @@ + + + + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + ${projectName}-test2 + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__projectName__-test2/src/main/java/Test-__projectName__.java ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__projectName__-test2/src/main/java/Test-__projectName__.java b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__projectName__-test2/src/main/java/Test-__projectName__.java new file mode 100644 index 0000000..fb9c4b5 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__projectName__-test2/src/main/java/Test-__projectName__.java @@ -0,0 +1,27 @@ +/* + * 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. + */ + +public class Test${projectName} +{ + public static void main( String[] args ) + { + System.out.println( "This is ${projectName}!" ); + } +} + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__rootArtifactId__-test1/pom.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__rootArtifactId__-test1/pom.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__rootArtifactId__-test1/pom.xml new file mode 100644 index 0000000..1cf27a3 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/__rootArtifactId__-test1/pom.xml @@ -0,0 +1,33 @@ + + + + + + 4.0.0 + + + ${groupId} + ${artifactId} + ${version} + + ${rootArtifactId}-test1 + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/pom.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..93ebda4 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/archetype/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,36 @@ + + + + + + 4.0.0 + + ${groupId} + ${artifactId} + ${version} + pom + + + ${rootArtifactId}-test1 + ${projectName}-test2 + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/invoker.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/invoker.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/invoker.properties new file mode 100644 index 0000000..aaa45c6 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/invoker.properties @@ -0,0 +1,23 @@ +# 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. + +invoker.goals.1 = install +invoker.project.1 = archetype + +invoker.goals.2 = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:generate +invoker.systemPropertiesFile = project.properties + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/pom.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/pom.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/pom.xml new file mode 100644 index 0000000..5e200d7 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/pom.xml @@ -0,0 +1,49 @@ + + + + 4.0.0 + + org.apache.maven.plugins.archetype.its + archetype241-parent + 1.0-SNAPSHOT + pom + + + + + org.apache.maven.archetype + archetype-packaging + @project.version@ + + + + + + + org.apache.maven.plugins + maven-archetype-plugin + @project.version@ + + + + + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/project.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/project.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/project.properties new file mode 100644 index 0000000..9f8c91f --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/project.properties @@ -0,0 +1,27 @@ +# 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. + +archetypeGroupId=org.apache.maven.plugins.archetype.its +archetypeArtifactId=archetype241-archetype +archetypeVersion=1.0-SNAPSHOT + +groupId=com.company +artifactId=myArtifactId +version=1.0-SNAPSHOT +package=com.company.project + +projectName=myName http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/verify.groovy ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/verify.groovy b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/verify.groovy new file mode 100644 index 0000000..b66e954 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-241_filter-directory/verify.groovy @@ -0,0 +1,21 @@ +/* + * 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. + */ + +assert new File( basedir, "myArtifactId/myName-test2" ).exists() +assert false == new File( basedir, "myArtifactId/__projectName__-test2" ).exists() \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/invoker.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/invoker.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/invoker.properties new file mode 100644 index 0000000..04b8f23 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/invoker.properties @@ -0,0 +1,18 @@ +# 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. +invoker.goals = org.apache.maven.plugins:maven-archetype-plugin:${project.version}:generate +invoker.buildResult=failure \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/setup.groovy ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/setup.groovy b/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/setup.groovy new file mode 100644 index 0000000..09bbaf8 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/setup.groovy @@ -0,0 +1,23 @@ +/* + * 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. + */ + +// We can't run "mvn clean" as there is no pom. So we need to remove any already +// created project before executing. +directory = new File( basedir, "project" ) +directory.deleteDir() http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/test.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/test.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/test.properties new file mode 100644 index 0000000..9d9daee --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/test.properties @@ -0,0 +1,27 @@ +# 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. + +archetypeGroupId=org.apache.maven.archetypes +archetypeArtifactId=maven-archetype-quickstart +archetypeVersion=1.1 + +groupId=com.company +artifactId=project +version=1.0-SNAPSHOT +package=com.company.project + +goals=UNKNOWNPHASE \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/verify.groovy ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/verify.groovy b/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/verify.groovy new file mode 100644 index 0000000..05a9053 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-517_failing-goals/verify.groovy @@ -0,0 +1,21 @@ +/* + * 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. + */ + +buildLog = new File( basedir, "build.log" ) +assert buildLog.text.contains( "Failed to invoke goals" ) \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/invoker.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/invoker.properties b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/invoker.properties new file mode 100644 index 0000000..963ca6c --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/invoker.properties @@ -0,0 +1,18 @@ +# 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. + +invoker.goals = clean integration-test http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/pom.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/pom.xml b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/pom.xml new file mode 100644 index 0000000..ecc4f16 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/pom.xml @@ -0,0 +1,64 @@ + + + + + + 4.0.0 + + org.apache.maven.plugins.archetype.its + build-archetype-and-run-its-with-existing-parent + 1.0-SNAPSHOT + maven-archetype + + build-archetype-with-existing-parent + packages an archetype then runs IT (archetype:integration-test) within a Maven Project being created through another archetype + + + + + org.apache.maven.archetype + archetype-packaging + @project.version@ + + + + + + + maven-archetype-plugin + @project.version@ + + ${basedir}/test-settings.xml + ${project.build.directory}/local-repo + true + + + + + maven-resources-plugin + + true + + + + + + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/META-INF/maven/archetype-metadata.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000..28ff4bf --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,34 @@ + + + + + + + + src/main/java + + **/*.java + + + + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/archetype-resources/pom.xml b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..7ba4cfb --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,32 @@ + + + + + + 4.0.0 +## There should be no parent specified, as it should be set automatically + + ${groupId} + ${artifactId} + ${version} + + archetype build IT + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/archetype-resources/src/main/java/App.java ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/archetype-resources/src/main/java/App.java b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/archetype-resources/src/main/java/App.java new file mode 100644 index 0000000..0e020bd --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/main/resources/archetype-resources/src/main/java/App.java @@ -0,0 +1,36 @@ +package ${package}; + +/* + * 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. + */ + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + System.out.println( "groupId = ${groupId}" ); + System.out.println( "artifactId = ${artifactId}" ); + System.out.println( "package = ${package}" ); + System.out.println( "packageInPathFormat = ${packageInPathFormat}" ); + } +} http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/archetype.pom.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/archetype.pom.properties b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/archetype.pom.properties new file mode 100644 index 0000000..627146f --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/archetype.pom.properties @@ -0,0 +1,21 @@ +# 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. + +# https://github.com/mojohaus/pom-root, creates simple pom with packaging pom +groupId=org.codehaus.mojo.archetypes +artifactId=pom-root +version=1.1 http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/archetype.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/archetype.properties b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/archetype.properties new file mode 100644 index 0000000..75a95e1 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/archetype.properties @@ -0,0 +1,21 @@ +# 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. + +groupId=com.company +artifactId=project +version=1.0-SNAPSHOT +package=com.company.project http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/archetype.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/archetype.properties b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/archetype.properties new file mode 100644 index 0000000..3560bb4 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/archetype.properties @@ -0,0 +1,21 @@ +# 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. + +version=0.1-SNAPSHOT +groupId=archetype.it +artifactId=basic +package=build.archetype http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/goal.txt ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/goal.txt b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/goal.txt new file mode 100644 index 0000000..f8808ba --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/goal.txt @@ -0,0 +1 @@ +compile \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/reference/pom.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/reference/pom.xml b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/reference/pom.xml new file mode 100644 index 0000000..62a4b5b --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/reference/pom.xml @@ -0,0 +1,32 @@ + + + 4.0.0 + + project + com.company + 1.0-SNAPSHOT + + + archetype.it + basic + 0.1-SNAPSHOT + + archetype build IT + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/reference/src/main/java/build/archetype/App.java ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/reference/src/main/java/build/archetype/App.java b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/reference/src/main/java/build/archetype/App.java new file mode 100644 index 0000000..3119279 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/reference/src/main/java/build/archetype/App.java @@ -0,0 +1,36 @@ +package build.archetype; + +/* + * 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. + */ + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + System.out.println( "groupId = archetype.it" ); + System.out.println( "artifactId = basic" ); + System.out.println( "package = build.archetype" ); + System.out.println( "packageInPathFormat = build/archetype" ); + } +} http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/verify.groovy ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/verify.groovy b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/verify.groovy new file mode 100644 index 0000000..5825797 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/src/test/resources/projects/basic/verify.groovy @@ -0,0 +1,20 @@ +/* + * 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. + */ + +System.out.println("Yeah Baby, it rocks!") \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/test-settings.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/test-settings.xml b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/test-settings.xml new file mode 100644 index 0000000..ab9e16e --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/test-settings.xml @@ -0,0 +1,55 @@ + + + + + + + + it-repo + + true + + + + local.central + @localRepositoryUrl@ + + true + + + true + + + + + + local.central + @localRepositoryUrl@ + + true + + + true + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/verify.bsh ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/verify.bsh b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/verify.bsh new file mode 100644 index 0000000..2d245ae --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-and-run-its-with-existing-parent/verify.bsh @@ -0,0 +1,46 @@ + +/* + * 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. + */ + +import java.io.*; +import org.codehaus.plexus.util.*; + +basedir = new File( basedir, "target/test-classes/projects/basic/project/project/basic" ); +if ( !basedir.exists() ) { + throw new Exception( basedir + " is missing." ); +} + +File main = new File( basedir, "src/main" ); + +// check +File app = new File( main, "java/build/archetype/App.java" ); +if ( !app.isFile() ) +{ + throw new Exception( app + " file is missing or not a file." ); +} + +File buildLog = new File( basedir, "build.log" ); + +String content = FileUtils.fileRead( buildLog, "UTF-8" ); + +int idx = content.indexOf( "Yeah Baby, it rocks!" ); +if ( idx < 0 ) +{ + throw new Exception( "build.log missing System.out.println from verify.groovy" ); +} http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/invoker.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/invoker.properties b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/invoker.properties new file mode 100644 index 0000000..7c3a612 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/invoker.properties @@ -0,0 +1,23 @@ +# 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. + +invoker.goals.1 = clean integration-test +invoker.buildResult.1 = failure + +invoker.goals.2 = clean integration-test -Darchetype.test.ignoreEOLStyle=true +invoker.buildResult.2 = success + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/pom.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/pom.xml b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/pom.xml new file mode 100644 index 0000000..d0970af --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/pom.xml @@ -0,0 +1,63 @@ + + + + + + 4.0.0 + + org.apache.maven.plugins.archetype.its + build-archetype + 1.0-SNAPSHOT + maven-archetype + + build-archetype + packages an archetype then runs IT (archetype:integration-test) + + + + + org.apache.maven.archetype + archetype-packaging + @project.version@ + + + + + + + maven-archetype-plugin + @project.version@ + + ${basedir}/test-settings.xml + ${basedir}/target/local-repo + + + + + maven-resources-plugin + + true + + + + + + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/setup.bsh ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/setup.bsh b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/setup.bsh new file mode 100644 index 0000000..4a20d75 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/setup.bsh @@ -0,0 +1,28 @@ + +/* + * 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. + */ + +resources = new File( basedir, "src/main/resources/archetype-resources/src/main/resources" ); +reference = new File( basedir, "src/test/resources/projects/basic/reference/src/main/resources" ); + +// empty directories not supported by git: create them when preparing the IT +new File( resources, "empty-directory" ).mkdir(); +new File( reference, "empty-directory" ).mkdir(); +new File( resources, "__artifactId__-empty-directory" ).mkdir(); +new File( reference, "basic-empty-directory" ).mkdir(); http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/META-INF/maven/archetype-metadata.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/META-INF/maven/archetype-metadata.xml new file mode 100644 index 0000000..c363e21 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,60 @@ + + + + + + + + + this property has a default value defined in the archetype descriptor + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + **/*.properties + **/__*/ + + + + src/main/resources + + ** + + + + src/site + + ** + + + + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/pom.xml b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..6c23175 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,31 @@ + + + + + + 4.0.0 + + ${groupId} + ${artifactId} + ${version} + + archetype build IT + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/java/App.java ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/java/App.java b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/java/App.java new file mode 100644 index 0000000..0e020bd --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/java/App.java @@ -0,0 +1,36 @@ +package ${package}; + +/* + * 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. + */ + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + System.out.println( "groupId = ${groupId}" ); + System.out.println( "artifactId = ${artifactId}" ); + System.out.println( "package = ${package}" ); + System.out.println( "packageInPathFormat = ${packageInPathFormat}" ); + } +} http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties new file mode 100644 index 0000000..cf96eed --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/resources/__packageInPathFormat__/__package__.properties @@ -0,0 +1,20 @@ +# 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. + +# test file path __propertyName__ replacement with its value +# __packageInPathFormat__ in file directory was replaced with "${packageInPathFormat}" +# __package__ in filename was replaced with "${package}" http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties new file mode 100644 index 0000000..100ffba --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/main/resources/test-__artifactId__.properties @@ -0,0 +1,27 @@ +# 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. + +# test file path __propertyName__ replacement with its value +# __artifactId__ in filename was replaced with "${artifactId}" + +rootArtifactId = ${rootArtifactId} + +requiredPropertyWithoutDefaultValue = ${requiredPropertyWithoutDefaultValue} + +requiredPropertyWithDefaultValue = ${requiredPropertyWithDefaultValue} + +nonRequiredProperty = ${nonRequiredProperty} http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/site/apt/__artifactId__.apt ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/site/apt/__artifactId__.apt b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/site/apt/__artifactId__.apt new file mode 100644 index 0000000..aaa6104 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/main/resources/archetype-resources/src/site/apt/__artifactId__.apt @@ -0,0 +1,21 @@ +~~ 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. + +test: +- non-filtered: ${artifactId} stays intact (not replaced by Velocity) +- packaged: package directory will be added +- __artifactId__ is replaced (even if non-filtered) http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/archetype.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/archetype.properties b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/archetype.properties new file mode 100644 index 0000000..01013f2 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/archetype.properties @@ -0,0 +1,27 @@ +# 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. + +version=0.1-SNAPSHOT +groupId=archetype.it +artifactId=basic +package=build.archetype + +requiredPropertyWithoutDefaultValue=a value defined in archetype.properties + +requiredPropertyWithDefaultValue=not the default value, but a value defined in archetype.properties + +nonRequiredProperty=a property that is not defined as requiredProperty in the archetype descriptor \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/goal.txt ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/goal.txt b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/goal.txt new file mode 100644 index 0000000..f8808ba --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/goal.txt @@ -0,0 +1 @@ +compile \ No newline at end of file http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/pom.xml ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/pom.xml b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/pom.xml new file mode 100644 index 0000000..ed5ad61 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/pom.xml @@ -0,0 +1,31 @@ + + + + + + 4.0.0 + + archetype.it + basic + 0.1-SNAPSHOT + + archetype build IT + http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/java/build/archetype/App.java ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/java/build/archetype/App.java b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/java/build/archetype/App.java new file mode 100644 index 0000000..3119279 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/java/build/archetype/App.java @@ -0,0 +1,36 @@ +package build.archetype; + +/* + * 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. + */ + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + System.out.println( "groupId = archetype.it" ); + System.out.println( "artifactId = basic" ); + System.out.println( "package = build.archetype" ); + System.out.println( "packageInPathFormat = build/archetype" ); + } +} http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/resources/build/archetype/build.archetype.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/resources/build/archetype/build.archetype.properties b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/resources/build/archetype/build.archetype.properties new file mode 100644 index 0000000..f996e64 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/resources/build/archetype/build.archetype.properties @@ -0,0 +1,20 @@ +# 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. + +# test file path __propertyName__ replacement with its value +# __packageInPathFormat__ in file directory was replaced with "build/archetype" +# __package__ in filename was replaced with "build.archetype" http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/resources/test-basic.properties ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/resources/test-basic.properties b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/resources/test-basic.properties new file mode 100644 index 0000000..bc7e8cd --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/main/resources/test-basic.properties @@ -0,0 +1,27 @@ +# 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. + +# test file path __propertyName__ replacement with its value +# __artifactId__ in filename was replaced with "basic" + +rootArtifactId = basic + +requiredPropertyWithoutDefaultValue = a value defined in archetype.properties + +requiredPropertyWithDefaultValue = not the default value, but a value defined in archetype.properties + +nonRequiredProperty = a property that is not defined as requiredProperty in the archetype descriptor http://git-wip-us.apache.org/repos/asf/maven-archetype/blob/2ac48e1c/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/site/build/archetype/apt/basic.apt ---------------------------------------------------------------------- diff --git a/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/site/build/archetype/apt/basic.apt b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/site/build/archetype/apt/basic.apt new file mode 100644 index 0000000..0845f59 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/build-archetype-ignore-eol-encoding/src/test/resources/projects/basic/reference/src/site/build/archetype/apt/basic.apt @@ -0,0 +1 @@ +~~ 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. test: - non-filtered: ${artifactId} stays intact (not replaced by Velocity) - packaged: package directory will be added - __artifactId__ is replaced (even if non-filtered) \ No newline at end of file