Thanks Jesse!!

P

On 8/14/06, jpangburn <[EMAIL PROTECTED]> wrote:


I'm updating the Maven JBI plugin page to tell others to be sure to do
this,
so they don't have the same trouble and maybe fail to find it here on the
forum.  Just FYI because I see your name as the last editor of that page,
so
I didn't want you to be spending time duplicating my edits.

Jesse


Philip Dodds-2 wrote:
>
> Thanks for sharing the solution Jesse!
>
> P
>
> On 8/14/06, jpangburn <[EMAIL PROTECTED]> wrote:
>>
>>
>> I don't see any warnings like that, but I'll go over my steps to review
>> what
>> I've seen.  And yes, most are packaged as jars- except there is one
>> "classes12.zip" which is packaged as zip.  For this email, I'll just
talk
>> about one of the jars I'm trying to use to keep it uncluttered.
>>
>> First, I install a jar to my local repository:
>> ++++++++++++++++++
>> C:\quovadx\ib2.0\platform\core\lib>mvn install:install-file
>> -Dfile=qdxbpms.jar -
>> DgroupId=com.quovadx.bpms -DartifactId=qdxbpms -Dversion=IB2.0
>> -Dpackaging=jar
>> [INFO] Scanning for projects...
>> [INFO] Searching repository for plugin with prefix: 'install'.
>> [INFO]
>>
-------------------------------------------------------------------------
>> ---
>> [INFO] Building Maven Default Project
>> [INFO]    task-segment: [install:install-file] (aggregator-style)
>> [INFO]
>>
-------------------------------------------------------------------------
>> ---
>> [INFO] [install:install-file]
>> [INFO] Installing C:\quovadx\ib2.0\platform\core\lib\qdxbpms.jar to
>> C:\Documents
>> and
>> Settings\jpangb\.m2\repository\com\quovadx\bpms\qdxbpms\IB2.0\qdxbpms-
>> IB2.0
>> .jar
>> [INFO]
>>
------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>>
------------------------------------------------------------------------
>> [INFO] Total time: 1 second
>> [INFO] Finished at: Mon Aug 14 09:53:30 PDT 2006
>> [INFO] Final Memory: 2M/4M
>> [INFO]
>>
------------------------------------------------------------------------
>> +++++++++++++++
>>
>> Then I put it as a dependency in my pom along with servicemix-jbi (so I
>> can
>> use the Component interface) and the javax activation framework:
>> +++++++++++++++
>>     <dependency>
>>       <groupId>com.quovadx.bpms</groupId>
>>       <artifactId>qdxbpms</artifactId>
>>       <version>IB2.0</version>
>>       <scope>compile</scope>
>>     </dependency>
>>     <dependency>
>>       <groupId>org.apache.servicemix</groupId>
>>       <artifactId>servicemix-jbi</artifactId>
>>       <version>3.0-incubating-SNAPSHOT</version>
>>       <scope>provided</scope>
>>     </dependency>
>>     <dependency>
>>       <groupId>javax.activation</groupId>
>>       <artifactId>activation</artifactId>
>>       <version>1.0.2</version>
>>       <scope>compile</scope>
>>     </dependency>
>> +++++++++++++++
>>
>> Then I go to my project directory and run "mvn install".  There is a
lot
>> of
>> output for updating files, which I'm leaving out.  I see the following
>> warning for this dependency, and the warning repeats for each local
>> repository jar I have.
>> +++++++++++++++
>> Downloading:
>> http://repo1.maven.org/maven2/com/quovadx/bpms/qdxbpms/IB2.0/qdxbpm
>> s-IB2.0.pom
>> [WARNING] Unable to get resource from repository central
>> (http://repo1.maven.org
>> /maven2)
>> +++++++++++++++
>>
>> So, it's trying to get my local file from repository central, but
failing
>> of
>> course because it's only a local file.  This repeats for as many local
>> files
>> as I include.  The jbi component output looks like this:
>> ++++++++++++++++
>> [INFO] [jbi:jbi-component]
>> [INFO] Including: javax.activation:activation:jar:1.0.2:compile
>> [INFO] Generating installer
>> C:\tmp\mvnTestProject\bpms\target\bpms-1.0-SNAPSHOT-
>> installer.zip
>> [INFO] Building jar:
>> C:\tmp\mvnTestProject\bpms\target\bpms-1.0-SNAPSHOT-install
>> er.zip
>> ++++++++++++++++
>>
>> It includes the activation jar which is remote, but not my qdxbpms jar
>> which
>> is local.  If I change the servicemix-jbi scope from provided to
compile,
>> then that jar and some dependencies are also included.
>>
>> The only difference I can see is that my local version has no pom.  OK,
I
>> JUST found the answer.  I read about the maven install plugin and the
>> install:install-file command has an optional "generatePom"
parameter.  I
>> just tried changing my install command to the following:
>> ++++++++++++++++++
>> C:\quovadx\ib2.0\platform\core\lib>mvn install:install-file
>> -Dfile=qdxbpms.jar -
>> DgroupId=com.quovadx.bpms -DartifactId=qdxbpms -Dversion=IB2.0
>> -Dpackaging=jar -DgeneratePom=true
>> ++++++++++++++++++
>>
>> Now a pom file exists for my own jar in my local repository and when I
>> run
>> mvn install now I see:
>> ++++++++++++++++
>> [INFO] jbi:jbi-component
>> [INFO] Including: com.quovadx.bpms:qdxbpms:jar:IB2.0:compile
>> [INFO] Including: javax.activation:activation:jar:1.0.2:compile
>> [INFO] Generating installer
>> C:\tmp\mvnTestProject\bpms\target\bpms-1.0-SNAPSHOT-installer.zip
>> ++++++++++++++++
>>
>> So this time, since I generated the pom, now it's including my local
>> qdxbpms
>> jar file.  So it seems this is required in order to use the jbi maven
>> plugin
>> to build the installer zip and include your local dependencies.
>>
>> thanks for all the help!!!
>> Jesse
>>
>>
>> Philip Dodds-2 wrote:
>> >
>> > Do you see any warnings like -
>> >
>> > Unable to determine packaging for dependency : xxxx
>> >
>> > and I assume these dependencies are of type jar?
>> >
>> > P
>> >
>> > On 8/14/06, jpangburn <[EMAIL PROTECTED]> wrote:
>> >>
>> >>
>> >> I tried with no scope, and with compile scope (default anyway).  In
>> >> either
>> >> case, remote repository jars are included in my installer zip file,
>> and
>> >> my
>> >> local repository jars are not.
>> >>
>> >>
>> >> Philip Dodds-2 wrote:
>> >> >
>> >> > Have you defined a scope on these libs or marked them optional?
>> >> >
>> >> > P
>> >> >
>> >> > On 8/14/06, jpangburn <[EMAIL PROTECTED]> wrote:
>> >> >>
>> >> >>
>> >> >> Also, I have a file "maven-metadata-local.xml" file in the
>> directory
>> >> >> above
>> >> >> the version directory which contains the jar.  This file doesn't
>> exist
>> >> in
>> >> >> the corresponding directory for remotely downloaded jars.
>> >> >>
>> >> >>
>> >> >> gnodet wrote:
>> >> >> >
>> >> >> > It should not affect the plugin.
>> >> >> > Can you check that the jar you want to include has a pom in
your
>> >> local
>> >> >> > repository ?
>> >> >> >
>> >> >> > On 8/11/06, jpangburn <[EMAIL PROTECTED]> wrote:
>> >> >> >>
>> >> >> >>
>> >> >> >> Hi,
>> >> >> >> I have used the "mvn install:install-file" command to load
some
>> >> jars
>> >> >> into
>> >> >> >> my
>> >> >> >> local repository.  In the pom for my project I have put
>> >> dependencies
>> >> >> on
>> >> >> >> these jars I just installed and am using the jbi-maven-plugin
>> >> version
>> >> >> >> 1.0-incubating-snapshot.  When I do "mvn install", my java
files
>> >> that
>> >> >> are
>> >> >> >> using those jar files compile just fine so the dependency for
>> >> >> compilation
>> >> >> >> seems to be working, but the installer zip for the
jbi-component
>> I
>> >> am
>> >> >> >> creating does not include my jars in the lib directory.
>> >> >> >>
>> >> >> >> If I include a dependency jar that is in one of the regular
>> maven
>> >> >> >> repositories online, then that jar is successfully copied to
the
>> >> lib
>> >> >> >> directory in my installer zip file.  What's the difference
>> between
>> >> a
>> >> >> >> dependency in my local repository and one in the regular maven
>> >> >> >> repositories,
>> >> >> >> as far as the jbi-maven-plugin is concerned?
>> >> >> >>
>> >> >> >> thanks,
>> >> >> >> Jesse
>> >> >> >> --
>> >> >> >> View this message in context:
>> >> >> >>
>> >> >>
>> >>
>>
http://www.nabble.com/jbi-maven-plugin-dependency-problem-tf2093147.html#a5770060
>> >> >> >> Sent from the ServiceMix - User forum at Nabble.com.
>> >> >> >>
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Cheers,
>> >> >> > Guillaume Nodet
>> >> >> >
>> >> >> >
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>>
http://www.nabble.com/jbi-maven-plugin-dependency-problem-tf2093147.html#a5798946
>> >> >> Sent from the ServiceMix - User forum at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>>
http://www.nabble.com/jbi-maven-plugin-dependency-problem-tf2093147.html#a5799683
>> >> Sent from the ServiceMix - User forum at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>>
http://www.nabble.com/jbi-maven-plugin-dependency-problem-tf2093147.html#a5800643
>> Sent from the ServiceMix - User forum at Nabble.com.
>>
>>
>
>

--
View this message in context:
http://www.nabble.com/jbi-maven-plugin-dependency-problem-tf2093147.html#a5800887
Sent from the ServiceMix - User forum at Nabble.com.


Reply via email to