-
Notifications
You must be signed in to change notification settings - Fork 113
Add IT using custom plugin repository #497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
82a1e47
fb06fd5
955bc78
f1417d3
bb5dafe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| invoker.goals = clean process-resources |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <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> | ||
| <groupId>org.codehaus.mojo.exec.it</groupId> | ||
| <artifactId>parent</artifactId> | ||
| <version>0.1</version> | ||
| </parent> | ||
|
|
||
| <artifactId>custom-plugin-repository</artifactId> | ||
| <version>0.0.1-SNAPSHOT</version> | ||
| <description> | ||
| Tests executing a JAR which only exists in a custom Maven repository but not in Central | ||
| </description> | ||
|
|
||
| <pluginRepositories> | ||
| <!-- JAR executed by this IT currently only exists in Google Maven repository --> | ||
| <pluginRepository> | ||
| <id>google</id> | ||
| <url>https://maven.google.com</url> | ||
| </pluginRepository> | ||
| </pluginRepositories> | ||
|
|
||
| <build> | ||
| <plugins> | ||
| <plugin> | ||
| <groupId>org.codehaus.mojo</groupId> | ||
| <artifactId>exec-maven-plugin</artifactId> | ||
| <version>@project.version@</version> | ||
| <executions> | ||
| <execution> | ||
| <phase>process-resources</phase> | ||
| <goals> | ||
| <goal>java</goal> | ||
| </goals> | ||
| </execution> | ||
| </executions> | ||
| <configuration> | ||
| <addOutputToClasspath>false</addOutputToClasspath> | ||
| <includeProjectDependencies>false</includeProjectDependencies> | ||
| <includePluginDependencies>true</includePluginDependencies> | ||
| <!-- Runs R8, see also https://r8.googlesource.com/r8/+/refs/heads/main/README.md --> | ||
| <executableDependency> | ||
| <groupId>com.android.tools</groupId> | ||
| <artifactId>r8</artifactId> | ||
| </executableDependency> | ||
| <mainClass>com.android.tools.r8.R8</mainClass> | ||
| <arguments> | ||
| <argument>--version</argument> | ||
| </arguments> | ||
| </configuration> | ||
| <dependencies> | ||
| <dependency> | ||
| <groupId>com.android.tools</groupId> | ||
| <artifactId>r8</artifactId> | ||
| <!-- Use old version whose artifact is 'relatively' small --> | ||
| <version>2.0.98 </version> | ||
| </dependency> | ||
| </dependencies> | ||
| </plugin> | ||
| </plugins> | ||
| </build> | ||
| </project> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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. | ||
| */ | ||
|
|
||
| File buildLog = new File(basedir, 'build.log') | ||
| assert buildLog.exists() | ||
| def buildLogText = buildLog.getText() | ||
| // Should have downloaded artifact from custom repository, not from Central | ||
| // (requires running `mvn clean ...`) | ||
| assert buildLogText.contains('Downloaded from google: https://maven.google.com/com/android/tools/r8/2.0.98/r8-2.0.98.jar') | ||
|
||
| // Should contain program output | ||
| assert buildLogText.contains('R8 2.0.98 (build engineering)') | ||
Uh oh!
There was an error while loading. Please reload this page.