Re: Dependency is missed while using maven-assembly-plugin

2018-04-03 Thread Сергей Вайсман

Hello, Thorsten

Thank you very much for the help! Yes, this is the reason of my problem.

I tested it on next releases of batik and found that the dependency 
structure

changed in next versions and there's no batik-js in dependency tree.
Unfortunately, I couldn't upgrade version because in real project these
batik 1.7 libraries are used in some third-party plugin used by our
GUI developers.

For my case it was convenient to use exclusions for batik-script and
batik-bridge. And use these excluded dependencies external.
Like this.

    
        
            internal-module-groupId
internal-module-artifactId
            
                
org.apache.xmlgraphics
batik-bridge
                
                
org.apache.xmlgraphics
batik-script
                
            
        
        
            org.apache.xmlgraphics
            batik-script
            1.7
        
        
            org.apache.xmlgraphics
            batik-bridge
            1.7
        
    


Anyway, thank you for your responses!
Have a nice day!


--
Regards,
Sergey Vaysman


On 03.04.2018 14:05, Thorsten Heit wrote:

Hi Sergey,


I updated to the latest maven version 3.5.3 and configured the project
to use
the latest maven-assembly-plugin version 3.1.0.

You seem to be hit by
https://issues.apache.org/jira/projects/MASSEMBLY/issues/MASSEMBLY-782.

In short: You have circular dependencies in Batik 1.7:
batik-bridge -> batik-script -> batik-bridge...

Can you use a newer version of batik-transcoder such as 1.8, 1.9 or 1.9.1
(all available on Maven Central)?


Regards

Thorsten



-
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



Re: Re: Dependency is missed while using maven-assembly-plugin

2018-04-03 Thread Thorsten Heit
Hi Sergey,

> I updated to the latest maven version 3.5.3 and configured the project 
> to use
> the latest maven-assembly-plugin version 3.1.0.

You seem to be hit by 
https://issues.apache.org/jira/projects/MASSEMBLY/issues/MASSEMBLY-782.

In short: You have circular dependencies in Batik 1.7:
batik-bridge -> batik-script -> batik-bridge...

Can you use a newer version of batik-transcoder such as 1.8, 1.9 or 1.9.1 
(all available on Maven Central)?


Regards

Thorsten

Re: Re: Dependency is missed while using maven-assembly-plugin

2018-04-03 Thread Thorsten Heit
Hi,

> The first thing I need to mention that I gave you a wrong version of 
> maven-assembly-plugin.
> Maven-assembly-plugin version: 2.2-beta-5
> Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 
> 2014-12-14T20:29:23+03:00)
> Maven home: C:\soft\apache-maven-3.2.5
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: C:\Program Files\Java\jdk1.8.0_131\jre
> Default locale: ru_RU, platform encoding: Cp1251
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

Can you try with with m-assembly-p 3.1.0 and see whether this behaves 
different?
Could you switch to a newer version of Maven, i.e. 3.5.3 (the newest?


Regards

Thorsten

Re: Dependency is missed while using maven-assembly-plugin

2018-04-02 Thread Martin Gainty
ran mvn package against pom.xml from supplied project.zip with no missing 
dependencies:


[DEBUG] Goal:  
org.apache.maven.plugins:maven-assembly-plugin:2.2-beta-5:single (default)
[DEBUG] Style: Regular
[DEBUG] Configuration: 

  ${appendAssemblyId}
  ${attach}
  
  ${classifier}
  ${descriptor}
  ${descriptorId}
  
src/main/assembly/assembly-descriptor.xml
  
  ${assembly.dryRun}
  
  
  ${ignoreMissingDescriptor}
  ${includeSite}
  
  ${session}
  
  
  
  
  ${runOnlyAtExecutionRoot}
  
  ${skipAssembly}
  ${tarLongFileMode}
  
  

[DEBUG] ===
[DEBUG] Dependency collection stats: {ConflictMarker.analyzeTime=1972051, 
ConflictMarker.markTime=738132, ConflictMarker.nodeCount=84, 
ConflictIdSorter.graphTime=1371731, ConflictIdSorter.topsortTime=935252, 
ConflictIdSorter.conflictIdCount=24, ConflictIdSorter.conflictIdCycleCount=3, 
ConflictResolver.totalTime=8674975, ConflictResolver.conflictItemCount=82, 
DefaultDependencyCollector.collectTime=137005478, 
DefaultDependencyCollector.transformTime=16792725}
[DEBUG] ru.spi2.test:sbercap-dependencies:jar:1.0-SNAPSHOT
[DEBUG]org.apache.xmlgraphics:batik-transcoder:jar:1.7:compile
[DEBUG]   org.apache.xmlgraphics:fop:jar:0.94:compile
[DEBUG]  org.apache.xmlgraphics:xmlgraphics-commons:jar:1.2:compile
[DEBUG]  commons-logging:commons-logging:jar:1.0.4:compile
[DEBUG]  commons-io:commons-io:jar:1.1:compile
[DEBUG]  
org.apache.avalon.framework:avalon-framework-api:jar:4.3.1:compile
[DEBUG]  
org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1:compile
[DEBUG]   org.apache.xmlgraphics:batik-awt-util:jar:1.7:compile
[DEBUG]   org.apache.xmlgraphics:batik-bridge:jar:1.7:compile
[DEBUG]  org.apache.xmlgraphics:batik-anim:jar:1.7:compile
[DEBUG]  org.apache.xmlgraphics:batik-css:jar:1.7:compile
[DEBUG]  org.apache.xmlgraphics:batik-ext:jar:1.7:compile
[DEBUG]  org.apache.xmlgraphics:batik-parser:jar:1.7:compile
[DEBUG]  org.apache.xmlgraphics:batik-script:jar:1.7:compile
[DEBUG] org.apache.xmlgraphics:batik-js:jar:1.7:compile


I am baffled why your dependency manager is skipping batik-js:1.7?


with same pom.xml can you
mvn dependency:tree >output

and send us output
?

Martin
__




From: Сергей Вайсман <vaysman.spi.w...@gmail.com>
Sent: Monday, April 2, 2018 10:24 AM
To: users@maven.apache.org
Subject: Dependency is missed while using maven-assembly-plugin

Hello.

I have a problem using maven-assembly-plugin.

I want to get during package phase a directory with all project dependencies.
But I have a transitive dependency with compile scope which is missed from
assembly output directory.

The missed jar is batik-js-1.7.jar. Here is a dependency tree for this jar

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ 
sbercap-dependencies ---
[INFO] ru.spi2.test:sbercap-dependencies:jar:1.0-SNAPSHOT
[INFO] \- org.apache.xmlgraphics:batik-transcoder:jar:1.7:compile
...
[INFO]+- org.apache.xmlgraphics:batik-bridge:jar:1.7:compile
[INFO]|  +- org.apache.xmlgraphics:batik-anim:jar:1.7:compile
[INFO]|  +- org.apache.xmlgraphics:batik-css:jar:1.7:compile
[INFO]|  +- org.apache.xmlgraphics:batik-ext:jar:1.7:compile
[INFO]|  +- org.apache.xmlgraphics:batik-parser:jar:1.7:compile
[INFO]|  +- org.apache.xmlgraphics:batik-script:jar:1.7:compile
[INFO]|  |  \- org.apache.xmlgraphics:batik-js:jar:1.7:compile
...

When assembly plugin is finished, others dependencies (batik-anim-1.7.jar,
batik-css-1.7.jar) are added to output directory successfully. The 
batik-js-1.7.jar
is missed (screenshot no-batik-js-in-assembly-output.png attached).

On the other side, if I try to copy all dependencies using 
maven-dependency-plugin,
the batik-js-1.7.jar is successfully added to the folder (screenshot
batik-js-in-dependencies attached).

Here is my dependencies and build blocks from pom.xml



org.apache.xmlgraphics
batik-transcoder
1.7






org.apache.maven.plugins
maven-dependency-plugin


copy
package

copy-dependencies



${project.build.directory}/dependency-libs







org.apache.maven.plugins
maven-assembly-plugin


package