Hello,
I did manage to get it working, using Shade plugin with the following
options:
<createSourcesJar>true</createSourcesJar>
<keepDependenciesWithProvidedScope>true</keepDependenciesWithProvidedScope>
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>

It creates jars which look ok, work ok when used in another Maven
project, but for some reason they confuse Netbeans? Netbeans simply does
not see the packages and classes inside the jar. That is, they are
visible in Project Explorer, but when typing "import xxx.xxx" there are
errors "package xxx.xxx does not exist". The funny thing is, it compiles
correctly, with both external and internal Maven.

Any suggestions?

Greetings, Lilianne


Walid "jo" Gedeon wrote:
> Hello Lilianne,
> I think you're right in thinking you need to use assembly, this link will
> probably help you move forwards:
> 
> http://maven.apache.org/plugins/maven-assembly-plugin/descriptor-refs.html#jar-with-dependencies
> 
> 
> HTH,
> w
> 
> On Tue, Dec 9, 2008 at 8:55 AM, Lilianne E. Blaze <
> [EMAIL PROTECTED]> wrote:
> 
>> Hello,
>> First, I'm still pretty new to Maven, so it's quite possible I'm missing
>> something obvious here.
>>
>> I have the following scenario (simplified) : one project/POM for the
>> application, AppPom, one project which doesn't contain any sources, just
>> declares dependencies, DepsPom, and a number of 3rd party dependencies.
>> I need to have two jars, one for the application, one for all the
>> dependencies - I need DepsPom to contain all the declared dependencies,
>> unpacked and repacked into a single jar.
>>
>> I tried using Shade, the resulting jar looks fine, but it somehow messes
>> up code completion in NetBeans. I'm guessing I need to use either Shade,
>> or Assembly, but at the moment I'm pretty much stuck. Seeing as Maven is
>> about "convention over configuration", there must be some standard way
>> of doing it? Could you please give me an example minimal .pom which
>> takes two other libraries and merges them into one jar?
>>
>> Greetings, thanks in advance, L
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 




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

Reply via email to