[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Configurable version in artifactId



Hi,

On Wed, Nov 14, 2018 at 11:57 AM Emmanuel Bourg <ebourg@apache.org> wrote:
>
> Le 14/11/2018 à 11:25, Mathieu Malaterre a écrit :
>
> > What would you recommend in this case ?
>
> For junit this substitution rule should work:
>
>   junit junit * s/.*/4.x/ * *
>
> And for xmlgraphics-commons:
>
>   org.apache.xmlgraphics xmlgraphics-commons * s/.*/debian/ * *
>

Thanks for your kind help. I guess my question was very poorly formulated.

Let me try to rephrase it. I am trying to activate junit testing in
fop, after removing the maven.properties file, I am getting a
compilation error in a child dir of fop:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/mathieu/tmp/debian/fop/fop-events/src/test/java/org/apache/fop/events/BasicEventTestCase.java:[22,16]
error: package org.junit does not exist

Indeed looking at the compilation log:

[DEBUG] Command line options:
[DEBUG] -d /home/mathieu/tmp/debian/fop/fop-events/target/test-classes
-classpath /home/mathieu/tmp/debian/fop/fop-events/target/test-classes:/home/mathieu/tmp/debian/fop/fop-events/target/classes:/home/mathieu/tmp/debian/fop/fop-util/target/fop-util-2.3.jar:/home/mathieu/tmp/debian/fop/debian/maven-repo/com/thoughtworks/qdox/qdox/debian/qdox-debian.jar:/home/mathieu/tmp/debian/fop/debian/maven-repo/commons-io/commons-io/debian/commons-io-debian.jar:/home/mathieu/tmp/debian/fop/debian/maven-repo/org/apache/ant/ant/debian/ant-debian.jar:/home/mathieu/tmp/debian/fop/debian/maven-repo/org/apache/ant/ant-launcher/debian/ant-launcher-debian.jar:/home/mathieu/tmp/debian/fop/debian/maven-repo/org/apache/xmlgraphics/xmlgraphics-commons/debian/xmlgraphics-commons-debian.jar:/home/mathieu/tmp/debian/fop/debian/maven-repo/commons-logging/commons-logging/debian/commons-logging-debian.jar:
-sourcepath /home/mathieu/tmp/debian/fop/fop-events/src/test/java:/home/mathieu/tmp/debian/fop/fop-events/target/generated-test-sources/test-annotations:
/home/mathieu/tmp/debian/fop/fop-events/src/test/java/org/apache/fop/events/BasicEventTestCase.java
/home/mathieu/tmp/debian/fop/fop-events/src/test/java/org/apache/fop/events/TestEventProducer.java
-s /home/mathieu/tmp/debian/fop/fop-events/target/generated-test-sources/test-annotations
-g -nowarn -target 1.6 -source 1.6 -encoding UTF-8
[DEBUG] incrementalBuildHelper#beforeRebuildExecution
[INFO] Compiling 2 source files to
/home/mathieu/tmp/debian/fop/fop-events/target/test-classes
[DEBUG] incrementalBuildHelper#afterRebuildExecution

As you may notice, junit is not being passed on the command line.

Now when inspecting the pom.xml from fop-events, and comparing the
pom.xml vs the pom.xml.save, I realized that:

 $ grep junit pom.xml
<!-- junit testing -->

While:

$ grep junit pom.xml.save
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>${junit.version}</version>
      <!-- junit testing -->

So -again-, do you have a suggestion as to why the pom.xml has dropped
reference to junit (compared to the original .save file). For
reference my current maven.rules is:


junit-addons junit-addons jar * * *
org.apache.maven.plugins maven-enforcer-plugin maven-plugin * * *
org.apache.openjpa openjpa jar * * *
org.apache.pdfbox fontbox s/jar/bundle/ s/.*/2.x/ * *
org.apache.pdfbox pdfbox-reactor pom s/.*/2.x/ * *
org.apache.pdfbox pdfbox s/jar/bundle/ s/.*/2.x/ * *
org.apache.xmlgraphics fop-core jar s/.*/debian/ * *
org.apache.xmlgraphics fop-events jar s/.*/debian/ * *
org.apache.xmlgraphics fop-parent pom s/.*/debian/ * *
org.apache.xmlgraphics fop-sandbox jar s/.*/debian/ * *
org.apache.xmlgraphics fop-servlet jar s/.*/debian/ * *
org.apache.xmlgraphics fop-transcoder-allinone jar s/.*/debian/ * *
org.apache.xmlgraphics fop-transcoder jar s/.*/debian/ * *
org.apache.xmlgraphics fop-util jar s/.*/debian/ * *
org.apache.xmlgraphics fop jar s/.*/debian/ * *
org.codehaus.groovy groovy-eclipse-compiler jar * * *
org.mortbay.jetty jetty-client jar * * *
org.mortbay.jetty jetty jar * * *
commons-logging s/commons-logging-api/commons-logging/ * s/.*/debian/ * *
javax.servlet s/servlet-api/javax.servlet-api/ * s/.*/3.1/ * *
s/net.sf.saxon/saxon/ saxon * s/.*/debian/ * *
org.apache.maven.plugins maven-checkstyle-plugin * s/.*/debian/ * *
org.apache.maven.plugins maven-enforcer-plugin * * * *
org.apache.maven.plugins maven-jxr-plugin * * * *
org.apache.maven.plugins maven-source-plugin * * * *
org.apache.maven.wagon wagon-http * * * *
org.apache.rat apache-rat-plugin * * * *
org.codehaus.mojo findbugs-maven-plugin * s/.*/debian/ * *
org.mockito mockito-core * * * *
org.sonatype.aether aether-connector-wagon * * * *
s/ant/org.apache.ant/ * * s/.*/debian/ * *
org.apache.xmlgraphics batik-all * s/.*/debian/ * *
junit junit * s/.*/4.x/ * *

ref:
https://salsa.debian.org/java-team/fop/blob/wip-2.3/debian/maven.rules

Thanks much,


Reply to: