This is an automated email from the ASF dual-hosted git repository. khmarbaise pushed a commit to branch MSOURCES-110 in repository https://gitbox.apache.org/repos/asf/maven-source-plugin.git
commit 485988f46fccc486a57271442b0752a348753626 Author: Karl Heinz Marbaise <khmarba...@apache.org> AuthorDate: Sat Feb 24 12:57:33 2018 +0100 [MSOURCES-110] - Add IT to prevent readonly=true problem with parameter o Added IT's for all goals to check parameters and keep parameters visible for users. --- .../invoker.properties | 18 +++++++++ .../pom.xml | 42 ++++++++++++++++++++ .../verify.groovy | 45 ++++++++++++++++++++++ .../invoker.properties | 18 +++++++++ src/it/verify-parameter-goal-jar-no-fork/pom.xml | 42 ++++++++++++++++++++ .../verify.groovy | 45 ++++++++++++++++++++++ .../verify-parameter-goal-jar/invoker.properties | 18 +++++++++ src/it/verify-parameter-goal-jar/pom.xml | 42 ++++++++++++++++++++ src/it/verify-parameter-goal-jar/verify.groovy | 45 ++++++++++++++++++++++ .../invoker.properties | 18 +++++++++ .../verify-parameter-goal-test-jar-no-fork/pom.xml | 42 ++++++++++++++++++++ .../verify.groovy | 45 ++++++++++++++++++++++ .../invoker.properties | 18 +++++++++ src/it/verify-parameter-goal-test-jar/pom.xml | 42 ++++++++++++++++++++ .../verify-parameter-goal-test-jar/verify.groovy | 45 ++++++++++++++++++++++ 15 files changed, 525 insertions(+) diff --git a/src/it/verify-parameter-goal-generated-test-jar/invoker.properties b/src/it/verify-parameter-goal-generated-test-jar/invoker.properties new file mode 100644 index 0000000..1ca79fd --- /dev/null +++ b/src/it/verify-parameter-goal-generated-test-jar/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=${project.groupId}:${project.artifactId}:${project.version}:help -Dgoal=generated-test-jar -Ddetail=true diff --git a/src/it/verify-parameter-goal-generated-test-jar/pom.xml b/src/it/verify-parameter-goal-generated-test-jar/pom.xml new file mode 100755 index 0000000..4fb98cf --- /dev/null +++ b/src/it/verify-parameter-goal-generated-test-jar/pom.xml @@ -0,0 +1,42 @@ +<?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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.maven.its.source</groupId> + <artifactId>checkparameter-goal-generated-test-jar</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Test for parameters in goal: generated-test-jar</name> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>@project.version@</version> + </plugin> + </plugins> + </build> + +</project> diff --git a/src/it/verify-parameter-goal-generated-test-jar/verify.groovy b/src/it/verify-parameter-goal-generated-test-jar/verify.groovy new file mode 100644 index 0000000..8ce92b3 --- /dev/null +++ b/src/it/verify-parameter-goal-generated-test-jar/verify.groovy @@ -0,0 +1,45 @@ + +/* + * 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. + */ + +File buildLog = new File( basedir, 'build.log' ) + +assert buildLog.exists() + +assert buildLog.text.contains('source:test-jar') +assert buildLog.text.contains(' archive') +assert buildLog.text.contains(' attach (Default: true)') +assert buildLog.text.contains(' classifier (Default: test-sources)') +assert buildLog.text.contains(' defaultManifestFile (Default:') +assert buildLog.text.contains(' ${project.build.outputDirectory}/META-INF/MANIFEST.MF)') +assert buildLog.text.contains(' excludeResources (Default: false)') +assert buildLog.text.contains(' excludes') +assert buildLog.text.contains(' finalName (Default: ${project.build.finalName})') +assert buildLog.text.contains(' forceCreation (Default: false)') +assert buildLog.text.contains(' includePom (Default: false)') +assert buildLog.text.contains(' includes') +assert buildLog.text.contains(' outputDirectory (Default: ${project.build.directory})') +assert buildLog.text.contains(' skipSource (Default: false)') +assert buildLog.text.contains(' useDefaultExcludes (Default: true)') +assert buildLog.text.contains(' useDefaultManifestFile (Default: false)') + +// Make sure the session/reactorProjects will not be visible for users +assert !buildLog.text.contains(' session (Default: ${session})') +assert !buildLog.text.contains(' reactorProjects (Default: ${reactorProjects})') + diff --git a/src/it/verify-parameter-goal-jar-no-fork/invoker.properties b/src/it/verify-parameter-goal-jar-no-fork/invoker.properties new file mode 100644 index 0000000..3c9b5aa --- /dev/null +++ b/src/it/verify-parameter-goal-jar-no-fork/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=${project.groupId}:${project.artifactId}:${project.version}:help -Dgoal=jar-no-fork -Ddetail=true diff --git a/src/it/verify-parameter-goal-jar-no-fork/pom.xml b/src/it/verify-parameter-goal-jar-no-fork/pom.xml new file mode 100755 index 0000000..bfec931 --- /dev/null +++ b/src/it/verify-parameter-goal-jar-no-fork/pom.xml @@ -0,0 +1,42 @@ +<?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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.maven.its.source</groupId> + <artifactId>checkparameter-goal-jar-no-fork</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Test for parameters in goal: jar-no-fork</name> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>@project.version@</version> + </plugin> + </plugins> + </build> + +</project> diff --git a/src/it/verify-parameter-goal-jar-no-fork/verify.groovy b/src/it/verify-parameter-goal-jar-no-fork/verify.groovy new file mode 100644 index 0000000..7294aa6 --- /dev/null +++ b/src/it/verify-parameter-goal-jar-no-fork/verify.groovy @@ -0,0 +1,45 @@ + +/* + * 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. + */ + +File buildLog = new File( basedir, 'build.log' ) + +assert buildLog.exists() + +assert buildLog.text.contains('source:jar-no-fork') +assert buildLog.text.contains(' archive') +assert buildLog.text.contains(' attach (Default: true)') +assert buildLog.text.contains(' classifier (Default: sources)') +assert buildLog.text.contains(' defaultManifestFile (Default:') +assert buildLog.text.contains(' ${project.build.outputDirectory}/META-INF/MANIFEST.MF)') +assert buildLog.text.contains(' excludeResources (Default: false)') +assert buildLog.text.contains(' excludes') +assert buildLog.text.contains(' finalName (Default: ${project.build.finalName})') +assert buildLog.text.contains(' forceCreation (Default: false)') +assert buildLog.text.contains(' includePom (Default: false)') +assert buildLog.text.contains(' includes') +assert buildLog.text.contains(' outputDirectory (Default: ${project.build.directory})') +assert buildLog.text.contains(' skipSource (Default: false)') +assert buildLog.text.contains(' useDefaultExcludes (Default: true)') +assert buildLog.text.contains(' useDefaultManifestFile (Default: false)') + +// Make sure the session/reactorProjects will not be visible for users +assert !buildLog.text.contains(' session (Default: ${session})') +assert !buildLog.text.contains(' reactorProjects (Default: ${reactorProjects})') + diff --git a/src/it/verify-parameter-goal-jar/invoker.properties b/src/it/verify-parameter-goal-jar/invoker.properties new file mode 100644 index 0000000..8deaf2f --- /dev/null +++ b/src/it/verify-parameter-goal-jar/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=${project.groupId}:${project.artifactId}:${project.version}:help -Dgoal=jar -Ddetail=true diff --git a/src/it/verify-parameter-goal-jar/pom.xml b/src/it/verify-parameter-goal-jar/pom.xml new file mode 100755 index 0000000..4bf4173 --- /dev/null +++ b/src/it/verify-parameter-goal-jar/pom.xml @@ -0,0 +1,42 @@ +<?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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.maven.its.source</groupId> + <artifactId>checkparameter-goal-jar</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Test for parameters in goal: jar</name> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>@project.version@</version> + </plugin> + </plugins> + </build> + +</project> diff --git a/src/it/verify-parameter-goal-jar/verify.groovy b/src/it/verify-parameter-goal-jar/verify.groovy new file mode 100644 index 0000000..1184d4a --- /dev/null +++ b/src/it/verify-parameter-goal-jar/verify.groovy @@ -0,0 +1,45 @@ + +/* + * 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. + */ + +File buildLog = new File( basedir, 'build.log' ) + +assert buildLog.exists() + +assert buildLog.text.contains('source:jar') +assert buildLog.text.contains(' archive') +assert buildLog.text.contains(' attach (Default: true)') +assert buildLog.text.contains(' classifier (Default: sources)') +assert buildLog.text.contains(' defaultManifestFile (Default:') +assert buildLog.text.contains(' ${project.build.outputDirectory}/META-INF/MANIFEST.MF)') +assert buildLog.text.contains(' excludeResources (Default: false)') +assert buildLog.text.contains(' excludes') +assert buildLog.text.contains(' finalName (Default: ${project.build.finalName})') +assert buildLog.text.contains(' forceCreation (Default: false)') +assert buildLog.text.contains(' includePom (Default: false)') +assert buildLog.text.contains(' includes') +assert buildLog.text.contains(' outputDirectory (Default: ${project.build.directory})') +assert buildLog.text.contains(' skipSource (Default: false)') +assert buildLog.text.contains(' useDefaultExcludes (Default: true)') +assert buildLog.text.contains(' useDefaultManifestFile (Default: false)') + +// Make sure the session/reactorProjects will not be visible for users +assert !buildLog.text.contains(' session (Default: ${session})') +assert !buildLog.text.contains(' reactorProjects (Default: ${reactorProjects})') + diff --git a/src/it/verify-parameter-goal-test-jar-no-fork/invoker.properties b/src/it/verify-parameter-goal-test-jar-no-fork/invoker.properties new file mode 100644 index 0000000..5d1726c --- /dev/null +++ b/src/it/verify-parameter-goal-test-jar-no-fork/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=${project.groupId}:${project.artifactId}:${project.version}:help -Dgoal=test-jar-no-fork -Ddetail=true diff --git a/src/it/verify-parameter-goal-test-jar-no-fork/pom.xml b/src/it/verify-parameter-goal-test-jar-no-fork/pom.xml new file mode 100755 index 0000000..8a8e1ad --- /dev/null +++ b/src/it/verify-parameter-goal-test-jar-no-fork/pom.xml @@ -0,0 +1,42 @@ +<?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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.maven.its.source</groupId> + <artifactId>checkparameter-goal-test-jar-no-fork</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Test for parameters in goal: test-jar-no-fork</name> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>@project.version@</version> + </plugin> + </plugins> + </build> + +</project> diff --git a/src/it/verify-parameter-goal-test-jar-no-fork/verify.groovy b/src/it/verify-parameter-goal-test-jar-no-fork/verify.groovy new file mode 100644 index 0000000..572b9bc --- /dev/null +++ b/src/it/verify-parameter-goal-test-jar-no-fork/verify.groovy @@ -0,0 +1,45 @@ + +/* + * 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. + */ + +File buildLog = new File( basedir, 'build.log' ) + +assert buildLog.exists() + +assert buildLog.text.contains('source:test-jar-no-fork') +assert buildLog.text.contains(' archive') +assert buildLog.text.contains(' attach (Default: true)') +assert buildLog.text.contains(' classifier (Default: test-sources)') +assert buildLog.text.contains(' defaultManifestFile (Default:') +assert buildLog.text.contains(' ${project.build.outputDirectory}/META-INF/MANIFEST.MF)') +assert buildLog.text.contains(' excludeResources (Default: false)') +assert buildLog.text.contains(' excludes') +assert buildLog.text.contains(' finalName (Default: ${project.build.finalName})') +assert buildLog.text.contains(' forceCreation (Default: false)') +assert buildLog.text.contains(' includePom (Default: false)') +assert buildLog.text.contains(' includes') +assert buildLog.text.contains(' outputDirectory (Default: ${project.build.directory})') +assert buildLog.text.contains(' skipSource (Default: false)') +assert buildLog.text.contains(' useDefaultExcludes (Default: true)') +assert buildLog.text.contains(' useDefaultManifestFile (Default: false)') + +// Make sure the session/reactorProjects will not be visible for users +assert !buildLog.text.contains(' session (Default: ${session})') +assert !buildLog.text.contains(' reactorProjects (Default: ${reactorProjects})') + diff --git a/src/it/verify-parameter-goal-test-jar/invoker.properties b/src/it/verify-parameter-goal-test-jar/invoker.properties new file mode 100644 index 0000000..965f21c --- /dev/null +++ b/src/it/verify-parameter-goal-test-jar/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=${project.groupId}:${project.artifactId}:${project.version}:help -Dgoal=test-jar -Ddetail=true diff --git a/src/it/verify-parameter-goal-test-jar/pom.xml b/src/it/verify-parameter-goal-test-jar/pom.xml new file mode 100755 index 0000000..8591932 --- /dev/null +++ b/src/it/verify-parameter-goal-test-jar/pom.xml @@ -0,0 +1,42 @@ +<?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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.maven.its.source</groupId> + <artifactId>checkparameter-goal-test-jar</artifactId> + <version>1.0-SNAPSHOT</version> + + <name>Test for parameters in goal: test-jar</name> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>@project.version@</version> + </plugin> + </plugins> + </build> + +</project> diff --git a/src/it/verify-parameter-goal-test-jar/verify.groovy b/src/it/verify-parameter-goal-test-jar/verify.groovy new file mode 100644 index 0000000..8ce92b3 --- /dev/null +++ b/src/it/verify-parameter-goal-test-jar/verify.groovy @@ -0,0 +1,45 @@ + +/* + * 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. + */ + +File buildLog = new File( basedir, 'build.log' ) + +assert buildLog.exists() + +assert buildLog.text.contains('source:test-jar') +assert buildLog.text.contains(' archive') +assert buildLog.text.contains(' attach (Default: true)') +assert buildLog.text.contains(' classifier (Default: test-sources)') +assert buildLog.text.contains(' defaultManifestFile (Default:') +assert buildLog.text.contains(' ${project.build.outputDirectory}/META-INF/MANIFEST.MF)') +assert buildLog.text.contains(' excludeResources (Default: false)') +assert buildLog.text.contains(' excludes') +assert buildLog.text.contains(' finalName (Default: ${project.build.finalName})') +assert buildLog.text.contains(' forceCreation (Default: false)') +assert buildLog.text.contains(' includePom (Default: false)') +assert buildLog.text.contains(' includes') +assert buildLog.text.contains(' outputDirectory (Default: ${project.build.directory})') +assert buildLog.text.contains(' skipSource (Default: false)') +assert buildLog.text.contains(' useDefaultExcludes (Default: true)') +assert buildLog.text.contains(' useDefaultManifestFile (Default: false)') + +// Make sure the session/reactorProjects will not be visible for users +assert !buildLog.text.contains(' session (Default: ${session})') +assert !buildLog.text.contains(' reactorProjects (Default: ${reactorProjects})') + -- To stop receiving notification emails like this one, please contact khmarba...@apache.org.