Giter Site home page Giter Site logo

onejar-maven-plugin-trunk's People

Contributors

hugojosefson avatar simontuffs avatar

Watchers

James Cloos avatar

onejar-maven-plugin-trunk's Issues

Spring fails to find @Component bean if classpath scanning is used

What version of the product are you using? On what operating system?

onejar-maven-plugin 1.4.0, Windows XP

What steps will reproduce the problem?

    Using onejar-maven-plugin in an annotation-based Spring project.
Chances are that it’s the classpath scanning that is the problem.

    I had the following setup:

    Class:

    package com.example;

    @Component("transformer")
    public class MyTransformer {

    Spring config:

    <context:component-scan base-package="com.example" />

    Bootstrapping code:

        public static void main(String[] args) {
            ApplicationContext context = new
ClassPathXmlApplicationContext("applicationContext.xml");
            MyTransformer transformer = (MyTransformer)
context.getBean("transformer");
            transformer.run();
        }

    I got the following exception:

    NoSuchBeanDefinitionException: No bean named 'transformer' is defined

    I then switched to this config, still using annotation-based dependency
autowire, but requiring an explicit bean definition:

    Spring config:

    <context:annotation-config />
    <bean id="transformer" class="com.example.MyTransformer" />


Original issue reported on code.google.com by ulrik.sandberg on 17 Apr 2009 at 11:26

generic classpath arguments cannot be passed to execution

What steps will reproduce the problem?
1. try to instantiate a class using reflection, that exists in a jar that was 
added to classpath from command line using -cp

2. exception. class is not found in classpath

What is the expected output? What do you see instead?
class in jar that was added to classpath is found

What version of onejar-maven-plugin are you using?
0.97

What is the output of "mvn -version" on your machine?
1.7 64bit

Please provide any additional information below.
running the jar with java -jar ignores classpath arguments
and running the jar with java -classpath + main class throws err cant find main
these issues have to do with the plugin classloader
so generic classpath arguments cannot be passed to execution

Original issue reported on code.google.com by [email protected] on 14 Aug 2012 at 3:32

Can this be used under Java 1.5?

Hello, 

I am trying to run mvn install against java 1.5 and it doesn't seem to work. I 
am getting 

"
[ERROR] Failed to execute goal com.jolira:onejar-maven-plugin:1.4.4:one-jar 
(default) on project BulkMigrationM02: Execution default of goal com.jolira:one
jar-maven-plugin:1.4.4:one-jar failed: Unable to load the mojo 'one-jar' in the 
plugin 'com.jolira:onejar-maven-plugin:1.4.4' due to an API incompatibility
: org.codehaus.plexus.component.repository.exception.ComponentLookupException: 
Bad version number in .class file
"

On the other hand when I am running same command for java 1.7 it's running ok.

Is java 5 not supported? Any workarounds for this?

Thanks.



What version of onejar-maven-plugin are you using?
1.4.4

What is the output of "mvn -version" on your machine?
Apache Maven 3.0.3 (r1075438; 2011-02-28 17:31:09+0000)
Maven home: 
C:\instant_energy_files\instant_energy_cvs\instant_energy\trunk\build\apache-mav
en-3.0.3
Java version: 1.5.0_22, vendor: Sun Microsystems Inc.
Java home: C:\Program Files (x86)\Java\jdk1.5.0_22\jre
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
C:\Users\kaliakoudass>

Original issue reported on code.google.com by [email protected] on 20 Dec 2013 at 1:50

classifier option appears to have no effect

I'm using the following configuration, and the classifier of "full" appears
to have no effect.  I still get "htmlclient-1.0-SNAPSHOT.one-jar.jar" as
the final name of the onejar jar.

      <plugin>
        <groupId>org.dstovall</groupId>
        <artifactId>onejar-maven-plugin</artifactId>
        <version>1.4.0</version>
        <executions>
          <execution>
            <configuration>
              <!-- Optional, default is "onejar" -->
              <classifier>full</classifier>
            </configuration>
            <goals>
              <goal>one-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

Original issue reported on code.google.com by rektide on 10 Apr 2009 at 5:41

Implementation-Version:

It looks like Java 6 expects the manifest entry like 

Implementation-Version: 0.3-SNAPSHOT

instead of 
ImplementationVersion: 0.3-SNAPSHOT

if Package.getImplementationVersion() is going to work.

Also see
http://java.sun.com/javase/6/docs/technotes/guides/jar/jar.html#Main%20Attribute
s


Original issue reported on code.google.com by [email protected] on 13 Apr 2009 at 11:00

java.io.FileNotFoundException: log4j.xml

What steps will reproduce the problem?
1. Make a class to refer other jar's classes which in turn should refer 
log4j.xml
2. Add that jar dependency in pom that contains log4j.xml
3. Excute java -jar

What is the expected output? What do you see instead?
Getting below error

log4j:ERROR Could not parse url 
[jar:file:/C:/rxspecialty%20batch/rxspecialty-batch/target/rxspecialty-batch-0.0
.1-SNAPSHOT.o
ne-jar.jar!/lib/services-commons-aspects-0.0.1-SNAPSHOT.jar!/log4j.xml].
java.io.FileNotFoundException: JAR entry 
lib/services-commons-aspects-0.0.1-SNAPSHOT.jar!/log4j.xml not found in 
C:\rxspecial
ty batch\rxspecialty-batch\target\rxspecialty-batch-0.0.1-SNAPSHOT.one-jar.jar
        at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
        at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
        at org.apache.log4j.xml.DOMConfigurator$2.parse(DOMConfigurator.java:690)
        at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:789)



What version of onejar-maven-plugin are you using?
1.4.4


What is the output of "mvn -version" on your machine?
2.2.1


Please provide any additional information below.

<project xmlns="http://maven.apache.org/POM/4.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.cvsc.specialty</groupId>
    <artifactId>rxspecialty-batch</artifactId>
    <packaging>jar</packaging>
    <version>0.0.1-SNAPSHOT</version>
    <name>rxspecialty-batch</name>

    <properties>
        <compileSource>1.5</compileSource>      
        <spring.version>2.5.6.SEC01</spring.version>
    </properties>


    <build>

        <plugins>
            <!--  Java5 -->
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${compileSource}</source>
                    <target>${compileSource}</target>
                </configuration>
            </plugin>



        <plugin>                     
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>   


            </plugin>



    <plugin>
  <groupId>org.dstovall</groupId>
  <artifactId>onejar-maven-plugin</artifactId>
  <version>1.4.4</version>

        <configuration>

                            <onejarVersion>0.98</onejarVersion>

         </configuration>
  <executions>
    <execution>
      <goals>
        <goal>one-jar</goal>
      </goals>
    </execution>
  </executions>
</plugin>



        </plugins>
    </build>




        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <!--
                    To accommodate for the following Spring 2.5.x 's JUnit integration.
                    See: http://jira.springframework.org/browse/SPR-5145
                -->
                <version>4.4</version>
                <type>jar</type>
                <scope>test</scope>
            </dependency>                   
            <dependency>
                <groupId>com.oracle</groupId>
                <artifactId>ojdbc14</artifactId>
                <version>10.2.0.4.0</version>
            </dependency>

            <dependency>
                <groupId>com.cvsc.specialty</groupId>
                <artifactId>services-app</artifactId>
                <version>0.0.1-SNAPSHOT</version>

            </dependency>


                </dependencies>



</project>

Original issue reported on code.google.com by [email protected] on 8 Feb 2011 at 2:55

Artifacts should be copied by user selection (runtime, compile, etc)

What steps will reproduce the problem?
1. The one-jar maven plugin will copy all dependency libraries in to the 
one.jar/lib/ directory.

2. This includes even <scope>compile</scope> libraries of transitive 
dependencies, which are in 99% of all cases not needed to run the one.jar.

3. This means there are unnecessary libraries in the one.jar, bloating the 
resulting archive.

Ideally I should be able to pick

a) if transitive dependencies should be copied at all
b) for all dependencies (transitive or not) what scopes should be considered
c) probably, the default should be to copy transitive dependencies with 
<scope>runtime</scope> and not any other scope


What version of onejar-maven-plugin are you using?

1.4.3
What is the output of "mvn -version" on your machine?


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 8 Jul 2010 at 10:12

NullPointerException thrown trying to access MANIFEST.MF of embedded jars

What steps will reproduce the problem?

        Enumeration<URL> mfs = classLoader.getResources(JarFile.MANIFEST_NAME);

        while (mfs.hasMoreElements()) {
            URL u = mfs.nextElement();
            Manifest mf = new Manifest(u.openStream());
            processJarFile(mf);
        }

Try to access the MANIFEST.MF file when one of the embedded jars does not have 
the MANIFEST.MF entry as the 1st or 2nd entry in the jar.  Like aspectjrt 

What is the expected output? What do you see instead?

Caused by: java.lang.NullPointerException
    at com.simontuffs.onejar.OneJarFile.getInputStream(OneJarFile.java:116)
    at com.simontuffs.onejar.OneJarURLConnection.getInputStream(OneJarURLConnection.java:51)
    at java.net.URL.openStream(URL.java:1037)

What version of onejar-maven-plugin are you using?

1.4.4

What is the output of "mvn -version" on your machine?
3.2.3

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 3 Nov 2014 at 9:15

upload to central repository

This plugin is very useful, but would be much easier to use if uploaded to the 
central repo. Was this option considered ? I definitely vote for it.

There are some related guides for upload / repo sync:
- http://maven.apache.org/guides/mini/guide-central-repository-upload.html
- 
https://docs.sonatype.org/display/Repository/Uploading+3rd-party+Artifacts+to+Ma
ven+Central

Original issue reported on code.google.com by [email protected] on 5 Oct 2010 at 2:03

Cannot add one-jar repo as a proxy repo in Nexus

What steps will reproduce the problem?
1. Install Nexus 1.3.4 (latest)
2. Login as admin
3. Click on Repositories
4. Click Add | Proxy Repository
5. Enter "onejar-maven-plugin.googlecode.com" for the "Repository ID" field
6. Enter "http://onejar-maven-plugin.googlecode.com/svn/mavenrepo" for the
"Remote Storage Location" field.  
7. Provide a "onejar repo" in the "Repository Name" field
8. Leave all other fields as defaults and click Save.
9. View the repository list and click on the new onejar repo row. 
10. Notice below there are no files.  Right click on repository row and
select select Expire Cache and Reindex.  They have no effect.  
11. Look at the Nexus logs under "Logs and Config Files" and notice the
exception.  

I think the exception is Nexus is expecting a directory called
"onejar-maven-plugin.googlecode.com" at the URL
"http://onejar-maven-plugin.googlecode.com/svn/mavenrepo".  This is the way
the fest repository works correctly for me with Nexus

What is the expected output? What do you see instead?

A listing of the contents of the one-jar repository in Nexus.

Try installing the fest repository using 

<repository>
            <id>fest</id>
            <url>http://fest.googlecode.com/svn/trunk/fest/m2/repository/</url>
        </repository>

it works fine with Nexus, you can see its repository contents.


What version of the product are you using? On what operating system?

Nexus Version 1.3.4
One-jar 1.4.1

Please provide any additional information below.

Either there is a problem with Nexus or your repository id is not compliant
with your url structure.  Fest works with 

<id>fest</id>
  <url>http://fest.googlecode.com/svn/trunk/fest/m2/repository/</url>

At the url there is a fest directory and I believe Nexus relies on this. 
With the one-jar repo its

 <id>onejar-maven-plugin.googlecode.com</id>
            <url>http://onejar-maven-plugin.googlecode.com/svn/mavenrepo</url>

But if you go to that url there is no location there that matches the id.






Original issue reported on code.google.com by [email protected] on 12 Jun 2009 at 2:42

Java Store and One-Jar

I submitted recently my timefinder application (http://timefinder.sf.net)
to the java store using the maven jnlp plugin. This does not work.
(Contacted Sun. hopefully they can solve this issue or point me to my mistake)

So I tried another approach: your nice plugin!

1. I tried to submit a signed one-jar version of TimeFinder. First it fails
via:
Caused by: java.lang.IllegalArgumentException: Unable to locate
com.simontuffs.onejar.Boot in the java.class.path: consider using
-Done-jar.jar.path to specify the one-jar filename.
    at com.simontuffs.onejar.Boot.getMyJarPath(Boot.java:400)
    at com.simontuffs.onejar.Boot.run(Boot.java:212)

Other people had the same problem:
http://forums.sun.com/thread.jspa?threadID=5390621
This issue was simply solved by specifying -Done-jar.jar.path=main.jar in
the warehouse frontend

2. But now it fails via: 
Caused by: java.util.zip.ZipException: error in opening zip file
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:114)
    at java.util.jar.JarFile.<init>(JarFile.java:133)
    at java.util.jar.JarFile.<init>(JarFile.java:70)
    at com.simontuffs.onejar.Boot.run(Boot.java:213)

Maybe this problem is because of the inner jars are unsigned?

> What version of onejar-maven-plugin are you using?

0.96

> What is the output of "mvn -version" on your machine?

Apache Maven 2.2.1 (rdebian-1)
Java version: 1.6.0_15
Java home: /usr/lib/jvm/java-6-sun-1.6.0.15/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "linux" version: "2.6.31-16-generic" arch: "i386" Family: "unix"

Original issue reported on code.google.com by [email protected] on 21 Dec 2009 at 10:00

Cant specify JarClassLoader for One-jar, need to because of spring url loading

What steps will reproduce the problem?
1. Create an application that involves the ClassPathResource of spring and load 
a URL from that.

What is the expected output? What do you see instead?
- Cant load the resource since the url is built up incorrectly for spring to 
use. Specifying the 
"<One-Jar-URL-Factory>com.simontuffs.onejar.JarClassLoader$OneJarURLFactory</One
-Jar-URL-Factory>" setting solves the matter, but we cant specify it in the 
maven plugin config!

What version of onejar-maven-plugin are you using?
1.4.4

What is the output of "mvn -version" on your machine?
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.0.0-13-generic", arch: "amd64", family: "unix"

Please provide any additional information below.
If you let me send you a patch, then I might be able to add an option to supply 
some extra one-jar specific config settings for all kinds of corner cases.

Original issue reported on code.google.com by [email protected] on 21 Dec 2011 at 1:33

Use newer version of One-JAR 0.97

Version 1.4.4 of the plugin has one-jar-boot-0.97.jar in it (version 
0.97-rc11-20100715-0959). The newest release of 0.97 has the version 
0.97-rc12-20110504-1459.

Please update the plugin.

Original issue reported on code.google.com by [email protected] on 27 Oct 2011 at 11:46

  • Merged into: #30

Redirect old maven repo

People with old pluginRepository settings might believe they have the
latest version of onejar-maven-plugin, even though they are stuck at 1.2.2.

Either shut the old repo down (so that they'll notice), or add a 301
redirect filter from http://dstovall.{com,org}/maven2/* to
http://onejar-maven-plugin.googlecode.com/svn/mavenrepo/* 

This way, even users with the old pluginRepository settings will be able to
benefit from the latest releases here.

Original issue reported on code.google.com by [email protected] on 14 Mar 2009 at 3:16

Filename inconsistency between jar in build directory and attached one

What steps will reproduce the problem?
1. Add the onejar-maven-plugin in your build lifecycle
2. Configure it so it attach the produced jar to the build
3. Specify a custom classifier (optionnal)

Example configuration snippet :
    <attachToBuild>true</attachToBuild>
    <classifier>yourcustomclassifier</classifier>


What is the expected output? What do you see instead?

For example a project with artifactId "test" :
 - test-1.0-SNAPSHOT.one-jar.jar in the target/ directory
 - test-1.0-SNAPSHOT-yourcustomclassifier.jar in the maven repository


What version of the product are you using? 

1.4.0

Original issue reported on code.google.com by [email protected] on 26 Mar 2009 at 7:56

Make OneJarMojo.mainJarFilename writeable

What steps will reproduce the problem?
1. Try running the plugin against a project with WAR packaging.

What is the expected output? What do you see instead?
The plugin will work fine is this mainJarFilename property can be configured. 
Now it throws a java.io.FileNotFoundException because it only searches for a 
JAR file or a configuration error if you try to provide the name it should look 
for.

What version of onejar-maven-plugin are you using?
1.4.1

What is the output of "mvn -version" on your machine?
Apache Maven 2.2.1 (r801777; 2009-08-06 22:16:01+0300)


Please provide any additional information below.
Thanks in advance!

Original issue reported on code.google.com by [email protected] on 5 Aug 2010 at 4:22

Dependencies in 'system' scope not included

What steps will reproduce the problem?
1.  Add a dependency similar to the following:
        <dependency>
            <groupId>com.ibm</groupId>
            <artifactId>com.ibm.mq</artifactId>
            <version>7.0</version>
            <scope>system</scope>
            <systemPath>${lib.path}/com.ibm.mq.jar</systemPath>
        </dependency>
2. Make sure the <systemPath> points to a valid local directory & filename
3. Run mvn clean package

What is the expected output? What do you see instead?

Expected output is to have a xxx.one-jar.jar that includes all
dependencies.  Instead, I only see the dependencies included in the
xxx.one-jar.jar that do NOT have a 'system' scope.

What version of the product are you using? On what operating system?
1.4.0

Please provide any additional information below.
I've tried using the <binlibs> element in the plugin and specifying my
system dependencies.  That included the dependencies however, it packaged
them into a binlib directory, which was not what was desired.

Original issue reported on code.google.com by [email protected] on 15 Apr 2009 at 5:29

Add redirects to dstovall.com/org

Once the googlecode site is updated to reflect its 'official' status, 
update all the redirects on dstovall.com/org to point at googlecode's 
version of the site instead.

Original issue reported on code.google.com by [email protected] on 4 Mar 2009 at 11:42

How to Get List of ClassPath Resources in OneJar?

What steps will reproduce the problem?

1.  Write code to list files in standard maven resources dir
2.  Package app with one-jar
3.  Try to run the app and list resource files

What is the expected output? What do you see instead?

A list of resource files on the classpath.

What version of onejar-maven-plugin are you using?

1.4.4

What is the output of "mvn -version" on your machine?

Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 
07:22:22-0800)
Maven home: /usr/local/maven
Java version: 1.7.0_51, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51.x86_64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.32-431.5.1.el6.x86_64", arch: "amd64", family: 
"unix"

Please provide any additional information below.

Please see this stack overflow.  This is not so much an issue or error with 
onejar, but a question about how to perform a routine task in the context of 
using the onejar maven plugin.

http://stackoverflow.com/questions/23094931/unable-to-get-file-list-from-standar
d-resource-dir-in-maven-project-with-spring/23132283?noredirect=1#23132283

Original issue reported on code.google.com by [email protected] on 17 Apr 2014 at 4:53

Add arbitrary manifest entries to top-level

What version of onejar-maven-plugin are you using?

1.4.4

I'd like to add arbitrary top-level manifest entries to the MANIFEST.MF used by 
one-jar, not the one nested inside my bundled jars.

In particular I want to add pre-main or agentmain.

Original issue reported on code.google.com by [email protected] on 8 Jun 2012 at 5:20

Unrecognised tag: 'executions'

What steps will reproduce the problem?
1. added following to my pom file
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>com.enservio.msgconsumer.service.Main</mainClass>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.dstovall</groupId>
        <artifactId>onejar-maven-plugin</artifactId>
        <version>1.4.2</version>
        <executions>
          <execution>
            <configuration>
              <mainClass>com.enservio.msgconsumer.service.Main</mainClass>
            </configuration>
            <goals>
              <goal>one-jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>


    <pluginRepository>
      <id>onejar-maven-plugin.googlecode.com</id>
      <url>http://onejar-maven-plugin.googlecode.com/svn/mavenrepo</url>
    </pluginRepository>


What is the expected output? What do you see instead?
expected a jar file with dependences in one. could not even get to the 
point of building


What version of onejar-maven-plugin are you using?
1.4.2


What is the output of "mvn -version" on your machine?
Maven version: 2.0.9
Java version: 1.6.0_18
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 27 May 2010 at 10:02

Execution of one-jar does not work

What steps will reproduce the problem?
1.Execute command line java -jar xxxxxxx.one-jar.jar

What is the expected output? What do you see instead?
I expect the main class to be executed within the jar. I see an exception 
instead:

Exception in thread "main" java.lang.IllegalAccessException: Class 
com.simontuffs.onejar.Boot can not access a member of class 
RMB.CreditConsole.Program with modifiers "public static"
        at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
        at java.lang.reflect.Method.invoke(Method.java:578)
        at com.simontuffs.onejar.Boot.run(Boot.java:306)
        at com.simontuffs.onejar.Boot.main(Boot.java:159)


What version of the product are you using? On what operating system?
I am using version 1.4.1 of one-jar on Windows 2000 OS.

Please provide any additional information below.
Could the exception mean that I need to state my mainClass package 
differently? It worked when I used that as my package and class for just a 
normal jar without the dependencies.

Original issue reported on code.google.com by [email protected] on 2 Jun 2009 at 6:36

Axis2 jar doesnot load

What steps will reproduce the problem?
1. Create a maven project and add axis2 dependency 1.5.2
2. I added a webservice client jar to this component
3.

What is the expected output? What do you see instead?
I expected no errors on start up, but got the stacktrace below:
2011-06-21 17:30:07,218 [main] WARN  
org.apache.axiom.util.stax.dialect.StAXDialectDetector  - Unable to load 
manifest for StAX implementation at 
jar:file:/hardware_monitor_agent-393.0.2-SNAPSHOT.one-jar.jar!/lib/wstx-asl-3.2.
4.jar!/
2011-06-21 17:30:07,404 [main] ERROR org.apache.axis2.deployment.ModuleDeployer 
 - The axis2-1.5.2.jar module, which is not valid, caused The 
/hardware_monitor_agent-393.0.2-SNAPSHOT.one-jar.jar!/lib/axis2-1.5.2.jar file 
cannot be found.
org.apache.axis2.AxisFault: The 
/hardware_monitor_agent-393.0.2-SNAPSHOT.one-jar.jar!/lib/axis2-1.5.2.jar file 
cannot be found.
    at org.apache.axis2.deployment.repository.util.DeploymentFileData.setClassLoader(DeploymentFileData.java:111)
    at org.apache.axis2.deployment.ModuleDeployer.deploy(ModuleDeployer.java:65)
    at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
    at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:659)
    at org.apache.axis2.deployment.RepositoryListener.loadClassPathModules(RepositoryListener.java:209)
    at org.apache.axis2.deployment.RepositoryListener.init2(RepositoryListener.java:70)
    at org.apache.axis2.deployment.RepositoryListener.<init>(RepositoryListener.java:63)
    at org.apache.axis2.deployment.DeploymentEngine.loadFromClassPath(DeploymentEngine.java:164)
    at org.apache.axis2.deployment.FileSystemConfigurator.getAxisConfiguration(FileSystemConfigurator.java:135)
    at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:64)
    at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:206)
    at org.apache.axis2.client.ServiceClient.configureServiceClient(ServiceClient.java:150)
    at org.apache.axis2.client.ServiceClient.<init>(ServiceClient.java:143)
    at za.co.marketech.schemas.HARDWARE_MONITORStub.<init>(HARDWARE_MONITORStub.java:163)
    at za.co.marketech.schemas.HARDWARE_MONITORStub.<init>(HARDWARE_MONITORStub.java:149)
    at za.co.marketech.schemas.HARDWARE_MONITORStub.<init>(HARDWARE_MONITORStub.java:197)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:87)
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:248)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
    at za.co.marketech.util.hardware_monitor.HardwareMonitorJar.initialize(HardwareMonitorJar.java:30)
    at za.co.marketech.util.hardware_monitor.HardwareMonitorJar.main(HardwareMonitorJar.java:18)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.simontuffs.onejar.Boot.run(Boot.java:340)
    at com.simontuffs.onejar.Boot.main(Boot.java:166)


What version of onejar-maven-plugin are you using? 1.4.4


What is the output of "mvn -version" on your machine? 
Apache Maven 3.0.2 (r1056850; 2011-01-09 02:58:10+0200)
Java version: 1.6.0_24, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"

and my other machine have the same error:
java version "1.6.0_17"
OpenJDK Runtime Environment (IcedTea6 1.7.3) (suse-7.3-x86_64)
OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)


Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 21 Jun 2011 at 3:50

Local dependency projects are not included in the onejar

Local dependency projects are not included in the onejar

What steps will reproduce the problem?
1. Using an eclipse workspace with several projects
2. Add default onejar tags to main project pom.xml
3. Run As Maven Package

What is the expected output? What do you see instead?
Local project jars should be in the onejar lib directory along with 3rd party 
dependency projects. They are no where to be found. If I delete a local 
project, resorting to a .m2 version. That jar will then show up in the onejar.

What version of onejar-maven-plugin are you using?
This is the pom entry
<plugins>
  <plugin>
    <groupId>org.dstovall</groupId>
    <artifactId>onejar-maven-plugin</artifactId>
    <version>1.4.3</version>
    <executions>
      <execution>
        <configuration>
          <mainClass>com.protedyne.PatientInventoryLauncher</mainClass>
          <!-- Optional -->
      <onejarVersion>0.97</onejarVersion>
          <!-- Optional, default is false -->
      <attachToBuild>true</attachToBuild>
          <!-- Optional, default is "onejar" -->
          <classifier>onejar</classifier>
        </configuration>
        <goals>
          <goal>one-jar</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
</plugins>

What is the output of "mvn -version" on your machine?
Apache Maven 2.1.0 (r755702; 2009-03-18 15:10:27-0400)
Java version: 1.6.0_20
Java home: C:\Program Files\Java\jdk1.6.0_20\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7" version: "6.1" arch: "amd64" Family: "windows"

Please provide any additional information below.
It works as expected using "mvn package" from the command window, so I'm 
suspecting it has to do with the plugi-in

Thanks
Dave

Original issue reported on code.google.com by [email protected] on 10 Sep 2010 at 1:54

using different native libs for different os not working

What steps will reproduce the problem?
1. In case of using different native libraries for different operating systems 
or architecures, one-jar is expecting subfolders in its binlib folder (e.g. 
binlib/linux32, binlib/linux64, binlib/macosx, ...). This is not working with 
the onejar-maven-plugin.

What is the expected output? What do you see instead?
I expected to see these subfolders in binlib folder of jar-file, but i don't 
see any subfolders at all.

What version of onejar-maven-plugin are you using?
1.4.2

What is the output of "mvn -version" on your machine?
Apache Maven 2.2.0 (r788681; 2009-06-26 15:04:01+0200)
Java version: 1.6.0_20
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: de_DE, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.4" arch: "x86_64" Family: "mac"

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 18 Aug 2010 at 3:07

Runtime dependencies not included

This was an open issue when we tranfered the project from dstovall.org to
googlecode.

---
Hannu Leinonen wrote:

It still seems that dependencies with runtime scope are not included in the
one-jar.

I was experiencing with it a bit and noticed that by changing the line:

 * @requiresDependencyResolution compile

to

 * @requiresDependencyResolution runtime

it puts the correct jars to the one-jar. Instead of the jars from provided
and compile scopes it puts there the jars from runtime and compile scopes
which is the way I'd expect it to work.

-Hannu

Original issue reported on code.google.com by [email protected] on 13 Mar 2009 at 7:11

onejar does not load log4j.properties from the classpath

What steps will reproduce the problem?
1. Create an artifact com.foo:baz as baz.jar with log4j.properties.
2. Create onejar as baz.onejar.jar.
3. Place another log4j.properties in the working-directory and invoke
baz.onejar.jar with a modified classpath as "java -jar baz.onejar.jar
-classpath .". log4j.properties is loaded from baz.jar instead from the
current directory.

What is the expected output? What do you see instead?
log4j.properties should be loaded from the working directory.

What version of onejar-maven-plugin are you using?
1.4.0

What is the output of "mvn -version" on your machine?
Apache Maven 2.2.0 (r788681; 2009-06-26 14:04:01+0100)
Java version: 1.5.0_17
Java home: C:\Program Files\Java\jdk1.5.0_17\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 3 Nov 2009 at 12:26

Provide override for generated jar file name

What steps will reproduce the problem?
N/A

What is the expected output? What do you see instead?
N/A

What version of onejar-maven-plugin are you using?
1.4.4

What is the output of "mvn -version" on your machine?
Apache Maven 2.2.1 (rdebian-1)
Java version: 1.6.0_22
Java home: /usr/lib/jvm/java-6-sun-1.6.0.22/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.32-27-generic" arch: "i386" Family: "unix"


Please provide any additional information below.
There seems to be no way to override the name of the jar file (unless I am 
overlooking something). It would be really handy to have this ability than to 
have to hack it somehow.

Thanks!

Original issue reported on code.google.com by [email protected] on 11 Feb 2011 at 7:08

Upload old maven repo here before next release.

Reminder to upload old maven repo at http://dstovall.org/maven2/

to http://onejar-maven-plugin.googlecode.com/svn/mavenrepo/

before doing the "mvn release..." for version 1.2.3.

This is to avoid strange behavior if anyone want to use old versions.

(you're welcome to zip the directory and email it to me if you like. i
already have the uploading tools configured and ready to go. /hugo)

Original issue reported on code.google.com by [email protected] on 3 Mar 2009 at 4:38

Enhanchment - support adding one-jar.properties to the target one-jar

I want the ability to turn off info logging once I have my project working with 
one-jar. 

To enable this, I have added a "files" property that lets me add a 
one-jar.properties file to the root of the target one-jar.

The plugin configuration would look like this:
    <configuration>
        <files>
            <file>${basedir}/onejar/one-jar.properties</file>
        </files>
        ...                    
    </configuration>

A patch is attached.

What is the expected output? What do you see instead?
The specified files are copied to the root of the target one-jar.

What version of onejar-maven-plugin are you using?
1.4.6

What is the output of "mvn -version" on your machine?
3.05

Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 8 Jan 2014 at 9:24

Attachments:

Duplicate jars from different dependencies throw java.util.zip.ZipException

What steps will reproduce the problem?
1. Find two dependencies that both depend on the same jar
2. Add them to the same project and one-jar them

What is the expected output? What do you see instead?

Expected: The second copy of the same jar would overwrite the first, or be
skipped if it's already in the one-jar

Instead:
[INFO] One-Jar file:
/Users/michaeld/Dropbox/Dev/idea/Filestore2Fedora/target/Filestore2Fedora-1.0-SN
APSHOT.one-jar.jar
[ERROR] 
java.util.zip.ZipException: duplicate entry: lib/xmlParserAPIs-2.0.2.jar
    at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175)
    at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92)
    at org.dstovall.OneJarMojo.addToZip(OneJarMojo.java:268)
    at org.dstovall.OneJarMojo.addToZip(OneJarMojo.java:264)
    at org.dstovall.OneJarMojo.execute(OneJarMojo.java:166)
    at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.ja
va:490)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycl
eExecutor.java:694)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(Defaul
tLifecycleExecutor.java:569)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycle
Executor.java:539)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures
(DefaultLifecycleExecutor.java:387)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultL
ifecycleExecutor.java:348)
    at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExec
utor.java:180)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
    at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
    at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
    at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] One-jar Mojo failed.

What version of onejar-maven-plugin are you using?

1.4.1


What is the output of "mvn -version" on your machine?

Apache Maven 2.2.1 (r801777; 2009-08-06 15:16:01-0400)
Java version: 1.6.0_17
Java home: /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x" version: "10.6.3" arch: "x86_64" Family: "mac"


Original issue reported on code.google.com by [email protected] on 13 Apr 2010 at 9:38

Support /binlib for native libraries

onejar-maven-plugin does not expose configuration options to add native
libraries to the /binlib jar directory as onejar does :
http://one-jar.sourceforge.net/index.php?page=introduction&file=native

Original issue reported on code.google.com by [email protected] on 19 Mar 2009 at 10:02

Splash Screen for one jar plugin

It doesnt appear to be possible to put a splash screen in the MANIFEST.MF
file

ie
SplashScreen-Image: MyImage.png

If it is possible could you update the docs.

Thanks 

Andy Bailey
http://www.hazlorealidad.com

Original issue reported on code.google.com by [email protected] on 18 May 2009 at 2:07

ClassCastException with one jar and java help

What steps will reproduce the problem?

Using java help from within one jar creates a class cast exception

//I initialize java help like this

ClassLoader cl = getClass().getClassLoader();

            URL hsURL = HelpSet.findHelpSet(cl, helpHS);
            hs = new HelpSet(null, hsURL);
            hb = hs.createHelpBroker();

//In the action to show the Java Help component 
System.out.println("Help");
        new CSH.DisplayHelpFromSource( hb );
        hb.setDisplayed(true);

What is the expected output? What do you see instead?

Uncaught error fetching image:
java.lang.ClassCastException: sun.misc.Launcher$AppClassLoader cannot be
cast to com.simontuffs.onejar.JarClassLoader
    at com.simontuffs.onejar.JarClassLoader.getByteStream(JarClassLoader.java:753)
    at com.simontuffs.onejar.Handler$1.getInputStream(Handler.java:50)
    at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:114)
    at
sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240)
    at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
    at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)


What version of the product are you using? On what operating system?

java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 11.2-b01, mixed mode)

Linux pavilion 2.6.27.21-170.2.56.fc10.x86_64 #1 SMP Mon Mar 23 23:08:10
EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

<dependency>
  <groupId>javax.help</groupId>
  <artifactId>javahelp</artifactId>
  <version>2.0.02</version>
</dependency> 
..
<groupId>org.dstovall</groupId>
                <artifactId>onejar-maven-plugin</artifactId>
                <version>1.4.1</version>
                <executions>
                    <execution>
                        <configuration>
                            <!-- Optional -->
                            <onejarVersion>0.96</onejarVersion>



Please provide any additional information below.

Original issue reported on code.google.com by [email protected] on 10 Jun 2009 at 3:05

How to add class path folder in Manifest

What steps will reproduce the problem?
NA

What is the expected output? What do you see instead?
I need my actual jar class path something like having my conf folder as below

Class-Path: conf/ commons-lang-2.6.jar mail-1.4.7.jar 

my folder conf located with the myjar.one-jar.jar location.

conf
myjar.one-jar.jar

What version of onejar-maven-plugin are you using?

<version>1.4.4</version>
What is the output of "mvn -version" on your machine?
3.2.5

Please provide any additional information below.

Can you please help how can i refer external folder something like conf in my 
jar manifest classpath.

Original issue reported on code.google.com by [email protected] on 18 Feb 2015 at 11:28

Support newer versions of OneJar

I need to have onejar-maven-plugin to support more versions of OneJar. There 
are a lot of RC's being released by the OneJar project fixing issues I 
experience that are not available in onejar-maven-plugin. Adding these RC jars 
to src/main/resources is sufficient to support these versions.

Original issue reported on code.google.com by [email protected] on 28 Feb 2011 at 10:26

Other project dependencies seem to not be added into one-jar

What steps will reproduce the problem?
1. Execute my one-jar.
2. Project class dependency is not found.

java.lang.NoClassDefFoundError: 
RMB/CreditData/CreditDownload$MarkitIndexFamily
        at RMB.CreditConsole.Program.DownloadXML(Program.java:68)
        at RMB.CreditConsole.Program.main(Program.java:401)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.simontuffs.onejar.Boot.run(Boot.java:306)
        at com.simontuffs.onejar.Boot.main(Boot.java:159)

What is the expected output? What do you see instead?
My other maven projects that are included in the pom as a dependency are 
not included within the one-jar. Only my external jars are included. The 
error above occurs even though I have that specific project added as a 
dependency.

What version of the product are you using? On what operating system?
I am using version 1.4.1 with Windows 200 OS.

Please provide any additional information below.
Attached is my pom file.

Original issue reported on code.google.com by [email protected] on 2 Jun 2009 at 9:34

Attachments:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.