• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

my first maven build - errors

 
Rancher
Posts: 623
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have downloaded an ebook "Introducing Maven" 2nd edition by Balaji Varanasi and am working my way through the early chapters

In Chapter 4, we get to building a package

When I execute "mvn package" I get the following 2 errors :-

[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding Cp1252, i.e. build is platform dependent!
[INFO] Compiling 1 source file to C:\apress\gswm-book\chapter4\gswm\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
[INFO] 2 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:19 min
[INFO] Finished at: 2021-06-03T16:58:03+12:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project gswm: Compilation failure: Compilation failure:
[ERROR] Source option 5 is no longer supported. Use 7 or later.
[ERROR] Target option 5 is no longer supported. Use 7 or later.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
PS C:\apress\gswm-book\chapter4\gswm>

Could someone explain the meaning of these 2 errors and where in the code I need to correct

Bob M
 
Saloon Keeper
Posts: 24499
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, now. Isn't that interesting?

It appears that Java 5 is no longer supported as either source or target bt Maven. I've long thought of Java 5 as the baseline for modern Java.

Change your POM maven-compiler-plugin clause to include source and target set to 1.7 or higher. Or replace them with the release clause, like so (for Java 11):


You might want to look at this site for other information on bringing Maven projects into today's world: https://winterbe.com/posts/2018/08/29/migrate-maven-projects-to-java-11-jigsaw/
 
Bob Matthews
Rancher
Posts: 623
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Had a bit of a read..........

then tried: mvn release:update-versions

when it asks me for the version I enter "11"

but it keeps asking the same question over and over  ???

don't understand this

my pom.xml file is thus :_



Bob M
 
Bob Matthews
Rancher
Posts: 623
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Update:-

added

<build>
   <plugins>
     <plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-compiler-plugin</artifactId>
   <version>3.8.0</version>
   <configuration>
       <release>11</release>
   </configuration>
     </plugin>
   </plugins>
 </build>

to pom.xml

and all is AOK
Bob M
 
Bob Matthews
Rancher
Posts: 623
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Tim said:-

"This is definitely not well-formed as an open-source project.

Just to start with, a good github shareable project needs a README.md file that describes what the project is good for, what it needs to run, and how to build it.

Plus a first-class shareable project shouldn't be dependent on an IDE at all., It should be buildable using Maven, Gradle, Ant-with-Ivy or some other universal build tool.

Lacking that, as Stephan has noted, you either need to manually create your own build profile that pulls in the missing dependencies automatically or at the very least, manually download the dependent libraries and install them where the Eclipse project builder can find them."
--------------------------------------
I clearly do not have a readme file explaining how to build this project

I have worked thru a book on Maven, but it seems such a huge jump from "Hello World" example to this project

There are about 100 .java files in amongst others such as data sets and excel spreadsheets

I am totally confused as to which source files need to be in the src/main/java folder structure and which java files are simply dependencies for the former

In addition, I do not understand where the latter group (dependencies) go in the folder structure

I am not referring to outside dependencies as such

Am I over-thinking this whole excercise of converting to a Maven build ?

Bob M

Dunedin
New Zealand



 
Saloon Keeper
Posts: 13367
295
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The amount of code that a project consists of does not necessarily affect how complex the Maven POM is.

Copy the contents of the src/ folder from the original project, and put it in the src/main/java/ folder of your Maven project. Delete all files that do not have a .java extension.

Copy the contents of the src/ folder from the original project, and put it in the src/main/resources/ folder of your Maven project. Delete all file that do have a .java extension.

Remove the lib/ folder. The point of Maven is to let Maven pull in the third party libraries.

Update your POM to include real metadata about the project. For instance, the <developers> element seems to be an example from the book you're reading. Change it so it contains your own contact information, or remove the element. Definitely change the group ID, artifact ID, and name of the project so it reflects what you're working on. Update or remove the project URL. Look at the Maven POM Reference for an overview of all the elements that you can add to a POM.
 
Bob Matthews
Rancher
Posts: 623
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Stephan

Very clear instructions

Will do and report back

Bob
Dunedin
New Zealand
 
Bob Matthews
Rancher
Posts: 623
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Stephan

First attempt at a build - many errors

Many - can't find a symbol

Some - can't find a package
e.g. ord.joda
weka.*
eu.verdelhan.ta4j

How do I ensure these packages are sought ?

Bob M
 
Tim Holloway
Saloon Keeper
Posts: 24499
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You add dependencies to the POM file.

For example:
 
Bob Matthews
Rancher
Posts: 623
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim

I thought the idea was to have these packages recognized automatically and Maven would bring them down
 
Bob Matthews
Rancher
Posts: 623
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Added in the dependency for weka as per Tim's advice

Now we get the following:-

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  01:14 min
[INFO] Finished at: 2021-06-08T01:41:09+12:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project dc: Could not resolve dependencies for project directional_changes:dc:jar:1.0.0-SNAPSHOT: Failed to collect dependencies at nz.ac.waikato.cms.moa:weka-package:jar:2020.12.0 -> nz.ac.waikato.cms.moa:moa:jar:2020.12.0 -> ca.umontreal.iro:ssj:jar:2.5 -> dsol:dsol-xml:jar:1.6.9: Failed to read artifact descriptor for dsol:dsol-xml:jar:1.6.9: Could not transfer artifact dsol:dsol-xml:pom:1.6.9 from/to maven-default-http-blocker (http://0.0.0.0/): Blocked mirror for repositories: [simulation (http://www.simulation.tudelft.nl/maven, default, releases+snapshots), central (http://repo1.maven.org/maven2, default, releases)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Bob M
 
Tim Holloway
Saloon Keeper
Posts: 24499
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Maven doesn't recognize the dependencies in the code - it doesn't scan the source code so it can't. What it does do, however, is read the list of dependencies that you put in your POM, download them from Maven Central (or a selected alternative) and cache them in your local Maven repository (under $HOME/.m2) by default).

Dependencies themselves can have their own (transitive) dependencies and since those were defined in the POMs used to built the repository  modules, Maven can automatically bring them in as well. You'd usually only need to indicate a secondary dependency if you wanted a different version of the secondary JAR than what the primary dependency required. Providing that the primary dependency allowed it. Good Maven practice is to explicitly depend on only JAR versions proven to be compatible rather than, say, grabbing the latest version.
 
Marshal
Posts: 3708
523
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bob Matthews wrote:



According to the Maven 3.8.1 Release Notes, repositories using HTTP (rather than HTTPS) are now blocked by default.

Maven 3.8.1 release notes wrote:
We received a report from Jonathan Leitschuh about a vulnerability of custom repositories in dependency POMs. We’ve split this up into three separate issues:

  • Possible Man-In-The-Middle-Attack due to custom repositories using HTTP
    More and more repositories use HTTPS nowadays, but this hasn’t always been the case. This means that Maven Central contains POMs with custom repositories that refer to a URL over HTTP. This makes downloads via such repository a target for a MITM attack. At the same time, developers are probably not aware that for some downloads an insecure URL is being used. Because uploaded POMs to Maven Central are immutable, a change for Maven was required. To solve this, we extended the mirror configuration with <blocked> parameter, and we added a new external:http:* mirror selector (like existing external:*), meaning “any external URL using HTTP”.
    The decision was made to block such external HTTP repositories by default: this is done by providing a mirror in the conf/settings.xml blocking insecure HTTP external URLs.
  • Possible Domain Hijacking due to custom repositories using abandoned domains
    Sonatype has analyzed which domains were abandoned and has claimed these domains.
  • Possible hijacking of downloads by redirecting to custom repositories
    This one was the hardest to analyze and explain. The short story is: you’re safe, dependencies are only downloaded from repositories within their context. So there are two main questions: what is the context and what is the order? The order is described on the Repository Order page. The first group of repositories are defined in the settings.xml (both user and global). The second group of repositories are based on inheritence, with ultimately the super POM containing the URL to Maven Central. The third group is the most complex one but is important to understand the term context: repositories from the effective POMs from the dependency path to the artifact. So if a dependency was defined by another dependency or by a Maven project, it will also include their repositories. In the end this is not a bug, but a design feature.
  •  
    Tim Holloway
    Saloon Keeper
    Posts: 24499
    167
    Android Eclipse IDE Tomcat Server Redhat Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    If I read the problem correctly, you should be able to get rid of the dsol problem by explicitly requesting in in the POM:


    That should force an HTTPS download, if, as it would appear, the transitive dependencies on weka are made via http. Repeat as needed for other offending JARs. If you cannot get an HTTPS Maven repo, manually download the JAR from a trusted source then manually add it to your local Maven repository. I've had to to this for IBM's DB2 driver JAR, as an example.
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks guys for the advice

    Tim: I tried adding the dependency but no change, so I downloaded the jar file and copied it to my local Maven repository

    Still no change ?

    My bad............forgot to delete dependency !

    Now:

    [INFO] Scanning for projects...
    [ERROR] [ERROR] Some problems were encountered while processing the POMs:
    [FATAL] Non-parseable POM C:\Directional_Changes\dc\pom.xml: Unrecognised tag: 'build' (position: START_TAG seen ...</dependency>\n\n  <build>... @42:10)  @ line 42, column 10
    @
    [ERROR] The build could not read 1 project -> [Help 1]
    [ERROR]
    [ERROR]   The project  (C:\Directional_Changes\dc\pom.xml) has 1 error
    [ERROR]     Non-parseable POM C:\Directional_Changes\dc\pom.xml: Unrecognised tag: 'build' (position: START_TAG seen ...</dependency>\n\n  <build>... @42:10)  @ line 42, column 10 -> [Help 2]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
    [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/ModelParseException

    Bob M
     
    Tim Holloway
    Saloon Keeper
    Posts: 24499
    167
    Android Eclipse IDE Tomcat Server Redhat Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    You can't just copy a JAR into the Maven repositories directory tree, it needs metadata as well. I'd point you to the instructions but I'd have to google for them. It's been a while.

    The <build> and <dependencies> tags are both at the same level of the POM XML tree, with the dependencies element being after the build element - with possible intervening tags as well. The error message you're displaying indicates that you may have a malformed POM file.
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Corrected pom file

    <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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>directional_changes</groupId>
    <artifactId>dc</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>Directional Changes Forex Strategy</name>

    <developers>
    <developer>
    <id>bob m</id>
    <name>Bob Matthews</name>
    <email>rgmatthews@orcon.net.nz</email>
    <properties>
    <active>true</active>
    </properties>
    </developer>
    </developers>

    <dependencies>    

    <!-- https://mvnrepository.com/artifact/nz.ac.waikato.cms.moa/weka-package -->    
    <dependency>
               <groupId>nz.ac.waikato.cms.moa</groupId>
               <artifactId>weka-package</artifactId>
               <version>2020.12.0</version>
           </dependency>
       </dependencies>

     <build>
       <plugins>
         <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-compiler-plugin</artifactId>
       <version>3.8.0</version>
       <configuration>
           <release>11</release>
       </configuration>
         </plugin>
       </plugins>
     </build>
     
    </project>

    Still have problem with dsol:dsol-xml:jar:1.6.9:

    Bob M
     
    Tim Holloway
    Saloon Keeper
    Posts: 24499
    167
    Android Eclipse IDE Tomcat Server Redhat Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

    Also, DON'T remove the dependency for that JAR from your POM. Maven is still going to resolve it via the manual dependency declaration - it just won't attempt to download anything that's already cataloged as being in the local cache.
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I am trying the following command:-

    mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=<C:\downloads\dsol-xml-1.6.9.jar>

    and I get the message - the syntax of the command is incorrect

    not sure why ?

    Bob M
     
    Tim Holloway
    Saloon Keeper
    Posts: 24499
    167
    Android Eclipse IDE Tomcat Server Redhat Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    The angle brackets are not part of the command. They're just to show parts of the command line that vary as opposed to the parts that have to be typed in exactly as illustrated.
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks Tim

    My current pom.xml file :-



    I am getting an error - package eu.verdelhan.ta4j doesn't exist ?

    Bob M
     
    Tim Holloway
    Saloon Keeper
    Posts: 24499
    167
    Android Eclipse IDE Tomcat Server Redhat Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I'm not sure what that's all about. It's defined and in the Maven repo. But it's pretty old. The 0.9 release dates to 2017. 0.4 is 2014

    You might be interested to know that apparently the groupId seems to have changed to org.ta4j and the most modern release is 0.14.
     
    Stephan van Hulst
    Saloon Keeper
    Posts: 13367
    295
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I just took a look at the library that was included in the original project. It seems to be a custom build of an unknown snapshot version from an unmaintained repository. The code that is included in the library doesn't even match the code in the repository.

    Honestly, I would dissuade you from sinking any more time in this project. It's beyond repair. If I consider both how the code was written and how the project was set up, you will learn nothing good from this.
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Stephan: will hang in for a little longer

    Tim: the missing dependency is referenced by 12 java files under the heading of Technical Indicators
    I have gone thru all 12 and replaced import eu.verdelhan.ta4j with import org.ta4j.core

    and added the following dependency -


    Could or should this work ?

    Bob M

    p.s. seems NOT - same error message - missing package

    Just to put it in context - these Technical Indicators are purely to show that the paper's strategies yield better results than just using Technical Indicators
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Two missing packages at the moment
    (a) org.ta4j.core and
    (b) autoweka

    Bit confused about (b) since instruction is to use weka package manager to install ?

    Bob M
     
    Stephan van Hulst
    Saloon Keeper
    Posts: 13367
    295
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Bob Matthews wrote:Could or should this work ?


    Yes, but you also need to fix the code that uses the classes from ta4j, because as I pointed out, the code was written while using a snapshot version of the dependency that is not compatible with any of the official releases. For instance, you need to decide how you want to create instances of the TimeSeriesManager class, because the official version doesn't have a constructor that takes two arguments.

    Bit confused about (b) since instruction is to use weka package manager to install ?


    I haven't looked into this deeply, but it appears that many Weka plugins aren't packaged as Maven artifacts. You may indeed need to use the Weka package manager to install these.
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks Stephan

    re org.ta4j.core package

    Bottom line is I don't need this Technical Indicators section to compare results with paper approach

    If I take the results of the paper as gospel then I don't need comparisons

    And if I do want to compare, then I can easily write java programs which trade using just Technical Indicators

    And I see that the TimeSeriesManager class constructor has 2 arguments viz bidSeries and askSeries
    I don't know how to see the equivalent constructor in the official version of the package

    However I would like to figure out how to remove the "missing package" message

    I guess I would like to go just a bit further before it becomes obvious to me that the changes required are way too many

    Bob M
     
    Stephan van Hulst
    Saloon Keeper
    Posts: 13367
    295
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Bob Matthews wrote:re org.ta4j.core package

    Bottom line is I don't need this Technical Indicators section to compare results with paper approach


    It sounds like you want to remove these classes from the project? That is fine, if the application doesn't depend on them.


    I don't know how to see the equivalent constructor in the official version of the package


    There is no equivalent constructor. You need to rewrite some of the code. Let this be a lesson if you ever publicize your own open source project: Never depend on snapshot versions.


    However I would like to figure out how to remove the "missing package" message


    Didn't you already add the ta4j-core dependency to the POM? Where are you getting the missing package message? What is the exact message?
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Error examples:-

    [ERROR] /C:/Directional_Changes/dc/src/main/java/BolingerBAndS.java:[23,35] package org.ta4j.core.trading.rules does not exist
    [ERROR] /C:/Directional_Changes/dc/src/main/java/BolingerBAndS.java:[24,35] package org.ta4j.core.trading.rules does not exist
    [ERROR] /C:/Directional_Changes/dc/src/main/java/BolingerBAndS.java:[25,35] package org.ta4j.core.trading.rules does not exist
    [ERROR] /C:/Directional_Changes/dc/src/main/java/BolingerBAndS.java:[26,35] package org.ta4j.core.trading.rules does not exist
    [ERROR] /C:/Directional_Changes/dc/src/main/java/BolingerBAndS.java:[27,35] package org.ta4j.core.trading.rules does not exist
    [ERROR] /C:/Directional_Changes/dc/src/main/java/BolingerBAndS.java:[28,35] package org.ta4j.core.trading.rules does not exist
    [
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
     
    Tim Holloway
    Saloon Keeper
    Posts: 24499
    167
    Android Eclipse IDE Tomcat Server Redhat Java Linux
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I think the package name has changed from:

    org.ta4j.core.trading.rules

    To:

    org.ta4j.core.rules
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    thanks Tim

    A question if I may :-

    As an example, the DCCurve.java file which WAS in the gc.da folder has the following imports:-


    What should I be doing with these imports now that the original file structure doesn't exist any more

    Bob M

     
    Stephan van Hulst
    Saloon Keeper
    Posts: 13367
    295
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Why is it not in it's original folder anymore?
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Way back you said:-

    "Copy the contents of the src/ folder from the original project, and put it in the src/main/java/ folder of your Maven project. Delete all files that do not have a .java extension."

    When I did this I got rid of the original folder setup and put all java files into the one folder

    Bob M
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    At the moment the TechnicalAnalysis suite of programs under the name ta4j is providing 95% of the error messages

    I think the authors are the same from eu.verdelhan.ta4j to org.ta4j

    Some errors have been corrected by e.g. removing "trading" in the name

    However I can't figure out what has happened to the likes of
    eu.verdelhan.ta4j.core.BaseStrategy and .Order and .Rule and .Tick

    Any ideas ?

    Bob M
     
    Stephan van Hulst
    Saloon Keeper
    Posts: 13367
    295
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Bob Matthews wrote:When I did this I got rid of the original folder setup and put all java files into the one folder


    You should have kept the folder structure as it was inside the original src/ folder though. For instance, src/foo/Bar.java should have become src/main/java/foo/Bar.java, not src/main/java/Bar.java.
     
    Stephan van Hulst
    Saloon Keeper
    Posts: 13367
    295
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator

    Bob Matthews wrote:However I can't figure out what has happened to the likes of
    eu.verdelhan.ta4j.core.BaseStrategy and .Order and .Rule and .Tick


    Your best bet is to search for these names in the new GitHub repository: https://github.com/ta4j/ta4j/find/master

    For instance, you will find that BaseStrategy is now in the org.ta4j.core package.
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thanks Stephan

    I spent the morning adding back in the orignal folder structure as you said above

    I will spend a bit more time researching ta4j

    I know I have the alternative approach up my sleeve
    i.e. remove all references to ta4j

    Thank you so much for all your great advice

    I am enjoying getting to know Maven a little

    Bob M
     
    Bob Matthews
    Rancher
    Posts: 623
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I tried the following command:-




    How and where do I add these 4 items ?

    Bob M
    reply
      Bookmark Topic Watch Topic
    • New Topic