You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by "Griffin, Charles (NIH/NCI) [C]" <gr...@mail.nih.gov> on 2006/08/29 01:04:26 UTC

Error Compiling Class extending ComponentSupport using Maven

After manually installing 8 or so files due to dependencies, I cannot
get the class below to compile successfully using "mvn compile".  I get
the following error even after I manually installed the Jencks jar with
statement below.  Please help.

 

<<Manual installed Jencks jar which installed successfully>>

mvn install:install-file -DgroupId=jencks -DartifactId=jencks
-Dversion=1.2  -Dpackaging=jar -Dfile=C:\a\jar\jencks-1.2.jar

<<End of Manual installed Jencks jar which installed successfully>>

 

 

 

 

 

<<<<<<<<<<<Error resulting from the 'mvn compile'
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

[INFO]
------------------------------------------------------------------------

[ERROR] BUILD ERROR

[INFO]
------------------------------------------------------------------------

[INFO] Failed to resolve artifact.

 

Missing:

----------

1) jencks:jencks:jar:${pom.currentVersion}

 

  Try downloading the file manually from the project website.

 

  Then, install it using the command:

      mvn install:install-file -DgroupId=jencks -DartifactId=jencks \

          -Dversion=${pom.currentVersion} -Dpackaging=jar
-Dfile=/path/to/file

 

  Path to dependency:

        1) gov.nih.nci.caxchange:AuthenticationService:jar:0.0.1

        2) servicemix:servicemix-core:jar:2.0.2

        3) jencks:jencks-all:jar:1.1.1

        4) jencks:jencks:jar:${pom.currentVersion}

 

----------

1 required artifact is missing.

 

for artifact:

  gov.nih.nci.caxchange:AuthenticationService:jar:0.0.1

 

from the specified remote repositories:

  central (http://repo1.maven.org/maven2)

 

 

[INFO]
------------------------------------------------------------------------

[INFO] For more information, run Maven with the -e switch

[INFO]
------------------------------------------------------------------------

[INFO] Total time: 8 seconds

[INFO] Finished at: Mon Aug 28 18:56:28 EDT 2006

[INFO] Final Memory: 5M/9M

[INFO]
------------------------------------------------------------------------

 

<<<<<<<<<<<End of Error resulting from the 'mvn compile'
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 

 

 

 

 

 

 

<<<source>>>>

 

package test.services.authentication;

 

import javax.jbi.messaging.MessageExchange;

import javax.jbi.messaging.MessagingException;

 

import org.apache.servicemix.MessageExchangeListener;

import org.apache.servicemix.components.util.ComponentSupport;

 

 

public class AuthenticationService extends ComponentSupport implements
MessageExchangeListener {

 

      public void onMessageExchange(MessageExchange arg0) throws
MessagingException {

            // TODO Auto-generated method stub

 
System.out.println("************************************************");

            System.out.println("Made it here, yeaaaaaaah");

            System.out.println("Made it here, yeaaaaaaah");

            System.out.println("Made it here, yeaaaaaaah");

 
System.out.println("************************************************");

            

      }

 

}

 

<<<<<end source>>>>>>>>>>>>

 

                                                                   

<<<<<<Beginning of POM >>>>>>>>>>>>>>>>>>>>>>>>>>>.

 

<?xml version="1.0" encoding="UTF-8"?><project>

  <modelVersion>4.0.0</modelVersion>

  <groupId>test</groupId>

  <artifactId>AuthenticationService</artifactId>

  <version>0.0.1</version>

  <description></description>

  <dependencies>

    <dependency>

      <groupId>junit</groupId>

      <artifactId>junit</artifactId>

      <version>3.8.1</version>

    </dependency>

    <dependency>

      <groupId>servicemix</groupId>

      <artifactId>servicemix-core</artifactId>

      <version>2.0.2</version>

    </dependency>

    <dependency>

      <groupId>servicemix</groupId>

      <artifactId>servicemix-jbi</artifactId>

      <version>2.0.2</version>

    </dependency>    

  </dependencies>

</project>

 

<<<<<<END of POM >>>>>>>>>>>>>>>>>>>>>>>>>>>.

 

 


Re: Error Compiling Class extending ComponentSupport using Maven

Posted by Philip Dodds <ph...@gmail.com>.
I would look at the ServiceMix 3.0 SNAPSHOT releases as ServiceMix has
progressed greatly since the ServiceMix 2.0.2 release - as for getting
started on an servicemix-lwcontainer component I would look at using
the Maven archetype , if you have Maven2 installed you should be able
to use it :)

mvn archetype:create -DarchetypeGroupId=org.apache.servicemix.tooling
 -DarchetypeArtifactId=servicemix-lwcontainer-service-unit
 -DarchetypeVersion=3.0-incubating-SNAPSHOT
 -DgroupId=com.mycompany -DartifactId=example-lwcontainer-su

You should be able to pick up a copy of 3.0-incubating-SNAPSHOT from
http://people.apache.org/maven-snapshot-repository/org/apache/servicemix/apache-servicemix/3.0-incubating-SNAPSHOT/

Cheers

P

On 8/28/06, Griffin, Charles (NIH/NCI) [C] <gr...@mail.nih.gov> wrote:
> After manually installing 8 or so files due to dependencies, I cannot
> get the class below to compile successfully using "mvn compile".  I get
> the following error even after I manually installed the Jencks jar with
> statement below.  Please help.
>
>
>
> <<Manual installed Jencks jar which installed successfully>>
>
> mvn install:install-file -DgroupId=jencks -DartifactId=jencks
> -Dversion=1.2  -Dpackaging=jar -Dfile=C:\a\jar\jencks-1.2.jar
>
> <<End of Manual installed Jencks jar which installed successfully>>
>
>
>
>
>
>
>
>
>
>
>
> <<<<<<<<<<<Error resulting from the 'mvn compile'
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
> [INFO]
> ------------------------------------------------------------------------
>
> [ERROR] BUILD ERROR
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Failed to resolve artifact.
>
>
>
> Missing:
>
> ----------
>
> 1) jencks:jencks:jar:${pom.currentVersion}
>
>
>
>   Try downloading the file manually from the project website.
>
>
>
>   Then, install it using the command:
>
>       mvn install:install-file -DgroupId=jencks -DartifactId=jencks \
>
>           -Dversion=${pom.currentVersion} -Dpackaging=jar
> -Dfile=/path/to/file
>
>
>
>   Path to dependency:
>
>         1) gov.nih.nci.caxchange:AuthenticationService:jar:0.0.1
>
>         2) servicemix:servicemix-core:jar:2.0.2
>
>         3) jencks:jencks-all:jar:1.1.1
>
>         4) jencks:jencks:jar:${pom.currentVersion}
>
>
>
> ----------
>
> 1 required artifact is missing.
>
>
>
> for artifact:
>
>   gov.nih.nci.caxchange:AuthenticationService:jar:0.0.1
>
>
>
> from the specified remote repositories:
>
>   central (http://repo1.maven.org/maven2)
>
>
>
>
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] For more information, run Maven with the -e switch
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Total time: 8 seconds
>
> [INFO] Finished at: Mon Aug 28 18:56:28 EDT 2006
>
> [INFO] Final Memory: 5M/9M
>
> [INFO]
> ------------------------------------------------------------------------
>
>
>
> <<<<<<<<<<<End of Error resulting from the 'mvn compile'
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> <<<source>>>>
>
>
>
> package test.services.authentication;
>
>
>
> import javax.jbi.messaging.MessageExchange;
>
> import javax.jbi.messaging.MessagingException;
>
>
>
> import org.apache.servicemix.MessageExchangeListener;
>
> import org.apache.servicemix.components.util.ComponentSupport;
>
>
>
>
>
> public class AuthenticationService extends ComponentSupport implements
> MessageExchangeListener {
>
>
>
>       public void onMessageExchange(MessageExchange arg0) throws
> MessagingException {
>
>             // TODO Auto-generated method stub
>
>
> System.out.println("************************************************");
>
>             System.out.println("Made it here, yeaaaaaaah");
>
>             System.out.println("Made it here, yeaaaaaaah");
>
>             System.out.println("Made it here, yeaaaaaaah");
>
>
> System.out.println("************************************************");
>
>
>
>       }
>
>
>
> }
>
>
>
> <<<<<end source>>>>>>>>>>>>
>
>
>
>
>
> <<<<<<Beginning of POM >>>>>>>>>>>>>>>>>>>>>>>>>>>.
>
>
>
> <?xml version="1.0" encoding="UTF-8"?><project>
>
>   <modelVersion>4.0.0</modelVersion>
>
>   <groupId>test</groupId>
>
>   <artifactId>AuthenticationService</artifactId>
>
>   <version>0.0.1</version>
>
>   <description></description>
>
>   <dependencies>
>
>     <dependency>
>
>       <groupId>junit</groupId>
>
>       <artifactId>junit</artifactId>
>
>       <version>3.8.1</version>
>
>     </dependency>
>
>     <dependency>
>
>       <groupId>servicemix</groupId>
>
>       <artifactId>servicemix-core</artifactId>
>
>       <version>2.0.2</version>
>
>     </dependency>
>
>     <dependency>
>
>       <groupId>servicemix</groupId>
>
>       <artifactId>servicemix-jbi</artifactId>
>
>       <version>2.0.2</version>
>
>     </dependency>
>
>   </dependencies>
>
> </project>
>
>
>
> <<<<<<END of POM >>>>>>>>>>>>>>>>>>>>>>>>>>>.
>
>
>
>
>
>
>