[Commented] (MRESOURCES-239) Resources do not copy with Maven 3.3.9

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Commented] (MRESOURCES-239) Resources do not copy with Maven 3.3.9

JIRA jira@apache.org

    [ https://issues.apache.org/jira/browse/MRESOURCES-239?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16200157#comment-16200157 ]

Michael Osipov commented on MRESOURCES-239:
-------------------------------------------

Alright, let me have a look.

> Resources do not copy with Maven 3.3.9
> --------------------------------------
>
>                 Key: MRESOURCES-239
>                 URL: https://issues.apache.org/jira/browse/MRESOURCES-239
>             Project: Maven Resources Plugin
>          Issue Type: Bug
>          Components: copy
>    Affects Versions: 3.0.2
>            Reporter: Kory Lasker
>         Attachments: testingMaven.7z
>
>
> Using a simple POM, I try to copy a filtered file to a specific output directory:
> {code}
> <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>me.app</groupId>
> <artifactId>testingMaven</artifactId>
> <version>0.0.1-SNAPSHOT</version>
> <build>
> <plugins>
> <plugin>
> <!-- This will build all files for the environment specifically. Need
> to run 'mvn resources:resources -P {buildname}' for EACH environment specifically. -->
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-resources-plugin</artifactId>
> <version>3.0.2</version>
> <configuration>
> <overwrite>true</overwrite>
> <outputDirectory>${project.build.directory}/allConfig}</outputDirectory>
> <resources>
> <filtering>true</filtering>
> <resource>
> <directory>src/main/resources</directory>
> </resource>
> </resources>
> </configuration>
> </plugin>
> </plugins>
> </build>
> <profiles>
> <profile>
> <id>dev</id>
> <properties>
> <buildtime>Development Build ${maven.build.timestamp}</buildtime>
> </properties>
> </profile>
> </profiles>
> </project>
> {code}
> I then run mvn resources::resources -P dev with debugging and get this:
> {code}
> Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T10:41:47-06:00)
> Maven home: C:\Program Files (x86)\apache-maven-3.3.9
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: C:\Program Files\Java\jdk1.8.0_131\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"
> [DEBUG] Created new class realm maven.api
> [DEBUG] Importing foreign packages into class realm maven.api
> [DEBUG]   Imported: javax.enterprise.inject.* < plexus.core
> [DEBUG]   Imported: javax.enterprise.util.* < plexus.core
> [DEBUG]   Imported: javax.inject.* < plexus.core
> [DEBUG]   Imported: org.apache.maven.* < plexus.core
> [DEBUG]   Imported: org.apache.maven.artifact < plexus.core
> [DEBUG]   Imported: org.apache.maven.classrealm < plexus.core
> [DEBUG]   Imported: org.apache.maven.cli < plexus.core
> [DEBUG]   Imported: org.apache.maven.configuration < plexus.core
> [DEBUG]   Imported: org.apache.maven.exception < plexus.core
> [DEBUG]   Imported: org.apache.maven.execution < plexus.core
> [DEBUG]   Imported: org.apache.maven.execution.scope < plexus.core
> [DEBUG]   Imported: org.apache.maven.lifecycle < plexus.core
> [DEBUG]   Imported: org.apache.maven.model < plexus.core
> [DEBUG]   Imported: org.apache.maven.monitor < plexus.core
> [DEBUG]   Imported: org.apache.maven.plugin < plexus.core
> [DEBUG]   Imported: org.apache.maven.profiles < plexus.core
> [DEBUG]   Imported: org.apache.maven.project < plexus.core
> [DEBUG]   Imported: org.apache.maven.reporting < plexus.core
> [DEBUG]   Imported: org.apache.maven.repository < plexus.core
> [DEBUG]   Imported: org.apache.maven.rtinfo < plexus.core
> [DEBUG]   Imported: org.apache.maven.settings < plexus.core
> [DEBUG]   Imported: org.apache.maven.toolchain < plexus.core
> [DEBUG]   Imported: org.apache.maven.usability < plexus.core
> [DEBUG]   Imported: org.apache.maven.wagon.* < plexus.core
> [DEBUG]   Imported: org.apache.maven.wagon.authentication < plexus.core
> [DEBUG]   Imported: org.apache.maven.wagon.authorization < plexus.core
> [DEBUG]   Imported: org.apache.maven.wagon.events < plexus.core
> [DEBUG]   Imported: org.apache.maven.wagon.observers < plexus.core
> [DEBUG]   Imported: org.apache.maven.wagon.proxy < plexus.core
> [DEBUG]   Imported: org.apache.maven.wagon.repository < plexus.core
> [DEBUG]   Imported: org.apache.maven.wagon.resource < plexus.core
> [DEBUG]   Imported: org.codehaus.classworlds < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.* < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.classworlds < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.component < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.configuration < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.container < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.context < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.lifecycle < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.logging < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.personality < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.util.xml.Xpp3Dom < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParser < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlPullParserException < plexus.core
> [DEBUG]   Imported: org.codehaus.plexus.util.xml.pull.XmlSerializer < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.* < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.artifact < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.collection < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.deployment < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.graph < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.impl < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.installation < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.internal.impl < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.metadata < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.repository < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.resolution < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.spi < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.transfer < plexus.core
> [DEBUG]   Imported: org.eclipse.aether.version < plexus.core
> [DEBUG]   Imported: org.slf4j.* < plexus.core
> [DEBUG]   Imported: org.slf4j.helpers.* < plexus.core
> [DEBUG]   Imported: org.slf4j.spi.* < plexus.core
> [DEBUG] Populating class realm maven.api
> [INFO] Error stacktraces are turned on.
> [DEBUG] Reading global settings from C:\Program Files (x86)\apache-maven-3.3.9\conf\settings.xml
> [DEBUG] Reading user settings from C:\Users\xxxx\.m2\settings.xml
> [DEBUG] Reading global toolchains from C:\Program Files (x86)\apache-maven-3.3.9\conf\toolchains.xml
> [DEBUG] Reading user toolchains from C:\Users\xxxxx\.m2\toolchains.xml
> [DEBUG] Using local repository at C:\Users\xxxxx\.m2\repository
> [DEBUG] Using manager EnhancedLocalRepositoryManager with priority 10.0 for C:\Users\xxxxx\.m2\repository
> [INFO] Scanning for projects...
> [DEBUG] Extension realms for project me.app:testingMaven:jar:0.0.1-SNAPSHOT: (none)
> [DEBUG] Looking up lifecyle mappings for packaging jar from ClassRealm[plexus.core, parent: null]
> [DEBUG] Resolving plugin prefix resources from [org.apache.maven.plugins, org.codehaus.mojo]
> [DEBUG] Resolved plugin prefix resources to org.apache.maven.plugins:maven-resources-plugin from POM me.app:testingMaven:jar:0.0.1-SNAPSHOT
> [DEBUG] === REACTOR BUILD PLAN ================================================
> [DEBUG] Project: me.app:testingMaven:jar:0.0.1-SNAPSHOT
> [DEBUG] Tasks:   [resources:resources]
> [DEBUG] Style:   Regular
> [DEBUG] =======================================================================
> [INFO]                                                                        
> [INFO] ------------------------------------------------------------------------
> [INFO] Building testingMaven 0.0.1-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [DEBUG] Resolving plugin prefix resources from [org.apache.maven.plugins, org.codehaus.mojo]
> [DEBUG] Resolved plugin prefix resources to org.apache.maven.plugins:maven-resources-plugin from POM me.app:testingMaven:jar:0.0.1-SNAPSHOT
> [DEBUG] Lifecycle default -> [validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy]
> [DEBUG] Lifecycle clean -> [pre-clean, clean, post-clean]
> [DEBUG] Lifecycle site -> [pre-site, site, post-site, site-deploy]
> [DEBUG] === PROJECT BUILD PLAN ================================================
> [DEBUG] Project:       me.app:testingMaven:0.0.1-SNAPSHOT
> [DEBUG] Dependencies (collect): []
> [DEBUG] Dependencies (resolve): []
> [DEBUG] -----------------------------------------------------------------------
> [DEBUG] Goal:          org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources (default-cli)
> [DEBUG] Style:         Regular
> [DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
> <configuration>
>   <addDefaultExcludes default-value="true"/>
>   <buildFilters default-value="${project.build.filters}"/>
>   <encoding default-value="${project.build.sourceEncoding}"/>
>   <escapeWindowsPaths default-value="true"/>
>   <fileNameFiltering default-value="false"/>
>   <includeEmptyDirs default-value="false"/>
>   <outputDirectory default-value="${project.build.outputDirectory}">C:\Workspace\testingMaven\target/allConfig}</outputDirectory>
>   <overwrite default-value="false">true</overwrite>
>   <project default-value="${project}"/>
>   <resources default-value="${project.resources}">
>     <filtering>true</filtering>
>     <resource>
>       <directory>src/main/resources</directory>
>     </resource>
>   </resources>
>   <session default-value="${session}"/>
>   <skip default-value="false">${maven.resources.skip}</skip>
>   <supportMultiLineFiltering default-value="false"/>
>   <useBuildFilters default-value="true"/>
>   <useDefaultDelimiters default-value="true"/>
> </configuration>
> [DEBUG] =======================================================================
> [INFO]
> [INFO] --- maven-resources-plugin:3.0.2:resources (default-cli) @ testingMaven ---
> [DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=3, ConflictMarker.markTime=2, ConflictMarker.nodeCount=68, ConflictIdSorter.graphTime=1, ConflictIdSorter.topsortTime=1, ConflictIdSorter.conflictIdCount=28, ConflictIdSorter.conflictIdCycleCount=0, ConflictResolver.totalTime=16, ConflictResolver.conflictItemCount=67, DefaultDependencyCollector.collectTime=694, DefaultDependencyCollector.transformTime=26}
> [DEBUG] org.apache.maven.plugins:maven-resources-plugin:jar:3.0.2:
> [DEBUG]    org.apache.maven:maven-plugin-api:jar:3.0:compile
> [DEBUG]       org.apache.maven:maven-artifact:jar:3.0:compile
> [DEBUG]       org.sonatype.sisu:sisu-inject-plexus:jar:1.4.2:compile
> [DEBUG]          org.sonatype.sisu:sisu-inject-bean:jar:1.4.2:compile
> [DEBUG]             org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7:compile
> [DEBUG]    org.apache.maven:maven-core:jar:3.0:compile
> [DEBUG]       org.apache.maven:maven-settings:jar:3.0:compile
> [DEBUG]       org.apache.maven:maven-settings-builder:jar:3.0:compile
> [DEBUG]       org.apache.maven:maven-repository-metadata:jar:3.0:compile
> [DEBUG]       org.apache.maven:maven-model-builder:jar:3.0:compile
> [DEBUG]       org.apache.maven:maven-aether-provider:jar:3.0:runtime
> [DEBUG]       org.sonatype.aether:aether-impl:jar:1.7:compile
> [DEBUG]          org.sonatype.aether:aether-spi:jar:1.7:compile
> [DEBUG]       org.sonatype.aether:aether-api:jar:1.7:compile
> [DEBUG]       org.sonatype.aether:aether-util:jar:1.7:compile
> [DEBUG]       org.codehaus.plexus:plexus-classworlds:jar:2.2.3:compile
> [DEBUG]       org.codehaus.plexus:plexus-component-annotations:jar:1.6:compile
> [DEBUG]       org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3:compile
> [DEBUG]          org.sonatype.plexus:plexus-cipher:jar:1.4:compile
> [DEBUG]    org.apache.maven:maven-model:jar:3.0:compile
> [DEBUG]    org.codehaus.plexus:plexus-utils:jar:3.0.24:compile
> [DEBUG]    org.apache.maven.shared:maven-filtering:jar:3.1.1:compile
> [DEBUG]       org.apache.maven.shared:maven-shared-utils:jar:3.0.0:compile
> [DEBUG]          com.google.code.findbugs:jsr305:jar:2.0.1:compile
> [DEBUG]       org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile
> [DEBUG]    commons-io:commons-io:jar:2.5:compile
> [DEBUG]    org.codehaus.plexus:plexus-interpolation:jar:1.24:compile
> [DEBUG] Created new class realm plugin>org.apache.maven.plugins:maven-resources-plugin:3.0.2
> [DEBUG] Importing foreign packages into class realm plugin>org.apache.maven.plugins:maven-resources-plugin:3.0.2
> [DEBUG]   Imported:  < maven.api
> [DEBUG] Populating class realm plugin>org.apache.maven.plugins:maven-resources-plugin:3.0.2
> [DEBUG]   Included: org.apache.maven.plugins:maven-resources-plugin:jar:3.0.2
> [DEBUG]   Included: org.sonatype.sisu:sisu-inject-bean:jar:1.4.2
> [DEBUG]   Included: org.sonatype.sisu:sisu-guice:jar:noaop:2.1.7
> [DEBUG]   Included: org.sonatype.aether:aether-util:jar:1.7
> [DEBUG]   Included: org.codehaus.plexus:plexus-component-annotations:jar:1.6
> [DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
> [DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4
> [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.0.24
> [DEBUG]   Included: org.apache.maven.shared:maven-filtering:jar:3.1.1
> [DEBUG]   Included: org.apache.maven.shared:maven-shared-utils:jar:3.0.0
> [DEBUG]   Included: com.google.code.findbugs:jsr305:jar:2.0.1
> [DEBUG]   Included: org.sonatype.plexus:plexus-build-api:jar:0.0.7
> [DEBUG]   Included: commons-io:commons-io:jar:2.5
> [DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.24
> [DEBUG] Configuring mojo org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources from plugin realm ClassRealm[plugin>org.apache.maven.plugins:maven-resources-plugin:3.0.2, parent: sun.misc.Launcher$AppClassLoader@55f96302]
> [DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources' with basic configurator -->
> [DEBUG]   (f) addDefaultExcludes = true
> [DEBUG]   (f) buildFilters = []
> [DEBUG]   (f) escapeWindowsPaths = true
> [DEBUG]   (f) fileNameFiltering = false
> [DEBUG]   (s) includeEmptyDirs = false
> [DEBUG]   (s) outputDirectory = C:\Workspace\testingMaven\target\allConfig}
> [DEBUG]   (s) overwrite = true
> [DEBUG]   (f) project = MavenProject: me.app:testingMaven:0.0.1-SNAPSHOT @ C:\Workspace\testingMaven\pom.xml
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 1.339 s
> [INFO] Finished at: 2017-10-04T14:17:13-05:00
> [INFO] Final Memory: 9M/241M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources (default-cli) on project testingMaven: Unable to parse configuration of mojo org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources for parameter filtering: Cannot find default setter in class org.apache.maven.model.Resource -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources (default-cli) on project testingMaven: Unable to parse configuration of mojo org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources for parameter filtering: Cannot find default setter in class org.apache.maven.model.Resource
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> Caused by: org.apache.maven.plugin.PluginConfigurationException: Unable to parse configuration of mojo org.apache.maven.plugins:maven-resources-plugin:3.0.2:resources for parameter filtering: Cannot find default setter in class org.apache.maven.model.Resource
> at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:662)
> at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:594)
> at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:121)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
> ... 20 more
> Caused by: org.codehaus.plexus.component.configurator.ComponentConfigurationException: Cannot find default setter in class org.apache.maven.model.Resource
> at org.eclipse.sisu.plexus.CompositeBeanHelper.setDefault(CompositeBeanHelper.java:95)
> at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.fromConfiguration(ObjectWithFieldsConverter.java:61)
> at org.codehaus.plexus.component.configurator.converters.composite.AbstractCollectionConverter.fromChildren(AbstractCollectionConverter.java:54)
> at org.codehaus.plexus.component.configurator.converters.composite.CollectionConverter.fromConfiguration(CollectionConverter.java:68)
> at org.eclipse.sisu.plexus.CompositeBeanHelper.convertProperty(CompositeBeanHelper.java:268)
> at org.eclipse.sisu.plexus.CompositeBeanHelper.setProperty(CompositeBeanHelper.java:174)
> at org.codehaus.plexus.component.configurator.converters.composite.ObjectWithFieldsConverter.processConfiguration(ObjectWithFieldsConverter.java:101)
> at org.codehaus.plexus.component.configurator.BasicComponentConfigurator.configureComponent(BasicComponentConfigurator.java:34)
> at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:632)
> ... 23 more
> [ERROR]
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginConfigurationException
> {code}
> This works using Maven 3.3.3 but not in Maven 3.3.9.  Perhaps it's a core Maven issue, but I think it makes sense to start here.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)