This is an automated email from the ASF dual-hosted git repository. rfscholte pushed a commit to branch ARCHETYPE-606 in repository https://gitbox.apache.org/repos/asf/maven-archetype.git
commit 329cc0247c58546caf4015de726383b8d16af8a1 Author: Peter Lamby <[email protected]> AuthorDate: Fri Oct 9 14:36:51 2020 +0200 Add it for exclude behaviour --- .../archetype.properties | 18 ++++++ .../invoker.properties | 18 ++++++ .../ARCHETYPE-606_include-gitignore/pom.xml | 75 ++++++++++++++++++++++ .../META-INF/maven/archetype-metadata.xml | 34 ++++++++++ .../main/resources/archetype-resources/.gitignore | 1 + .../src/main/resources/archetype-resources/pom.xml | 50 +++++++++++++++ .../archetype-resources/src/main/java/App.java | 36 +++++++++++ .../resources/projects/archetype.pom.properties | 21 ++++++ .../test/resources/projects/archetype.properties | 21 ++++++ .../resources/projects/basic/archetype.properties | 21 ++++++ .../src/test/resources/projects/basic/goal.txt | 1 + .../resources/projects/basic/reference/.gitignore | 1 + .../resources/projects/basic/reference/pom.xml | 50 +++++++++++++++ .../src/main/java/build/archetype/App.java | 36 +++++++++++ .../test/resources/projects/basic/verify.groovy | 21 ++++++ .../test-settings.xml | 55 ++++++++++++++++ .../ARCHETYPE-606_include-gitignore/verify.bsh | 46 +++++++++++++ 17 files changed, 505 insertions(+) diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/archetype.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/archetype.properties new file mode 100644 index 0000000..74cf9cb --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/archetype.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. + +excludePatterns=build.log,invoker.properties,verify.groovy diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/invoker.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/invoker.properties new file mode 100644 index 0000000..963ca6c --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/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 diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/pom.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/pom.xml new file mode 100644 index 0000000..82eadc3 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/pom.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.maven.plugins.archetype.its</groupId> + <artifactId>build-archetype-and-run-its</artifactId> + <version>1.0-SNAPSHOT</version> + <packaging>maven-archetype</packaging> + + <name>build-archetype-and-run-its</name> + <description>packages an archetype then runs IT (archetype:integration-test)</description> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <build> + <extensions> + <extension> + <groupId>org.apache.maven.archetype</groupId> + <artifactId>archetype-packaging</artifactId> + <version>@project.version@</version> + </extension> + </extensions> + + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-archetype-plugin</artifactId> + <version>@project.version@</version> + <configuration> + <settingsFile>${basedir}/test-settings.xml</settingsFile> + <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath> + <ignoreEOLStyle>true</ignoreEOLStyle> + <useDefaultExcludes>false</useDefaultExcludes> + <properties> + <maven.compiler.source>${maven.compiler.source}</maven.compiler.source> + <maven.compiler.target>${maven.compiler.target}</maven.compiler.target> + <!-- e.g. ensure that Java7 picks up TLSv1.2 when connecting with Central --> + <https.protocols>${https.protocols}</https.protocols> + </properties> + </configuration> + </plugin> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <configuration> + <includeEmptyDirs>true</includeEmptyDirs> + <addDefaultExcludes>false</addDefaultExcludes> + </configuration> + </plugin> + </plugins> + </pluginManagement> + </build> +</project> diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/main/resources/META-INF/maven/archetype-metadata.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/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/ARCHETYPE-606_include-gitignore/src/main/resources/META-INF/maven/archetype-metadata.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<archetype-descriptor xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd" + name="build-archetype-IT"> + <fileSets> + <fileSet filtered="true" packaged="true" encoding="UTF-8"> + <directory>src/main/java</directory> + <includes> + <include>**/*.java</include> + </includes> + </fileSet> + </fileSets> +</archetype-descriptor> diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/main/resources/archetype-resources/.gitignore b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/main/resources/archetype-resources/.gitignore new file mode 100644 index 0000000..403f980 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/main/resources/archetype-resources/.gitignore @@ -0,0 +1 @@ +# Dummy diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/main/resources/archetype-resources/pom.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/main/resources/archetype-resources/pom.xml new file mode 100644 index 0000000..aa77176 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/main/resources/archetype-resources/pom.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> +## There should be no parent specified, as it should be set automatically + + <groupId>${groupId}</groupId> + <artifactId>${artifactId}</artifactId> + <version>${version}</version> + + <name>archetype build IT</name> + + <properties> + <javaVersion>6</javaVersion> + <maven.compiler.source>1.${javaVersion}</maven.compiler.source> + <maven.compiler.target>1.${javaVersion}</maven.compiler.target> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <build> + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + </plugin> + </plugins> + </pluginManagement> + </build> +</project> diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/main/resources/archetype-resources/src/main/java/App.java b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/main/resources/archetype-resources/src/main/java/App.java new file mode 100644 index 0000000..eb9b6c7 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/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}" ); + } +} diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/archetype.pom.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/archetype.pom.properties new file mode 100644 index 0000000..627146f --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/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 diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/archetype.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/archetype.properties new file mode 100644 index 0000000..75a95e1 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/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 diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/archetype.properties b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/archetype.properties new file mode 100644 index 0000000..3560bb4 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/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 diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/goal.txt b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/goal.txt new file mode 100644 index 0000000..f8808ba --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/goal.txt @@ -0,0 +1 @@ +compile \ No newline at end of file diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/reference/.gitignore b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/reference/.gitignore new file mode 100644 index 0000000..403f980 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/reference/.gitignore @@ -0,0 +1 @@ +# Dummy diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/reference/pom.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/reference/pom.xml new file mode 100644 index 0000000..1039f6a --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/reference/pom.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +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. +--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>project</artifactId> + <groupId>com.company</groupId> + <version>1.0-SNAPSHOT</version> + </parent> + + <groupId>archetype.it</groupId> + <artifactId>basic</artifactId> + <version>0.1-SNAPSHOT</version> + + <name>archetype build IT</name> + + <properties> + <javaVersion>6</javaVersion> + <maven.compiler.source>1.${javaVersion}</maven.compiler.source> + <maven.compiler.target>1.${javaVersion}</maven.compiler.target> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + + <build> + <pluginManagement> + <plugins> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <version>3.7.0</version> + </plugin> + </plugins> + </pluginManagement> + </build> +</project> diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/reference/src/main/java/build/archetype/App.java b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/reference/src/main/java/build/archetype/App.java new file mode 100644 index 0000000..d507638 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/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" ); + } +} diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/verify.groovy b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/verify.groovy new file mode 100644 index 0000000..02d9429 --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/src/test/resources/projects/basic/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. + */ + +println( 'Yeah Baby, it rocks!' ) +System.out.flush() diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/test-settings.xml b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/test-settings.xml new file mode 100644 index 0000000..ab9e16e --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/test-settings.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +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. +--> + +<settings> + <profiles> + <profile> + <id>it-repo</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <repositories> + <repository> + <id>local.central</id> + <url>@localRepositoryUrl@</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>local.central</id> + <url>@localRepositoryUrl@</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + </profiles> +</settings> \ No newline at end of file diff --git a/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/verify.bsh b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/verify.bsh new file mode 100644 index 0000000..2d245ae --- /dev/null +++ b/maven-archetype-plugin/src/it/projects/ARCHETYPE-606_include-gitignore/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 <fileset packaged="true"> +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" ); +}
