Details
-
Type:
Bug
-
Status:
Reopened
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 0.0.10, 0.0.11
-
Fix Version/s: None
-
Component/s: Maven Embedder
-
Labels:None
-
Number of attachments :3
Description
With the version 0.0.9 this property is recognized
-
- eclipse_conf.txt
- 24/Oct/07 12:55 PM
- 244 kB
- Vince
-
Hide
- MNGECLIPSE-299.zip
- 12/Mar/07 3:51 PM
- 1 kB
- Vince
-
- MNGECLIPSE-299/.classpath 0.3 kB
- MNGECLIPSE-299/.project 0.6 kB
- MNGECLIPSE-299/pom.xml 2 kB
-
- mvn compile.launch
- 26/Nov/08 4:04 AM
- 0.8 kB
- zaccret
Issue Links
- is duplicated by
-
MRESOURCES-44
${settings.localRepository} is not expanded by resource filtering
-
- relates to
-
MNGECLIPSE-460
m2Eclipse fails to read env var from maven POM (regression)
-
Activity
Trace NOK (with Plugin 0.0.11) :
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - org.maven.ide.eclipse.projects:MNGECLIPSE-299:jar:0.0.1
[INFO] task-segment: [compile]
[INFO] ----------------------------------------------------------------------------
[INFO] resources:resources
[INFO] Using default encoding to copy filtered resources.
[INFO] compiler:compile
[INFO] No sources to compile
[WARNING] Component returned which is not the same manager. Ignored. component=org.codehaus.plexus.component.configurator.BasicComponentConfigurator@82d210
[INFO] antrun:run
[INFO] Executing tasks
[echo] ${settings.localRepository}
[INFO] Executed tasks
[INFO] ----------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ----------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Mar 12 21:46:52 CET 2007
[INFO] Memory 1M/5M
[INFO] ----------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Mar 12 21:46:53 CET 2007
[INFO] Final Memory: 3M/6M
[INFO] ------------------------------------------------------------------------
Trace OK (with Maven 2.0.5):
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - org.maven.ide.eclipse.projects:MNGECLIPSE-299:jar:0.0.1
[INFO] task-segment: [compile]
[INFO] ----------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] No sources to compile
[INFO] [antrun:run
]
[INFO] Executing tasks
[echo] C:\Documents and Settings\vastruc\.m2\repository
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Mon Mar 12 21:49:41 CET 2007
[INFO] Final Memory: 3M/7M
[INFO] ------------------------------------------------------------------------
Isn't recognized where?
In plugins and properties in general you use $
{localRepository} not ${settings.localRepository}.If this is in the Ant Run plugins then it's a plugin specific issue. Not the Eclipse Integration. The Ant Run plugin uses this:
http://svn.apache.org/repos/asf/maven/components/trunk/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
And if you are using a combination of user and global settings then definitely use ${localRepository}
.
Windows XP SP2
Maven 2.0.6
Eclipse 3.2.2
Maven 2.0 Integration 0.0.10
Reprocuction:
1. Install Maven 2
2. Set the M2_HOME environmant variable to the maven installation directory
3. Add the Maven bin directory to the system path
4. create a directory on the root of your drive for the local repository
5. edit maven-2.0.6/conf/settings.xml, setting localRepository to the dir you just created, e.g.
<localRepository>D:\tools\m2_repository</localRepository>
6. install the M2 Integration plugin for Eclipse
7. restart Eclipse
8. Window > Preferences > Maven2 > Reindex Local Repository
Expected: um, local repository is reindexed?
Actual: error message
5/7/07 12:04:02 PM PDT: Local repository C:\Documents and Settings\mat\.m2\repository is not a directory
Note that the error cites the default repository location; the localRepository setting in settings.xml is ignored.
The custom repository location is working fine for Maven builds outside of Eclipse.
Issue 314 appears to be a dupe of this
The plugin should not offer to set up the "local repository" in the preferences window.
This information should be read from $HOME/.m2/settings.xml
Running with the latest version of the embedder and Maven trunk (2.1-alpha-1-SNAPSHOT) I get the following for:
$
{settings.localRepository}which is a String
and
$
{localRepository}which is an ArtifactRepository object.
And they both appear to be available with the project given me.
So it must be something in the way so we'll kick out a dev build again and you can try it.
[INFO] Scanning for projects...
[INFO] ----------------------------------------------------------------------------
[INFO] Building Unnamed - org.maven.ide.eclipse.projects:MNGECLIPSE-299:jar:0.0.1
[INFO] task-segment: [clean, validate]
[INFO] ----------------------------------------------------------------------------
[INFO] [clean:clean]
[INFO] Deleting directory /Users/jvanzyl/downloads/MNGECLIPSE-299/target
[INFO] Deleting directory /Users/jvanzyl/downloads/MNGECLIPSE-299/target/classes
[INFO] Deleting directory /Users/jvanzyl/downloads/MNGECLIPSE-299/target/test-classes
[INFO] Deleting directory /Users/jvanzyl/downloads/MNGECLIPSE-299/target/site
[INFO] [antrun:run]
[INFO] Executing tasks
[echo] settings.localRepository = /Users/jvanzyl/maven-repo-local
[echo] localRepository = [local] -> file:///Users/jvanzyl/maven-repo-local
[INFO] Executed tasks
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Fri Jun 01 22:14:53 EDT 2007
[INFO] Final Memory: 3M/5M
[INFO] ------------------------------------------------------------------------
I'm not sure if this is the same issue, but I can't get the Maven2 plugin to respect a different local repository either, no matter what I do. Neither M2_REPO nor MAVEN_REPO Classpath Variables seem to be respected, nor is the global Maven2 settings.xml, or a .m2/settings.xml in my user directory that also points to the local repository. No matter what, my build path always is constructed against .m2/repository.
I'm using "Maven 2.0 integration 0.0.10" plugin for Eclipse 3.3
Update: It appears to be working with the dev version, 0.0.11.
I can't reproduce this with the recent build. Please feel free to reopen if you still experiencing this issue with 0.0.12 build.
I have still the problem with plugin 0.0.12.
I reminder that the problem doesn't exist with maven.
org.apache.maven.plugin.MojoExecutionException: Error executing ant tasks
at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:114)
at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:676)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:519)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:342)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:165)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:227)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:871)
at org.maven.ide.eclipse.embedder.Maven2Executor.main(Maven2Executor.java:85)
Caused by: D:\workspace\stars-gis-luciadmap-phase3\$
not found.
at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:349)
at proguard.ant.ClassPathElement.appendClassPathEntriesTo(ClassPathElement.java:84)
at proguard.ant.ConfigurationTask.extendClassPath(ConfigurationTask.java:230)
at proguard.ant.ConfigurationTask.addConfiguredInjar(ConfigurationTask.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.IntrospectionHelper$AddNestedCreator.istore(IntrospectionHelper.java:1302)
at org.apache.tools.ant.IntrospectionHelper$AddNestedCreator.store(IntrospectionHelper.java:1295)
at org.apache.tools.ant.IntrospectionHelper$Creator.store(IntrospectionHelper.java:1185)
at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:397)
at org.apache.tools.ant.RuntimeConfigurable.maybeConfigure(RuntimeConfigurable.java:324)
at org.apache.tools.ant.Task.maybeConfigure(Task.java:254)
at org.apache.tools.ant.UnknownElement.configure(UnknownElement.java:189)
at org.apache.tools.ant.UnknownElement.maybeConfigure(UnknownElement.java:158)
at org.apache.tools.ant.Task.perform(Task.java:363)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:108)
... 8 more
Vincent, the test project you attached don't have any Ant tasks that scan directories and in my test it prints what is expected:
[INFO] antrun:run
[INFO] Executing tasks
[echo] C:/repo
[INFO] Executed tasks
I have retested the attached test project and it prints :
[INFO] antrun:run
[INFO] Executing tasks
[echo] $
[INFO] Executed tasks
Conf : Eclipse JEE 3.3 and Maven Integration for Eclipse 0.0.12
Have you an idea about the problem in my environment?
Please attach Eclipse configuration details from Help / About Eclipse SDK / Configuration Details
Ok, guys. Try with this Eclipse Run Configuration (attached mvn compile.launch) which launches mvn compile with Maven Embedder. You'll see :
[INFO] Executing tasks
[echo] $
I'm using the latest dev build. 0.9.7 and still seeing the issue, I tried $
{settings.localRepository}, $
{maven.local.repo}, $
{localRepository}, none of them worked...
Using external maven 2.0.9 or embedded doesnt seem to help.
Works for me using build 0.9.7.200810211352 or from the latest code in trunk, on eclipse 3.3.2 + WTP 2.0.2, .
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [antrun:run]
[INFO] Executing tasks
[echo] c:/Dev/maven/repository
[INFO] Executed tasks
regards,
Fred Bricon
A reminder, please make sure to vote on issues that you like to be fixed sooner. Thanks.
I'm creating another plugin whose POM configuration section also is not respecting the following properties:
- {{$
{settings.localRepository}
}}
- {{$
{maven.repo.local}
}}
- {{$
{localRepository}
}}
I would guess that it has something to do with the fact that I've overridden localRepository in my $USER_HOME\.m2\settings.xml file as follows:
<localRepository>C:/Users/karl/.m2/repository</localRepository>
I wonder if this isn't the case as well for others experiencing this problem?
Vincent, please provide complete projects sufficient for reproducing this issue.