On 29.09.2005, at 02:15, Brett Porter wrote:
Ok, to elaborate:
- the install plugin has this fixed, but it has not been released
- it worked with the beta-1 core because it wasn't validating the
@requiresProject element
- when the updated install plugin is available, it will work again -
you should be prompted to download it after it is released

OK.

- you can create any pom in the local directory and run from there to
get it to work in the mean time (eg, use archetype:create)

I tried that before but must have missed something. Using archetype:create did the trick. For the record;

/tmp % m2 archetype:create \
-DgroupId=org.eXtremeComponents  \
-DartifactId=eXtremeComponents  \
-Dversion=1.0.2-M1
/tmp % mv eXtremeComponents-1.0.2-M1.jar eXtremeComponents/
/tmp % cd eXtremeComponents/
/tmp/eXtremeComponents % m2 install:install-file \
-Dfile=/tmp/eXtremeComponents/eXtremeComponents-1.0.2-M1.jar  \
-DgroupId=org.eXtremeComponents  \
-DartifactId=eXtremeComponents  \
-Dversion=1.0.2-M1 \
-Dpackaging=jar

Thanks,
-Ralph.

On 9/29/05, Allison, Bob <[EMAIL PROTECTED]> wrote:
I can't get this to work except in one of my projects, either. Using -npr or --no-plugin-registry did not help. I also have maven-install-plugin v2.0-beta-1 installed. The maven-metadata- central.xml in the repository shows 2.0-beta-1 as the only version.

Is there a form of this that can be used to place an item in the global repository? I have a number of jars which I end up needing to have available for people to build our projects and it would be nice to have a means like this to install new jars for automatic download rather than requiring each developer to issue a bunch of "m2 install:install-file" commands any time they need to clean out their repository.

-----Original Message-----
From: John Casey [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 28, 2005 14:45
To: Maven Users List
Subject: Re: [m2-b2] install:install-file fails without pom


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I'm unable to replicate this behavior on my local working copy. Can you
try running with the '--no-plugin-registry' to see if this helps? You
may have an older version of the plugin which may have been created with
a faulty plugin-plugin version...

Good luck,

john

Ralph Pöllath wrote:
| Hi,
|
| installing a jar into my local repository as explained at [1]:
|
| /tmp % m2 install:install-file \
| -Dfile=/tmp/eXtremeComponents-1.0.2-M1.jar  \
| -DgroupId=org.eXtremeComponents  \
| -DartifactId=eXtremeComponents  \
| -Dversion=1.0.2-M1 \
| -Dpackaging=jar
|
| fails with "Cannot execute mojo: install-file. It requires a project,
| but the build is not using one" (full trace below).
|
| This looks like MNG-432 [2], which is supposed to be fixed. Can anyone
| help?
|
| I noticed the install-plugin used is 2.0-beta-1, while m2 itself is at
| 2.0-beta-2. Is that correct?
|
| Thanks,
| -Ralph.
|
| [1] http://maven.apache.org/maven2/general.html#importing-jars
| [2] http://jira.codehaus.org/browse/MNG-432
|
| /tmp % m2 -v
| Maven version: 2.0-beta-2
|
| [DEBUG] maven-install-plugin: resolved to version 2.0-beta-1 from
| repository central
| [INFO]
| --------------------------------------------------------------------- ---
| ----
| [INFO] Building Maven Default Project
| [INFO]    task-segment: [install:install-file]
| [INFO]
| --------------------------------------------------------------------- ---
| ----
| [INFO]
| --------------------------------------------------------------------- ---
| ----
| [INFO] BUILD FAILURE
| [INFO]
| --------------------------------------------------------------------- ---
| ----
| [INFO] Reason: Cannot execute mojo: install-file. It requires a
| project, but the build is not using one.
| [INFO]
| --------------------------------------------------------------------- ---
| ----
| [DEBUG] Trace
| org.apache.maven.plugin.MojoExecutionException: Cannot execute mojo: | install-file. It requires a project, but the build is not using one.
|         at org.apache.maven.plugin.DefaultPluginManager.executeMojo
| (DefaultPluginManager.java:318)
|         at
| org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals
| (DefaultLifecycleExecutor.java:515)
|         at
| org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone Goa
| l(DefaultLifecycleExecutor.java:478)
|         at
| org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal
| (DefaultLifecycleExecutor.java:460)
|         at
| org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen ts(
| DefaultLifecycleExecutor.java:278)
| at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute
| (DefaultLifecycleExecutor.java:136)
| at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:216)
|         at org.apache.maven.cli.MavenCli.main(MavenCli.java:246)
| 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:324)
|         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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to