2009/4/3 Craig L. Ching <[email protected]>
> Hi all,
>
> This is probably more of a general maven question, but I'm going to
> start here in case anyone has any quick insight into what my problem
> might be.
>
> I've changed the packaging in my jars to bundle and added the OSGi
> manifests using maven-bundle-plugin in anticipation of moving our app to
> an OSGi environment. 'mvn clean install' works fine all day long,
> however, when I go to do a release with 'mvn release:prepare
> -DautoVersionSubmodules=true', I get the following:
>
> [INFO] [INFO] Failed to resolve artifact.
> [INFO]
> [INFO] Missing:
> [INFO] ----------
> [INFO] 1) com.mqsoftware.appwise:appwise-security:jar:1.0.0.10
> [INFO]
> [INFO] Try downloading the file manually from the project website.
> [INFO]
> [INFO] Then, install it using the command:
> [INFO] mvn install:install-file -DgroupId=com.mqsoftware.appwise
> -DartifactId=appwise-security -Dversion=1.0.0.10 -Dpackaging=jar
> -Dfile=/path/to/file
> [INFO]
> [INFO] Alternatively, if you host your own repository you can deploy
> the file there:
> [INFO] mvn deploy:deploy-file -DgroupId=com.mqsoftware.appwise
> -DartifactId=appwise-security -Dversion=1.0.0.10 -Dpackaging=jar
> -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
> [INFO]
> [INFO] Path to dependency:
> [INFO] 1) com.mqsoftware.appwise:appwise-core:bundle:1.0.0.10
> [INFO] 2) com.mqsoftware.appwise:appwise-security:jar:1.0.0.10
> [INFO]
> [INFO] ----------
> [INFO] 1 required artifact is missing.
> [INFO]
> [INFO] for artifact:
> [INFO] com.mqsoftware.appwise:appwise-core:bundle:1.0.0.10
> [INFO]
> [INFO] from the specified remote repositories:
> [INFO] central (http://repo1.maven.org/maven2),
> [INFO] cerberus-snapshots (http://cerberus:8081/artifactory/repo),
> [INFO] cerberus-central (http://cerberus:8081/artifactory/repo)
>
> (appwise-security and appwise-core are both bundles, this happens when
> we're building appwise-core which depends on appwise-security.)
>
> This only happens with the bundle packaging, changing the packaging back
> to jar (by removing the <packaging></packaging> elements altogether)
> makes mvn release work.
>
> So, the reason I say it's probably a general maven issue and a
> misunderstanding on my part is because it's looking at remote
> repositories instead of in my workspace and I don't understand why. But
> the reason I'm asking here is because it happens when I use
> '<packaging>bundle</packaging>' and I'm hoping I get a better/quicker
> answer here ;-)
>
yes, sounds like a Maven bug - are you trying to release several artifacts
in one go? it may be that this only occurs in a multi-module release, which
would square with another bug (MNG-1682)
have you tried setting the type of your dependency to be bundle? ie. in
the "com.mqsoftware.appwise:appwise-core" pom, it would look like this:
<dependency>
<groupId>com.mqsoftware.appwise</groupId>
<artifactId>appwise-security</artifactId>
<version>1.0.0.10</version>
<type>bundle</type>
</dependency>
this might resolve the problem - alternatively try releasing one at a
time...
FWIW we use the bundleplugin internally at Felix and have released many
artifacts with "bundle" packaging, although IIRC they were one at a time
> Thanks for any help!
>
> Cheers,
> Craig
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
--
Cheers, Stuart