java.io.FileNotFoundException when using an alternate pom file (maven -f option)
--------------------------------------------------------------------------------

                 Key: MVERSIONS-145
                 URL: http://jira.codehaus.org/browse/MVERSIONS-145
             Project: Maven 2.x Versions Plugin
          Issue Type: Bug
    Affects Versions: 1.2
            Reporter: JM Tournié
         Attachments: mypom.xml

I have in a directory, one pom file named *{{mypom.xml}}* _(see attachement)_

I don't have in this directory, any file named {{pom.xml}}.

When I launch this command :
{code}
mvn versions:set -DnewVersion=3.3 -f mypom.xml
{code}

I have this Exception :
{code}
C:\_tmp\VERSION.todel>mvn versions:set -DnewVersion=3.3 -f mypom.xml
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'versions'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Test Version Set on an alternate pom file
[INFO]    task-segment: [versions:set] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [versions:set]
[INFO] Searching for local aggregator root...
[INFO] Local aggregation root: C:\_tmp\VERSION.todel
[ERROR]
java.io.FileNotFoundException: C:\_tmp\VERSION.todel\pom.xml (Le fichier 
spÚcifiÚ est introuvable)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at org.codehaus.plexus.util.xml.XmlReader.<init>(XmlReader.java:124)
        at 
org.codehaus.plexus.util.xml.XmlStreamReader.<init>(XmlStreamReader.java:67)
        at 
org.codehaus.plexus.util.ReaderFactory.newXmlReader(ReaderFactory.java:118)
        at 
org.codehaus.mojo.versions.api.PomHelper.readXmlFile(PomHelper.java:1398)
        at 
org.codehaus.mojo.versions.AbstractVersionsUpdaterMojo.process(AbstractVersionsUpdaterMojo.java:312)
        at org.codehaus.mojo.versions.SetMojo.execute(SetMojo.java:242)
        at 
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:268)
        at 
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:356)
        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:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
{code}

The plugins search a {{pom.xml}} in the directory of the alternate pom file.

But the build is successfull, and {{mypom.xml}} version is correctly set :-)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to