Hi Osma,

Shading happens at the "package" step of the maven build lifecycle which is after "test" so if you run "mvn test" it does not happen.

The way to build is:

  mvn clean install


IIRC maven does not track all derived artifacts from a module, e.g. assemblies. Whether the shaded jar is full tracked, I don't know. "mvn verfiy" may work but the proper way for any multi-module system is to run "install"

This only matters before the release goes to maven central because otherwise the deployed version gets used.

I did the following:

In FF, downloaded to ~/Desktop
https://dist.apache.org/repos/dist/dev/jena/source/jena-3.1.0-source-release.zip

  498  cd ~/tmp
  499  rm -rf m2-repo
  500  rm -rf J
  501  mkdir m2-repo
  502  mkdir J
  503  cd J
  504  unzip -q ~/Desktop/jena-3.1.0-source-release.zip
  505  cd jena-3.1.0/
  506  cat ../../setting-repo.xml
  507  mvn -s ../../setting-repo.xml clean install
  508  h

cat ../../setting-repo.xml
---------->

<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd";
          xmlns="http://maven.apache.org/SETTINGS/1.0.0";
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <localRepository>${user.home}/tmp/m2-repo</localRepository>
</settings>

and after downloading the internet, it built OK.

        Andy

BTW: There is a unreliable step:

On two occasions in this release cycle I'd had a maven central down load error: both times it's the same artifact:

org.apache.mrunit:mrunit:jar:hadoop2:1.0.0

giving

[ERROR] Failed to execute goal on project jena-elephas-mapreduce: Could not resolve dependencies for project org.apache.jena:jena-elephas-mapreduce:jar:3.1.0: Failed to collect dependencies at org.apache.mrunit:mrunit:jar:hadoop2:1.0.0: Failed to read artifact descriptor for org.apache.mrunit:mrunit:jar:hadoop2:1.0.0: Could not transfer artifact org.apache.mrunit:mrunit:pom:1.0.0 from/to central (https://repo.maven.apache.org/maven2): Connection reset -> [Help 1]

redoing, or "-rf" constinuing works fine.

On 11/05/16 07:56, Osma Suominen wrote:
On 10/05/16 18:05, Andy Seaborne wrote:

+ can the source archive really be built?

Last time I only tested the pre-built rc2 binaries because I was in a
hurry, now I decided to check building the source (on Ubuntu 12.04 /
Oracle Java 8) and running all the tests.

But the build (using "mvn test" in the just-uncompressed root directory)
failed at jena-base, apparently because the shaded Guava classes
couldn't be found. Full build log attached.

I tried wiping the local Maven repository and starting over but it
didn't help.

I also tried running "mvn install" in the jena-shaded-guava directory
(which seemed to work) and then resumed the main build, but that didn't
help, I still get the errors about missing classes such as CacheStats.

The build will need to be restarted, not resumed.

I haven't usually compiled all of Jena myself, just the parts that I
need (jena-text and jena-fuseki{1,2}), so I may be missing something
obvious.

Shouldn't the source archive be self-contained, so that no parts of Jena
itself need to be downloaded from the Maven central repository?

-Osma

$ java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)

$ mvn -version
Apache Maven 3.0.4

I used 3.3.3


Maven home: /usr/share/maven
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "3.13.0-79-generic", arch: "amd64", family:
"unix"



Reply via email to