On 9/20/18, [email protected] <[email protected]> wrote:
> =============================================================================
> Today's topic summary
> =============================================================================
>
> Group: [email protected]
> Url:
>
> https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/electricvlsi/topics
>
>
>   - Submitting patch to Electric build [2 Updates]
>     http://groups.google.com/group/electricvlsi/t/b0e52c881636562a
>
>
> =============================================================================
> Topic: Submitting patch to Electric build
> Url: http://groups.google.com/group/electricvlsi/t/b0e52c881636562a
> =============================================================================
>
> ---------- 1 of 2 ----------
> From: Alexandre Rusev <[email protected]>
> Date: Sep 19 03:25PM +0300
> Url: http://groups.google.com/group/electricvlsi/msg/9f03c90fdebce
>
> Snapshote jar file built with Electric pom.xml is missing slf4j package,
> which is referenced by main code.
> This patch is adding missed dependency.
>
>
> The patch is dealing with problem.
>
> Steven, Dmitry review this trivial patch plz.
> If it is okay, let me commit it to repository plz.
>
> Alex.
>
>
> ---------- 2 of 2 ----------
> From: Dmitry Nadezhin <[email protected]>
> Date: Sep 19 07:36PM +0300
> Url: http://groups.google.com/group/electricvlsi/msg/9fdf869b811e2
>
> Hi Alex,
>
> When we execute
> $ mvn install
> with pom.xml before the patch.
> maven produces jar file without dependencies:
> target/electric-9.08-a-SNAPSHOT.jar
> When we launch it we get an exception because of absent dependecies:
> $ java -jar electric-9.08-a-SNAPSHOT.jar
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/slf4j/LoggerFactory
>     at com.sun.electric.Launcher.<clinit>(Launcher.java:55)
> Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
>     at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
>     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
>     at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>     ... 1 more
>
> jar with depencecies can be procuced by pom.xml before the patch by a
> command:
> $ mvn assembly:assembly
> It produces tatget/electric-9.08-a-SNAPSHOT-jar-with-dependencies.jar
> This jar contains necessary dependencies including
> org.slf4j.slf4j-api  -   slf4 api
> org.slf4j.slf4j-jdk14  - simplie implementation of slf4j-api using JDK
> classes java.util.logging.*
> This command starts Electric succesfully in my environment:
> $ java -jar electric-9.08-a-SNAPSHOT-jar-with-dependencies.jar
>
> The suggested patch contains three changes
> 1) Add dependency with advanced implementationof slf4 api
> +         <dependency>
> +            <groupId>org.slf4j</groupId>
> +            <artifactId>slf4j-log4j12</artifactId>
> +            <version>${orgSlf4jVersion}</version>
> +        </dependency>
> 2) Remove main class from jar without dependencies
> -            <plugin>
> -                <groupId>org.apache.maven.plugins</groupId>
> -                <artifactId>maven-jar-plugin</artifactId>
> -                <version>2.6</version>
> -                <configuration>
> -                    <archive>
> -                        <manifest>
> -
> <mainClass>com.sun.electric.Launcher</mainClass>
> -                        </manifest>
> -                    </archive>
> -                </configuration>
> -            </plugin>
> 3) mvn install creates jar with dependency also.
>    mvn nassembly:assembly is no more necessary
> +                <executions>
> +                    <execution>
> +                        <phase>package</phase>
> +                        <goals>
> +                            <goal>single</goal>
> +                        </goals>
> +                    </execution>
> +                </executions>
>
> I agree with the change (3) . An user obtains jar with dependencies
> automatically
> without need to run $ mvn assembly:assembly .
One way is to document "mvn assembly:assembly" in README.TXT,
another is to build both jars by default

surely (3) increases usability of sources

"assembly" plugin may just was convinient tool to build both jars...
>
> Can you explain why (1) and (2) are necessary ?
> Do you need some features form the advanced implementation slf4j-log4j12
> which are not available in the simple implementation org.slf4j.slf4j-jdk14
> ?
No
> Why do you want to drop manifiest with main calss from jar without
> dependencies ?
   Ooops!
   I really dropped it from SNAPSHOTE jar
>
> Does pom.xml with only patch (3) work in you environment ?
Okay, let me verify simplified patch and may be rework it

>
> Best Regards,
>   -Dima
>
>
>
>
>
>
>
>
>
>
> --
> You received this digest because you're subscribed to updates for this
> group. You can change your settings on the group membership page:
>
> https://groups.google.com/forum/?utm_source=digest&utm_medium=email#!forum/electricvlsi/join
> .
> To unsubscribe from this group and stop receiving emails from it send an
> email to [email protected].
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Electric VLSI Editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to